]> Pileus Git - ~andy/fetchmail/blob - Makefile.in
Typo fix.
[~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.6
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 # EXTRAOBJ = 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 etrn.o fetchmail.o  \
81        options.o rcfile_l.o rcfile_y.o daemon.o smtp.o driver.o rfc822.o  \
82        xmalloc.o 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)/etrn.c               \
88        $(srcdir)/fetchmail.c $(srcdir)/options.c $(srcdir)/daemon.c     \
89        $(srcdir)/driver.c $(srcdir)/rfc822.c $(srcdir)/smtp.c           \
90        $(srcdir)/xmalloc.c $(srcdir)/uid.c $(srcdir)/mxget.c            \
91        $(srcdir)/md5c.c $(srcdir)/md5ify.c $(srcdir)/interface.c        \
92        $(srcdir)/netrc.c $(srcdir)/error.c
93
94 .SUFFIXES:
95 .SUFFIXES: .o .c .h .y .l .ps .dvi .info .texi
96
97 all: fetchmail
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 # Tester for address parsing
108 rfc822: rfc822.c
109         gcc -DTESTMAIN -g rfc822.c -o rfc822
110
111 # -I. is needed to find config.h in the build directory.
112 .c.o:
113         $(CC) $(defines) -c -I. -I$(srcdir) $(CFLAGS) $< $(OUTPUT_OPTION)
114
115 # lex rule
116 .l.o:
117
118 .l.c:
119         $(LEX) $(LEXFLAGS) $<
120         mv lex.yy.c $@
121
122 # yacc rule
123 .y.o:
124
125 .y.c:
126         $(YACC) $(YACCFLAGS) $<
127         mv y.tab.c $@
128         mv -f y.tab.h $*.h
129
130 # For some losing Unix makes.
131 SHELL = /bin/sh
132 MAKE = make
133
134 FORCE:
135
136 tagsrcs = $(srcs) $(srcdir)/rcfile_l.c $(srcdir)/rcfile_y.c
137 TAGS: $(tagsrcs)
138         $(ETAGS) $(tagsrcs)
139 tags: $(tagsrcs)
140         $(CTAGS) $(tagsrcs)
141
142 .PHONY: install installdirs
143 install: installdirs $(bindir)/$(instname) $(mandir)/$(instname).$(manext)
144
145 installdirs:
146         $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(mandir)
147
148 $(bindir)/$(instname): fetchmail
149         $(INSTALL_PROGRAM) fetchmail $@
150
151 $(mandir)/$(instname).$(manext): fetchmail.man
152         $(INSTALL_DATA) $(srcdir)/fetchmail.man $@
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
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 # Special dependencies, not easily handled without explicit rules
192 $(srcdir)/rcfile_l.c: $(srcdir)/rcfile_l.l
193 $(srcdir)/rcfile_y.c: $(srcdir)/rcfile_y.y
194
195 parser = $(srcdir)/rcfile_l.l $(srcdir)/rcfile_y.y
196 headers = $(srcdir)/fetchmail.h $(srcdir)/socket.h $(srcdir)/smtp.h \
197         $(srcdir)/mx.h $(srcdir)/md5.h $(srcdir)/md5global.h \
198         $(srcdir)/netrc.h $(srcdir)/tunable.h
199 extra = $(srcdir)/alloca.c $(srcdir)/getopt.[ch] $(srcdir)/getopt1.c \
200         $(srcdir)/strcasecmp.c
201 docs = $(srcdir)/COPYING $(srcdir)/README $(srcdir)/INSTALL $(srcdir)/NEWS \
202         $(srcdir)/NOTES $(srcdir)/fetchmail.lsm \
203         $(srcdir)/*.man $(srcdir)/sample.rcfile $(srcdir)/FAQ
204 config = $(srcdir)/Makefile.in $(srcdir)/configure.in $(srcdir)/configure \
205         $(srcdir)/config.guess $(srcdir)/config.h.in $(srcdir)/config.sub \
206         $(srcdir)/acconfig.h
207 scripts = $(srcdir)/install.sh $(srcdir)/mkinstalldirs $(srcdir)/specgen.sh
208 all = $(docs) $(config) $(srcs) $(parser) $(headers) $(extra) $(scripts) \
209         $(srcdir)/MANIFEST
210
211 MANIFEST: $(srcdir)
212         @echo $(all) | tr "[ \t]" '\n' | sort | sed "s/\\./fetchmail-$(VERS)/" >MANIFEST
213
214 dist: fetchmail-$(VERS).tar.gz
215         ls -l fetchmail-$(VERS).tar.gz
216
217 fetchmail-$(VERS).tar: $(all)
218         (cd ..; tar -cf fetchmail-$(VERS).tar `cat fetchmail-$(VERS)/MANIFEST`)
219         mv ../fetchmail-$(VERS).tar fetchmail-$(VERS).tar
220 fetchmail-$(VERS).tar.gz: fetchmail-$(VERS).tar
221         gzip -f fetchmail-$(VERS).tar
222
223 RPMROOT=/usr/src/redhat
224 RPM = rpm
225 RPMFLAGS = -ba
226 rpm: fetchmail-$(VERS).tar.gz
227         cp fetchmail-$(VERS).tar.gz $(RPMROOT)/SOURCES;
228         $(srcdir)/specgen.sh $(VERS) $(PL) >$(RPMROOT)/SPECS/fetchmail.spec
229         cd $(RPMROOT)/SPECS; $(RPM) $(RPMFLAGS) fetchmail.spec  
230
231 # The automatically generated dependencies below may omit config.h
232 # because it is included with ``#include <config.h>'' rather than
233 # ``#include "config.h"''.  So we add the explicit dependency to make sure.
234 $(objs): config.h
235
236 # Automatically generated dependencies will be put at the end of the makefile.
237 # DO NOT DELETE THIS LINE -- make depend depends on it.