]> Pileus Git - ~andy/fetchmail/blob - Makefile.in
Easy bug fixes for this round.
[~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 PACKAGE = fetchmail
7 VERSION = 5.9.4
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 # LDFLAGS =  -g2 -5 -N64k       # QNX
20 LEX = @LEX@
21 LEXFLAGS=
22 YACC = @YACC@
23 # YACC = yacc
24 YACCFLAGS = -d # -t
25
26 CEFLAGS = @CEFLAGS@
27 CPFLAGS = @CPFLAGS@
28 LDEFLAGS = @LDEFLAGS@
29
30 # for gettext (used by fetchmail.c, NOT by GNU gettext)
31 localedir = $(datadir)/locale
32
33 # How to invoke ranlib.  This is only used by the `glob' subdirectory.
34 RANLIB = @RANLIB@
35
36 # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
37 # See also `config.h'.
38 DEFS = @DEFS@ @EXTRADEFS@ -DLOCALEDIR=\"$(localedir)\"
39 # DEFS = -DQNX -DHAVE_CONFIG_H -DHAVE_UNISTD_H -DHAVE_STDARG_H -DSTDC_HEADERS   # QNX
40 defines = $(DEFS)
41
42 # If your system needs extra libraries loaded in, define them here.
43 # In particular, add -lresolv if you are running bind 4.9.5
44 LOADLIBS = @LIBS@ @INTLLIBS@ @LEXLIB@
45 # LOADLIBS = -lsocket3r -lunix3r        # QNX
46
47 # Any extra object files your system needs.
48 extras = @LIBOBJS@
49
50 # Extra sources/objects for library functions not provided on the host system.
51 EXTRASRC = @EXTRASRC@
52 # EXTRASRC = $(srcdir)/strcasecmp.c $(srcdir)/alloca.c  # QNX
53 EXTRAOBJ = @EXTRAOBJ@ @INTLOBJS@
54 # EXTRAOBJ = strcasecmp.o alloca.o getopt.o getopt1.o
55
56 DESTDIR = 
57
58 # Common prefix for machine-independent installed files.
59 prefix = @prefix@
60 # Common prefix for machine-dependent installed files.
61 exec_prefix = @exec_prefix@
62
63 # Directory in which to install.
64 bindir = @bindir@
65 # Directory to install the Info files in.
66 infodir = @infodir@
67 # Directory to install data files.
68 datadir = @datadir@
69 # Number to put on the man page filename.
70 manext = 1
71 # Directory to install the man page in.
72 mandir = @mandir@/man$(manext)
73
74 # Toplevel build directory
75 top_builddir = .
76 top_srcdir = @top_srcdir@
77
78 # Program to install `make'.
79 INSTALL_PROGRAM = @INSTALL_PROGRAM@
80 # Program to install the man page.
81 INSTALL_DATA = @INSTALL_DATA@
82 # Generic install program.
83 INSTALL = @INSTALL@
84
85 # Program to format Texinfo source into Info files.
86 MAKEINFO = makeinfo
87 # Program to format Texinfo source into DVI files.
88 TEXI2DVI = texi2dvi
89
90 # Programs to make tags files.
91 ETAGS = etags
92 CTAGS = ctags
93
94 protobjs = rcfile_y.o rcfile_l.o socket.o getpass.o pop2.o pop3.o imap.o \
95        etrn.o odmr.o fetchmail.o idle.o env.o options.o daemon.o driver.o \
96        transact.o sink.o rfc822.o smtp.o xmalloc.o uid.o mxget.o md5ify.o \
97        cram.o kerberos.o gssapi.o opie.o rpa.o interface.o netrc.o base64.o \
98        report.o unmime.o conf.o checkalias.o smbdes.o smbencrypt.o smbmd4.o \
99        smbutil.o ipv6-connect.o lock.o
100
101 objs = $(protobjs) $(extras) $(EXTRAOBJ)
102
103 srcs = $(srcdir)/socket.c $(srcdir)/getpass.c $(srcdir)/pop2.c          \
104        $(srcdir)/pop3.c $(srcdir)/imap.c $(srcdir)/etrn.c               \
105        $(srcdir)/odmr.c $(srcdir)/fetchmail.c $(srcdir)/env.c           \
106        $(srcdir)/idle.c $(srcdir)/options.c $(srcdir)/daemon.c          \
107        $(srcdir)/driver.c $(srcdir)/transact.c $(srcdir)/sink.c         \
108        $(srcdir)/rfc822.c $(srcdir)/smtp.c $(srcdir)/xmalloc.c          \
109        $(srcdir)/uid.c $(srcdir)/mxget.c $(srcdir)/md5ify.c             \
110        $(srcdir)/cram.c $(srcdir)/kerberos.c $(srcdir)/gssapi.c         \
111        $(srcdir)/opie.c $(srcdir)/rpa.c $(srcdir)/interface.c           \
112        $(srcdir)/netrc.c $(srcdir)/base64.c $(srcdir)/report.c          \
113        $(srcdir)/unmime.c $(srcdir)/conf.c $(srcdir)/checkalias.c       \
114        $(srcdir)/smbdes.c $(srcdir)/smbencrypt.c $(srcdir)/smbmd4.c     \
115        $(srcdir)/smbutil.c $(srcdir)/ipv6-connect.c $(srcdir)/lock.c
116
117 .SUFFIXES:
118 .SUFFIXES: .o .c .h .y .l .ps .dvi .info .texi
119
120 all: fetchmail po
121
122 # Some makes apparently use .PHONY as the default goal if it is before `all'.
123 .PHONY: all
124
125 fetchmail: $(objs) @INTLDEPS@
126         $(CC) $(LDEFLAGS) $(LDFLAGS) $(objs) $(LOADLIBS) -o fetchmail
127
128 intl:
129 @INTLDEPS@:     dummy
130         cd intl; $(MAKE)
131
132 po:     dummy
133         cd po; $(MAKE)
134
135 dummy:
136
137 # Tester for address parsing
138 rfc822: rfc822.c
139         gcc -DTESTMAIN -g rfc822.c -o rfc822
140
141 # Stand-alone MIME decoder
142 unmime: unmime.c base64.c rfc822.c xmalloc.c report.c
143         $(CC) -DSTANDALONE -DHAVE_CONFIG_H -I. -g -o $@ $^
144
145
146 # Stand-alone netrc tester
147 netrc: netrc.c xmalloc.o report.o
148         $(CC) -DSTANDALONE -DHAVE_CONFIG_H -I. -g -o $@ $^
149
150 .c.o:
151         $(CC) $(defines) -c $(CPFLAGS) -I. -I$(srcdir) -I$(top_builddir)/intl -I$(top_srcdir)/intl $(CEFLAGS) $(CFLAGS) $<
152
153 # For some losing Unix makes.
154 SHELL = /bin/sh
155 @SET_MAKE@
156
157 tagsrcs = $(srcs) rcfile_l.c rcfile_y.c
158 TAGS: $(tagsrcs)
159         $(ETAGS) $(tagsrcs)
160 tags: $(tagsrcs)
161         $(CTAGS) $(tagsrcs)
162
163 .PHONY: install uninstall
164 install:
165         @echo "Creating installation directories..." 
166         $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)
167         @echo "Installing fetchmail binary..."
168         $(INSTALL_PROGRAM) ./fetchmail $(DESTDIR)$(bindir)/fetchmail
169         @echo "Installing fetchmail configurator..."
170         $(INSTALL_PROGRAM) ${srcdir}/fetchmailconf $(DESTDIR)$(bindir)/fetchmailconf
171         @echo "Installing manual page..."
172         $(INSTALL_DATA) $(srcdir)/fetchmail.man $(DESTDIR)$(mandir)/fetchmail.$(manext)
173         rm -f $(DESTDIR)$(mandir)/fetchmailconf.$(manext)
174         cd $(DESTDIR)$(mandir) && ln -s fetchmail.$(manext) fetchmailconf.$(manext)
175         @echo "Installing language catalogs..."
176         -cd intl; $(MAKE) install
177         cd po; $(MAKE) install
178
179 uninstall:
180         rm -f $(DESTDIR)$(bindir)/fetchmail $(DESTDIR)$(bindir)/fetchmailconf
181         rm -f $(DESTDIR)$(mandir)/fetchmail.$(manext) $(DESTDIR)$(mandir)/fetchmailconf.$(manext)
182         -cd intl; $(MAKE) uninstall
183         cd po; $(MAKE) uninstall
184
185 .PHONY: clean realclean distclean mostlyclean
186 clean: 
187         -cd intl; $(MAKE) clean
188         -rm -f $(top_builddir)/intl/libintl.h # work around GNU gettext brain-damage
189         -cd po; $(MAKE) clean
190         -rm -f fetchmail *.o core fetchmail.dvi \
191                rcfile_l.c rcfile_y.h rcfile_y.c \
192                fetchmail.tar fetchmail.tar.gz \
193                netrc rfc822 unmime fetchmail-man.html
194
195 # This target would also normally invoke the following line, but doing so
196 # messes up the RPM build, so the line was disabled.
197 # -rm -f config.h config.cache config.status config.log stamp-config
198 distclean: clean 
199         -cd intl; $(MAKE) distclean
200         -cd po; $(MAKE) distclean
201         -rm -f TAGS tags
202
203 realclean: distclean
204         -rm -f FAQ FEATURES NOTES MANIFEST 
205         -rm -f config.cache config.log Makefile
206         -rm -f fetchmail-*.tar.gz fetchmail-*.i386.rpm 
207
208 mostlyclean: clean
209
210 # These magic rules are copied from the autoconf documentation
211 # except that Harry McGavran says the autoheader call in the third
212 # one below is unnecessary and causes problems with cross-platform builds.
213
214 ${srcdir}/configure: configure.in aclocal.m4
215         cd ${srcdir} && @AUTOCONF@
216      
217 # autoheader might not change config.h.in, so touch a stamp file.
218 ${srcdir}/config.h.in: stamp-h.in
219
220 ${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h # config.h.top config.h.bot
221         cd ${srcdir} # && @AUTOHEADER@
222         echo timestamp> ${srcdir}/stamp-h.in
223      
224 config.h: stamp-h
225 stamp-h: config.h.in config.status
226         ./config.status
227      
228 Makefile: Makefile.in config.status
229         ./config.status
230      
231 config.status: configure
232         ./config.status --recheck
233
234 $(srcdir)/aclocal.m4: configure.in
235         cd $(srcdir) && @ACLOCAL@
236
237 # This tells versions [3.59,3.63) of GNU make not to export all variables.
238 .NOEXPORT:
239
240 # Special dependencies, not easily handled portably without explicit rules
241 rcfile_l.c rcfile_l.h: $(srcdir)/rcfile_l.l
242         $(LEX) $(LEXFLAGS) $(srcdir)/rcfile_l.l
243         sed <lex.yy.c >rcfile_l.c -e "/lex\\.yy\\.c/s//rcfile_l.c/"
244         rm -f lex.yy.c
245 rcfile_y.c rcfile_y.h: $(srcdir)/rcfile_y.y
246         @echo "expect conflicts:  2 shift/reduce"
247         $(YACC) $(YACCFLAGS) $(srcdir)/rcfile_y.y
248         mv y.tab.c rcfile_y.c
249         mv -f y.tab.h rcfile_y.h
250
251 # These must be explicit, because the .c files often don't exist at
252 # makefile build time. 
253 rcfile_l.o: rcfile_l.c config.h fetchmail.h
254 rcfile_y.o: rcfile_y.c config.h fetchmail.h
255
256 parser = $(srcdir)/rcfile_l.l $(srcdir)/rcfile_y.y
257 headers = $(srcdir)/fetchmail.h $(srcdir)/socket.h $(srcdir)/smtp.h \
258         $(srcdir)/mx.h $(srcdir)/md5.h \
259         $(srcdir)/netrc.h $(srcdir)/tunable.h $(srcdir)/i18n.h \
260         $(srcdir)/ntlm.h $(srcdir)/smb.h $(srcdir)/kerberos.h \
261         $(srcdir)/smbbyteorder.h $(srcdir)/smbdes.h $(srcdir)/smbencrypt.h \
262         $(srcdir)/smbmd4.h
263 extra = $(srcdir)/alloca.c $(srcdir)/strcasecmp.c $(srcdir)/strstr.c \
264         $(srcdir)/memmove.c $(srcdir)/md5c.c $(srcdir)/getopt.[ch] $(srcdir)/getopt1.c 
265 docs = $(srcdir)/COPYING $(srcdir)/FEATURES $(srcdir)/fetchmail-features.html \
266         $(srcdir)/design-notes.html $(srcdir)/NOTES \
267         $(srcdir)/todo.html $(srcdir)/TODO \
268         $(srcdir)/INSTALL $(srcdir)/README $(srcdir)/README.SSL \
269         $(srcdir)/README.NTLM $(srcdir)/fetchmail.lsm $(srcdir)/NEWS \
270         $(srcdir)/*.man $(srcdir)/FAQ $(srcdir)/fetchmail-FAQ.html
271 config = $(srcdir)/Makefile.in $(srcdir)/configure.in $(srcdir)/configure \
272         $(srcdir)/config.guess $(srcdir)/config.h.in $(srcdir)/config.sub \
273         $(srcdir)/acconfig.h $(srcdir)/aclocal.m4
274 scripts = $(srcdir)/install-sh $(srcdir)/missing $(srcdir)/mkinstalldirs \
275         $(srcdir)/specgen.sh $(srcdir)/lsmgen.sh $(srcdir)/fetchmailconf
276 all = $(docs) $(config) $(srcs) $(parser) $(headers) $(extra) $(scripts) \
277         $(srcdir)/rh-config/* $(srcdir)/contrib/*[A-Za-uw-z] \
278         $(srcdir)/po/* $(srcdir)/intl $(srcdir)/beos/* ABOUT-NLS $(srcdir)/MANIFEST
279
280 MANIFEST: $(srcdir) Makefile.in
281         @echo $(all) | tr "[ \t]" '\n' | sed -e '/^\.\//s///' | sort >MANIFEST
282         @wc -l MANIFEST
283
284 distdocs: FAQ FEATURES NOTES fetchmail-man.html
285
286 FAQ: fetchmail-FAQ.html
287         echo "   (This document was generated from fetchmail-FAQ.html)" >FAQ
288         lynx -dump -nolist fetchmail-FAQ.html >>FAQ
289
290 FEATURES: fetchmail-features.html
291         echo "   (This document was generated from fetchmail-features.html)" >FEATURES
292         lynx -dump -nolist fetchmail-features.html | grep -v "Back to " >>FEATURES
293
294 NOTES: design-notes.html
295         echo "   (This document was generated from design-notes.html)" >NOTES
296         lynx -dump -nolist design-notes.html | grep -v "Back to " >>NOTES
297
298 TODO: todo.html
299         echo "   (This document was generated from todo.html)" >TODO
300         lynx -dump -nolist todo.html | grep -v "Back to " >>TODO
301
302 # man2html no longer chokes and dies on this man page,
303 # but manServer.pl does a much better job. 
304 fetchmail-man.html: fetchmail.man
305         manServer.pl fetchmail.man >fetchmail-man.html
306
307 # Make distribution, update LSM with proper size, remake distribution
308 # (Making fetchmail-man.html is a kluge to ensure that it will be
309 # available when I upload the distribution.)
310 dist: distclean MANIFEST Makefile.in distdocs
311         touch fetchmail.lsm
312         make fetchmail-$(VERSION).tar.gz 
313         lsmgen.sh $(VERSION) `wc -c fetchmail-$(VERSION).tar.gz` >fetchmail.lsm
314         make fetchmail-$(VERSION).tar.gz
315         #-cd po; make update-po
316         ls -l fetchmail-$(VERSION).tar.gz
317         @echo "Don't forget to build RPMs from root!"
318
319 # Firewall against the lossage in autoconf that keeps breaking our build.
320 EX = --exclude "fetchmail-$(VERSION)/intl/libintl.h"
321 fetchmail-$(VERSION).tar.gz: $(all)
322         (cd ..; ln -sf fetchmail fetchmail-$(VERSION))
323         (cd ..; tar $(EX) -czf fetchmail-$(VERSION).tar.gz `sed <fetchmail-$(VERSION)/MANIFEST s:^:fetchmail-$(VERSION)/:`)
324         mv -f ../fetchmail-$(VERSION).tar.gz .
325         rm ../fetchmail-$(VERSION)
326
327 # Make RPMs.  You need to be root to make this work
328 RPMROOT=/usr/src/redhat
329 RPM = rpm
330 RPMFLAGS = -ba
331 rpm: dist
332         cp fetchmail-$(VERSION).tar.gz fetchmail.xpm $(RPMROOT)/SOURCES;
333         $(srcdir)/specgen.sh $(VERSION) >$(RPMROOT)/SPECS/fetchmail.spec
334         cd $(RPMROOT)/SPECS; $(RPM) $(RPMFLAGS) fetchmail.spec  
335         cp $(RPMROOT)/RPMS/`arch|sed 's/i[4-9]86/i386/'`/fetchmail*-$(VERSION)*.rpm $(srcdir)
336         cp $(RPMROOT)/SRPMS/fetchmail*-$(VERSION)*.src.rpm $(srcdir)
337
338 # The following sets edit modes for GNU EMACS.
339 # Local Variables:
340 # compile-command:"configure"
341 # End:
342
343 # Automatically generated dependencies will be put at the end of the makefile.