]> Pileus Git - ~andy/fetchmail/blob - Makefile.in
Shroud password lengths.
[~andy/fetchmail] / Makefile.in
1 # Makefile for fetchmail
2
3 # If you're running QNX, we can't assume a working autoconf.
4 # So just uncomment all the lines marked QNX.
5
6 VERS=3.2
7 PL=0
8
9 # Ultrix 2.2 make doesn't expand the value of VPATH.
10 srcdir = @srcdir@
11 VPATH = @srcdir@
12
13 CC = @CC@
14 # CC = cc               # QNX
15
16 CFLAGS = @CFLAGS@
17 # CFLAGS =  -g2 -5      # QNX
18 LDFLAGS = @LDFLAGS@
19 # LDLAGS =  -g2 -5      # QNX
20 LEX = @LEX@
21 LEXFLAGS=
22 YACC = @YACC@
23 # YACC = yacc
24 YACCFLAGS = -dt
25
26 # How to invoke ranlib.  This is only used by the `glob' subdirectory.
27 RANLIB = @RANLIB@
28
29 # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
30 # See also `config.h'.
31 DEFS = @DEFS@
32 # DEFS = -DQNX -DHAVE_CONFIG_H -DHAVE_UNISTD_H -DHAVE_STDARG_H -DSTDC_HEADERS   # QNX
33 defines =  -DRELEASE_ID=\"$(VERS)\" -DPATCHLEVEL=\"$(PL)\" $(DEFS)
34
35 # If your system needs extra libraries loaded in, define them here.
36 LOADLIBS = @LIBS@ @LEXLIB@
37 # LOADLIBS = -lsocket3r -lunix3r        # QNX
38
39 # Any extra object files your system needs.
40 extras = @LIBOBJS@
41
42 # Extra sources/objects for library functions not provided on the host system.
43 EXTRASRC = @EXTRASRC@
44 # EXTRASRC = $(srcdir)/strcasecmp.c $(srcdir)/getopt.c $(srcdir)/getopt1.c $(srcdir)/alloca.c   # QNX
45 EXTRAOBJ = @EXTRAOBJ@
46 # EXTRAOBJS = strcasecmp.o getopt.o getopt1.o alloca.o
47
48 # Common prefix for machine-independent installed files.
49 prefix = @prefix@
50 # Common prefix for machine-dependent installed files.
51 exec_prefix = @exec_prefix@
52
53 # Name under which to install fetchmail
54 instname = fetchmail
55 # Directory in which to install.
56 bindir = @bindir@
57 # Directory to install the Info files in.
58 infodir = @infodir@
59 # Number to put on the man page filename.
60 manext = 1
61 # Directory to install the man page in.
62 mandir = @mandir@/man$(manext)
63
64 # Program to install `make'.
65 INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s
66 # Program to install the man page.
67 INSTALL_DATA = @INSTALL_DATA@
68 # Generic install program.
69 INSTALL = @INSTALL@
70
71 # Program to format Texinfo source into Info files.
72 MAKEINFO = makeinfo
73 # Program to format Texinfo source into DVI files.
74 TEXI2DVI = texi2dvi
75
76 # Programs to make tags files.
77 ETAGS = etags -tw
78 CTAGS = ctags -tw
79
80 protobjs = socket.o getpass.o pop2.o pop3.o imap.o fetchmail.o options.o \
81        rcfile_l.o rcfile_y.o daemon.o smtp.o driver.o rfc822.o xmalloc.o \
82        uid.o mxget.o md5c.o md5ify.o interface.o netrc.o error.o
83
84 objs = $(protobjs) $(extras) $(EXTRAOBJ)
85
86 srcs = $(srcdir)/socket.c $(srcdir)/getpass.c $(srcdir)/pop2.c          \
87        $(srcdir)/pop3.c $(srcdir)/imap.c $(srcdir)/fetchmail.c          \
88        $(srcdir)/options.c $(srcdir)/daemon.c $(srcdir)/driver.c        \
89        $(srcdir)/rfc822.c $(srcdir)/smtp.c $(srcdir)/xmalloc.c          \
90        $(srcdir)/uid.c $(srcdir)/mxget.c $(srcdir)/md5c.c               \
91        $(srcdir)/md5ify.c $(srcdir)/interface.c $(srcdir)/netrc.c       \
92        $(srcdir)/error.c
93
94 .SUFFIXES:
95 .SUFFIXES: .o .c .h .y .l .ps .dvi .info .texi
96
97 all: fetchmail fetchmail.spec
98
99 # Some makes apparently use .PHONY as the default goal if it is before `all'.
100 .PHONY: all check
101
102 $(protobjs): fetchmail.h
103
104 fetchmail: $(srcdir)/rcfile_l.c $(srcdir)/rcfile_y.c $(objs)
105         $(CC) $(LDFLAGS) $(objs) $(LOADLIBS) -o fetchmail
106
107
108 # -I. is needed to find config.h in the build directory.
109 .c.o:
110         $(CC) $(defines) -c -I. -I$(srcdir) $(CFLAGS) $< $(OUTPUT_OPTION)
111
112 # lex rule
113 .l.o:
114
115 .l.c:
116         $(LEX) $(LEXFLAGS) $<
117         mv lex.yy.c $@
118
119 # yacc rule
120 .y.o:
121
122 .y.c:
123         $(YACC) $(YACCFLAGS) $<
124         mv y.tab.c $@
125         mv -f y.tab.h $*.h
126
127 # For some losing Unix makes.
128 SHELL = /bin/sh
129 MAKE = make
130
131 FORCE:
132
133 tagsrcs = $(srcs) $(srcdir)/rcfile_l.c $(srcdir)/rcfile_y.c
134 TAGS: $(tagsrcs)
135         $(ETAGS) $(tagsrcs)
136 tags: $(tagsrcs)
137         $(CTAGS) $(tagsrcs)
138
139 .PHONY: install installdirs
140 install: installdirs $(bindir)/$(instname) $(mandir)/$(instname).$(manext)
141
142 installdirs:
143         $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(mandir)
144
145 $(bindir)/$(instname): fetchmail
146         $(INSTALL_PROGRAM) fetchmail $@
147
148 $(mandir)/$(instname).$(manext): fetchmail.man
149         $(INSTALL_DATA) $(srcdir)/fetchmail.man $@
150
151 fetchmail.spec: $(srcdir)/Makefile.in $(srcdir)/specgen.sh
152         $(srcdir)/specgen.sh $(VERS) $(PL) >fetchmail.spec
153
154 .PHONY: clean realclean distclean mostlyclean
155 clean: 
156         -rm -f fetchmail *.o core fetchmail.dvi \
157                rcfile_l.c rcfile_y.h rcfile_y.c \
158                fetchmail.tar fetchmail.tar.gz \
159                rfc822
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 fetchmail.log fetchmail.toc fetchmail.*aux fetchmail.spec
166
167 realclean: distclean # fetchmail.info*
168
169 mostlyclean: clean
170
171 Makefile: config.status $(srcdir)/Makefile.in
172         $(SHELL) config.status
173         @echo "You can ignore any makedepend error messages"
174         -makedepend -I. -fMakefile *.c
175
176 config.h: stamp-config 
177
178 stamp-config: config.status $(srcdir)/config.h.in
179         $(SHELL) config.status
180         touch stamp-config
181
182 configure: configure.in
183         autoconf $(ACFLAGS)
184
185 config.h.in: acconfig.h
186         autoheader $(ACFLAGS)
187
188 # This tells versions [3.59,3.63) of GNU make not to export all variables.
189 .NOEXPORT:
190
191
192 # Special dependencies, not easily handled without explicit rules
193 $(srcdir)/rcfile_l.c: $(srcdir)/rcfile_l.l
194 $(srcdir)/rcfile_y.c: $(srcdir)/rcfile_y.y
195
196 parser = $(srcdir)/rcfile_l.l $(srcdir)/rcfile_y.y
197 headers = $(srcdir)/fetchmail.h $(srcdir)/socket.h $(srcdir)/smtp.h \
198         $(srcdir)/mx.h $(srcdir)/md5.h $(srcdir)/md5global.h \
199         $(srcdir)/netrc.h $(srcdir)/tunable.h
200 extra = $(srcdir)/alloca.c $(srcdir)/getopt.[ch] $(srcdir)/getopt1.c \
201         $(srcdir)/strcasecmp.c
202 docs = $(srcdir)/COPYING $(srcdir)/README $(srcdir)/INSTALL $(srcdir)/NEWS \
203         $(srcdir)/NOTES $(srcdir)/fetchmail.lsm \
204         $(srcdir)/*.man $(srcdir)/sample.rcfile $(srcdir)/FAQ
205 config = $(srcdir)/Makefile.in $(srcdir)/configure.in $(srcdir)/configure \
206         $(srcdir)/config.guess $(srcdir)/config.h.in $(srcdir)/config.sub \
207         $(srcdir)/acconfig.h
208 scripts = $(srcdir)/install.sh $(srcdir)/mkinstalldirs $(srcdir)/specgen.sh
209 all = $(docs) $(config) $(srcs) $(parser) $(headers) $(extra) $(scripts) \
210         $(srcdir)/MANIFEST
211
212 MANIFEST: $(srcdir)
213         @echo $(all) | tr "[ \t]" '\n' | sort | sed "s/\\./fetchmail-$(VERS)/" >MANIFEST
214
215 dist: fetchmail-$(VERS).tar.gz
216         ls -l fetchmail-$(VERS).tar.gz
217
218 fetchmail-$(VERS).tar: $(all)
219         (cd ..; tar -cf fetchmail-$(VERS).tar `cat fetchmail-$(VERS)/MANIFEST`)
220         mv ../fetchmail-$(VERS).tar fetchmail-$(VERS).tar
221 fetchmail-$(VERS).tar.gz: fetchmail-$(VERS).tar
222         gzip -f fetchmail-$(VERS).tar
223
224 # Tester for address parsing
225 rfc822: rfc822.c
226         gcc -DTESTMAIN -g rfc822.c -o rfc822
227
228 # The automatically generated dependencies below may omit config.h
229 # because it is included with ``#include <config.h>'' rather than
230 # ``#include "config.h"''.  So we add the explicit dependency to make sure.
231 $(objs): config.h
232
233 # Automatically generated dependencies will be put at the end of the makefile.
234 # DO NOT DELETE THIS LINE -- make depend depends on it.