]> Pileus Git - ~andy/fetchmail/blob - Makefile.in
Version bump.
[~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.7.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)/getopt.c $(srcdir)/getopt1.c $(srcdir)/alloca.c   # QNX
53 EXTRAOBJ = @EXTRAOBJ@ @INTLOBJS@
54 # EXTRAOBJ = strcasecmp.o getopt.o getopt1.o alloca.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        sink.o rfc822.o smtp.o xmalloc.o uid.o mxget.o md5ify.o cram.o \
97        kerberos.o gssapi.o opie.o rpa.o interface.o netrc.o base64.o \
98        error.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)/sink.c $(srcdir)/rfc822.c           \
108        $(srcdir)/smtp.c $(srcdir)/xmalloc.c $(srcdir)/uid.c             \
109        $(srcdir)/mxget.c $(srcdir)/md5ify.c $(srcdir)/cram.c            \
110        $(srcdir)/kerberos.c $(srcdir)/gssapi.c  $(srcdir)/opie.c        \
111        $(srcdir)/rpa.c $(srcdir)/interface.c $(srcdir)/netrc.c          \
112        $(srcdir)/base64.c $(srcdir)/error.c $(srcdir)/unmime.c          \
113        $(srcdir)/conf.c $(srcdir)/checkalias.c $(srcdir)/smbdes.c       \
114        $(srcdir)/smbencrypt.c $(srcdir)/smbmd4.c $(srcdir)/smbutil.c    \
115        $(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         $(MAKE) -C intl
131
132 po:     dummy
133         $(MAKE) -C po
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 error.c
143         $(CC) -DSTANDALONE -DHAVE_CONFIG_H -I. -g -o $@ $^
144
145
146 # Stand-alone netrc tester
147 netrc: netrc.c xmalloc.o error.o
148         $(CC) -DSTANDALONE -DHAVE_CONFIG_H -I. -g -o $@ $^
149
150 .c.o:
151         $(CC) $(defines) -c $(CPFLAGS) -I. -I$(srcdir) -I../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         -$(MAKE) -C intl install
177         $(MAKE) -C po 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         -$(MAKE) -C intl uninstall
183         $(MAKE) -C po uninstall
184
185 .PHONY: clean realclean distclean mostlyclean
186 clean: 
187         -$(MAKE) -C intl clean
188         #work around braindamage in GNU gettext
189         -rm -f intl/libintl.h
190         -$(MAKE) -C po clean
191         -rm -f fetchmail *.o core fetchmail.dvi \
192                rcfile_l.c rcfile_y.h rcfile_y.c \
193                fetchmail.tar fetchmail.tar.gz \
194                netrc rfc822 unmime fetchmail-man.html
195
196 distclean: clean 
197         -$(MAKE) -C intl distclean
198         -$(MAKE) -C po distclean
199         -rm -f TAGS tags
200         # Can't do these, it messes up RPM build
201         #-rm -f config.h config.cache config.status config.log stamp-config
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 rcfile_y.c rcfile_y.h: $(srcdir)/rcfile_y.y
245         @echo "expect conflicts:  2 shift/reduce"
246         $(YACC) $(YACCFLAGS) $(srcdir)/rcfile_y.y
247         mv y.tab.c rcfile_y.c
248         mv -f y.tab.h rcfile_y.h
249
250 # These must be explicit, because the .c files often don't exist at
251 # makefile build time. 
252 rcfile_l.o: rcfile_y.c rcfile_y.h config.h fetchmail.h
253 rcfile_y.o: rcfile_y.c rcfile_y.h config.h fetchmail.h
254
255 parser = $(srcdir)/rcfile_l.l $(srcdir)/rcfile_y.y
256 headers = $(srcdir)/fetchmail.h $(srcdir)/socket.h $(srcdir)/smtp.h \
257         $(srcdir)/mx.h $(srcdir)/md5.h $(srcdir)/md5global.h \
258         $(srcdir)/netrc.h $(srcdir)/tunable.h $(srcdir)/i18n.h \
259         $(srcdir)/ntlm.h $(srcdir)/smb.h \
260         $(srcdir)/smbbyteorder.h $(srcdir)/smbdes.h $(srcdir)/smbencrypt.h \
261         $(srcdir)/smbmd4.h
262 extra = $(srcdir)/alloca.c $(srcdir)/getopt.[ch] $(srcdir)/getopt1.c \
263         $(srcdir)/strcasecmp.c $(srcdir)/strstr.c $(srcdir)/memmove.c \
264         $(srcdir)/md5c.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)/NEWS $(srcdir)/README \
269         $(srcdir)/README.NTLM $(srcdir)/fetchmail.lsm \
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
274 scripts = $(srcdir)/install.sh $(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         ls -l fetchmail-$(VERSION).tar.gz
316         @echo "Don't forget to build RPMs from root!"
317
318 fetchmail-$(VERSION).tar.gz: $(all)
319         (cd ..; ln -sf fetchmail fetchmail-$(VERSION))
320         (cd ..; tar -czf fetchmail-$(VERSION).tar.gz `sed <fetchmail-$(VERSION)/MANIFEST s:^:fetchmail-$(VERSION)/:`)
321         mv -f ../fetchmail-$(VERSION).tar.gz .
322         rm ../fetchmail-$(VERSION)
323
324 # Make RPMs.  You need to be root to make this work
325 RPMROOT=/usr/src/redhat
326 RPM = rpm
327 RPMFLAGS = -ba
328 rpm: dist
329         cp fetchmail-$(VERSION).tar.gz fetchmail.xpm $(RPMROOT)/SOURCES;
330         $(srcdir)/specgen.sh $(VERSION) >$(RPMROOT)/SPECS/fetchmail.spec
331         cd $(RPMROOT)/SPECS; $(RPM) $(RPMFLAGS) fetchmail.spec  
332         cp $(RPMROOT)/RPMS/`arch|sed 's/i[4-9]86/i386/'`/fetchmail*-$(VERSION)*.rpm $(srcdir)
333         cp $(RPMROOT)/SRPMS/fetchmail*-$(VERSION)*.src.rpm $(srcdir)
334
335 # The following sets edit modes for GNU EMACS.
336 # Local Variables:
337 # compile-command:"configure"
338 # End:
339
340 # Automatically generated dependencies will be put at the end of the makefile.