]> Pileus Git - ~andy/fetchmail/blob - Makefile.in
ed9efb98073c89bd4e680661b5413c42ac4daf9f
[~andy/fetchmail] / Makefile.in
1 # Makefile for popclient
2
3 # Ultrix 2.2 make doesn't expand the value of VPATH.
4 srcdir = @srcdir@
5 VPATH = @srcdir@
6
7 CC = @CC@
8
9 CFLAGS = @CFLAGS@
10 LDFLAGS = @LDFLAGS@
11 LEX = @LEX@
12 LEXFLAGS=
13 YACC = @YACC@
14 YACCFLAGS = -dt
15
16 # How to invoke ranlib.  This is only used by the `glob' subdirectory.
17 RANLIB = @RANLIB@
18
19 # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
20 # See also `config.h'.
21 defines = @DEFS@
22
23 # If your system needs extra libraries loaded in, define them here.
24 LOADLIBS = @LIBS@ @LEXLIB@
25
26 # Any extra object files your system needs.
27 extras = @LIBOBJS@
28
29 # Extra sources/objects for library functions not provided on the host system.
30 EXTRASRC = @EXTRASRC@
31 EXTRAOBJ = @EXTRAOBJ@
32
33 # Common prefix for machine-independent installed files.
34 prefix = /usr/local
35 # Common prefix for machine-dependent installed files.
36 exec_prefix = $(prefix)
37
38 # Name under which to install popclient
39 instname = popclient
40 # Directory in which to install.
41 bindir = $(exec_prefix)/bin
42 # Directory to install the Info files in.
43 infodir = $(prefix)/info
44 # Directory to install the man page in.
45 mandir = $(prefix)/man/man$(manext)
46 # Number to put on the man page filename.
47 manext = 1
48
49 # Program to install `make'.
50 INSTALL_PROGRAM = @INSTALL_PROGRAM@
51 # Program to install the man page.
52 INSTALL_DATA = @INSTALL_DATA@
53 # Generic install program.
54 INSTALL = @INSTALL@
55
56 # Program to format Texinfo source into Info files.
57 MAKEINFO = makeinfo
58 # Program to format Texinfo source into DVI files.
59 TEXI2DVI = texi2dvi
60
61 # Programs to make tags files.
62 ETAGS = etags -tw
63 CTAGS = ctags -tw
64
65 popobjs = socket.o getpass.o pop2.o pop3.o imap.o popclient.o options.o \
66        poprc_l.o poprc_y.o poprc.o daemon.o driver.o xmalloc.o
67
68 objs = $(popobjs) $(EXTRAOBJ) $(extras)
69
70 srcs = $(srcdir)/socket.c $(srcdir)/getpass.c $(srcdir)/pop2.c          \
71        $(srcdir)/pop3.c $(srcdir)/imap.c $(srcdir)/popclient.c          \
72        $(srcdir)/options.c $(srcdir)/poprc.c $(srcdir)/daemon.c         \
73        $(srcdir)/driver.c $(srcdir)/xmalloc.c $(EXTRASRC)
74
75 .SUFFIXES:
76 .SUFFIXES: .o .c .h .y .l .ps .dvi .info .texi
77
78 all: popclient
79 check: # No tests.
80 depend:
81         test -f config.h || touch config.h
82         test -f poprc_y.h || touch poprc_y.h
83         makedepend -fMakefile.in *.c
84
85 # Some makes apparently use .PHONY as the default goal is it is before `all'.
86 .PHONY: all check
87
88 $(popobjs): popclient.h
89
90 popclient: $(srcdir)/poprc_l.c $(srcdir)/poprc_y.c $(objs)
91         $(CC) $(LDFLAGS) $(objs) $(LOADLIBS) -o popclient
92
93
94 # -I. is needed to find config.h in the build directory.
95 .c.o:
96         $(CC) $(defines) -c -I. -I$(srcdir) $(CFLAGS) $< $(OUTPUT_OPTION)
97
98 # lex rule
99 .l.o:
100
101 .l.c:
102         $(LEX) $(LEXFLAGS) $<
103         mv lex.yy.c $@
104
105 # yacc rule
106 .y.o:
107
108 .y.c:
109         $(YACC) $(YACCFLAGS) $<
110         mv y.tab.c $@
111         mv -f y.tab.h $*.h
112
113 # For some losing Unix makes.
114 SHELL = /bin/sh
115 MAKE = make
116
117 FORCE:
118
119 tagsrcs = $(srcs) $(srcdir)/poprc_l.c $(srcdir)/poprc_y.c
120 TAGS: $(tagsrcs)
121         $(ETAGS) $(tagsrcs)
122 tags: $(tagsrcs)
123         $(CTAGS) $(tagsrcs)
124
125 .PHONY: install installdirs
126 install: installdirs \
127          $(bindir)/$(instname) # $(infodir)/popclient.info \
128          $(mandir)/$(instname).$(manext)
129
130 installdirs:
131         $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir)
132
133 $(bindir)/$(instname): popclient
134         $(INSTALL_PROGRAM) popclient $@
135
136 $(infodir)/popclient.info: popclient.info
137         if [ -r ./popclient.info ]; then dir=.; else dir=$(srcdir); fi; \
138         for file in $${dir}/popclient.info*; do \
139           name="`basename $$file`"; \
140           $(INSTALL_DATA) $$file \
141             `echo $@ | sed "s,popclient.info\$$,$$name,"`; \
142         done
143 # Run install-info only if it exists.
144 # Use `if' instead of just prepending `-' to the
145 # line so we notice real errors from install-info.
146 # We use `$(SHELL) -c' because some shells do not
147 # fail gracefully when there is an unknown command.
148         if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
149           install-info --infodir=$(infodir) $$dir/popclient.info; \
150         else true; fi
151
152 $(mandir)/$(instname).$(manext): popclient.man
153         $(INSTALL_DATA) $(srcdir)/popclient.man $@
154
155
156 .PHONY: clean realclean distclean mostlyclean
157 clean: 
158         -rm -f popclient *.o core popclient.dvi \
159                poprc_l.c poprc_y.h poprc_y.c popclient.tar popclient.tar.gz
160
161 distclean: clean 
162         -rm -f Makefile config.h
163         -rm -f config.cache config.status config.log stamp-config
164         -rm -f TAGS tags
165         -rm -f popclient.log popclient.toc popclient.*aux
166
167 realclean: popclient.info* distclean
168
169 mostlyclean: clean
170
171 Makefile: config.status $(srcdir)/Makefile.in
172         $(SHELL) config.status
173
174 config.h: stamp-config 
175
176 stamp-config: config.status $(srcdir)/config.h.in
177         $(SHELL) config.status
178         touch stamp-config
179
180 configure: configure.in
181         autoconf $(ACFLAGS)
182
183 # This tells versions [3.59,3.63) of GNU make not to export all variables.
184 .NOEXPORT:
185
186
187 # Special dependencies, not easily handled without explicit rules
188 $(srcdir)/poprc_l.c: $(srcdir)/poprc_l.l
189 $(srcdir)/poprc_y.c: $(srcdir)/poprc_y.y
190
191 parser = $(srcdir)/poprc_l.l $(srcdir)/poprc_y.y
192 headers = $(srcdir)/popclient.h $(srcdir)/socket.h $(srcdir)/poproto.h
193 extra = $(srcdir)/alloca.c $(srcdir)/bzero.[ch] $(srcdir)/errorcodes \
194         $(srcdir)/getopt.[ch] $(srcdir)/getopt1.c $(srcdir)/md5*.[ch] \
195         $(srcdir)/strcasecmp.c $(srcdir)/strdup.c
196 docs = $(srcdir)/COPYING $(srcdir)/README $(srcdir)/INSTALL $(srcdir)/NEWS \
197         $(srcdir)/popclient.lsm $(srcdir)/RFC/*.txt \
198         $(srcdir)/*.man $(srcdir)/sample.poprc
199 config = $(srcdir)/Makefile.in $(srcdir)/configure.in $(srcdir)/configure \
200         $(srcdir)/config.guess $(srcdir)/config.h.in $(srcdir)/config.sub
201 scripts = $(srcdir)/install.sh $(srcdir)/mkinstalldirs
202 all = $(docs) $(config) $(srcs) $(parser) $(headers) $(extra) $(scripts)
203
204 manifest:
205         @echo $(all) | tr "[ \t]" '\n' | sort
206
207 popclient.tar: $(all)
208         tar -cf popclient.tar $(all)
209 popclient.tar.gz: popclient.tar
210         gzip -f popclient.tar
211
212 # The automatically generated dependencies below may omit config.h
213 # because it is included with ``#include <config.h>'' rather than
214 # ``#include "config.h"''.  So we add the explicit dependency to make sure.
215 $(objs): config.h
216
217 # Automatically generated dependencies will be put at the end of the file.