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