]> Pileus Git - ~andy/fetchmail/blob - Makefile.in
Remove some dependencies on the name of the rc file.
[~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=1.0
7
8 # Ultrix 2.2 make doesn't expand the value of VPATH.
9 srcdir = @srcdir@
10 VPATH = @srcdir@
11
12 CC = @CC@
13
14 CFLAGS = @CFLAGS@
15 # CFLAGS =  -g2 -5      # QNX
16 LDFLAGS = @LDFLAGS@
17 # LDLAGS =  -g2 -5      # QNX
18 LEX = @LEX@
19 LEXFLAGS=
20 YACC = @YACC@
21 YACCFLAGS = -dt
22
23 # How to invoke ranlib.  This is only used by the `glob' subdirectory.
24 RANLIB = @RANLIB@
25
26 # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
27 # See also `config.h'.
28 defines = @DEFS@
29 # defines = -DHAVE_CONFIG_H -DQNX -DHAVE_UNISTD_H -DSTDC_HEADERS        # QNX
30
31 # If your system needs extra libraries loaded in, define them here.
32 LOADLIBS = @LIBS@ @LEXLIB@
33 # LOADLIBS = -lsocket3r -lunix3r        # QNX
34
35 # Any extra object files your system needs.
36 extras = @LIBOBJS@
37
38 # Extra sources/objects for library functions not provided on the host system.
39 EXTRASRC = @EXTRASRC@
40 EXTRAOBJ = @EXTRAOBJ@
41
42 # Common prefix for machine-independent installed files.
43 prefix = /usr/local
44 # Common prefix for machine-dependent installed files.
45 exec_prefix = $(prefix)
46
47 # Name under which to install fetchmail
48 instname = fetchmail
49 # Directory in which to install.
50 bindir = $(exec_prefix)/bin
51 # Directory to install the Info files in.
52 infodir = $(prefix)/info
53 # Number to put on the man page filename.
54 manext = 1
55 # Directory to install the man page in.
56 mandir = $(prefix)/man/man$(manext)
57
58 # Program to install `make'.
59 INSTALL_PROGRAM = @INSTALL_PROGRAM@
60 # Program to install the man page.
61 INSTALL_DATA = @INSTALL_DATA@
62 # Generic install program.
63 INSTALL = @INSTALL@
64
65 # Program to format Texinfo source into Info files.
66 MAKEINFO = makeinfo
67 # Program to format Texinfo source into DVI files.
68 TEXI2DVI = texi2dvi
69
70 # Programs to make tags files.
71 ETAGS = etags -tw
72 CTAGS = ctags -tw
73
74 popobjs = socket.o getpass.o pop2.o pop3.o imap.o fetchmail.o options.o \
75        rcfile_l.o rcfile_y.o rcfile.o daemon.o driver.o smtp.o xmalloc.o
76
77 objs = $(popobjs) $(EXTRAOBJ) $(extras)
78
79 srcs = $(srcdir)/socket.c $(srcdir)/getpass.c $(srcdir)/pop2.c          \
80        $(srcdir)/pop3.c $(srcdir)/imap.c $(srcdir)/fetchmail.c          \
81        $(srcdir)/options.c $(srcdir)/rcfile.c $(srcdir)/daemon.c        \
82        $(srcdir)/driver.c $(srcdir)/smtp.c $(srcdir)/xmalloc.c $(EXTRASRC)
83
84 .SUFFIXES:
85 .SUFFIXES: .o .c .h .y .l .ps .dvi .info .texi
86
87 all: fetchmail
88 check: # No tests.
89 depend:
90         test -f config.h || touch config.h
91         test -f rcfile_y.h || touch rcfile_y.h
92         makedepend -fMakefile.in *.c
93
94 # Some makes apparently use .PHONY as the default goal is it is before `all'.
95 .PHONY: all check
96
97 $(popobjs): fetchmail.h
98
99 fetchmail: $(srcdir)/rcfile_l.c $(srcdir)/rcfile_y.c $(objs)
100         $(CC) $(LDFLAGS) $(objs) $(LOADLIBS) -o fetchmail
101
102
103 # -I. is needed to find config.h in the build directory.
104 .c.o:
105         $(CC) $(defines) -c -I. -I$(srcdir) $(CFLAGS) $< $(OUTPUT_OPTION)
106
107 # lex rule
108 .l.o:
109
110 .l.c:
111         $(LEX) $(LEXFLAGS) $<
112         mv lex.yy.c $@
113
114 # yacc rule
115 .y.o:
116
117 .y.c:
118         $(YACC) $(YACCFLAGS) $<
119         mv y.tab.c $@
120         mv -f y.tab.h $*.h
121
122 # For some losing Unix makes.
123 SHELL = /bin/sh
124 MAKE = make
125
126 FORCE:
127
128 tagsrcs = $(srcs) $(srcdir)/rcfile_l.c $(srcdir)/rcfile_y.c
129 TAGS: $(tagsrcs)
130         $(ETAGS) $(tagsrcs)
131 tags: $(tagsrcs)
132         $(CTAGS) $(tagsrcs)
133
134 .PHONY: install installdirs
135 install: installdirs \
136          $(bindir)/$(instname) # $(infodir)/fetchmail.info \
137          $(mandir)/$(instname).$(manext)
138
139 installdirs:
140         $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir)
141
142 $(bindir)/$(instname): fetchmail
143         $(INSTALL_PROGRAM) fetchmail $@
144
145 $(infodir)/fetchmail.info: fetchmail.info
146         if [ -r ./fetchmail.info ]; then dir=.; else dir=$(srcdir); fi; \
147         for file in $${dir}/fetchmail.info*; do \
148           name="`basename $$file`"; \
149           $(INSTALL_DATA) $$file \
150             `echo $@ | sed "s,fetchmail.info\$$,$$name,"`; \
151         done
152 # Run install-info only if it exists.
153 # Use `if' instead of just prepending `-' to the
154 # line so we notice real errors from install-info.
155 # We use `$(SHELL) -c' because some shells do not
156 # fail gracefully when there is an unknown command.
157         if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
158           install-info --infodir=$(infodir) $$dir/fetchmail.info; \
159         else true; fi
160
161 $(mandir)/$(instname).$(manext): fetchmail.man
162         $(INSTALL_DATA) $(srcdir)/fetchmail.man $@
163
164
165 .PHONY: clean realclean distclean mostlyclean
166 clean: 
167         -rm -f fetchmail *.o core fetchmail.dvi \
168                rcfile_l.c rcfile_y.h rcfile_y.c fetchmail.tar fetchmail.tar.gz
169
170 distclean: clean 
171         -rm -f Makefile config.h
172         -rm -f config.cache config.status config.log stamp-config
173         -rm -f TAGS tags
174         -rm -f fetchmail.log fetchmail.toc fetchmail.*aux
175
176 realclean: fetchmail.info* distclean
177
178 mostlyclean: clean
179
180 Makefile: config.status $(srcdir)/Makefile.in
181         $(SHELL) config.status
182
183 config.h: stamp-config 
184
185 stamp-config: config.status $(srcdir)/config.h.in
186         $(SHELL) config.status
187         touch stamp-config
188
189 configure: configure.in
190         autoconf $(ACFLAGS)
191
192 # This tells versions [3.59,3.63) of GNU make not to export all variables.
193 .NOEXPORT:
194
195
196 # Special dependencies, not easily handled without explicit rules
197 $(srcdir)/rcfile_l.c: $(srcdir)/rcfile_l.l
198 $(srcdir)/rcfile_y.c: $(srcdir)/rcfile_y.y
199
200 parser = $(srcdir)/rcfile_l.l $(srcdir)/rcfile_y.y
201 headers = $(srcdir)/fetchmail.h $(srcdir)/socket.h $(srcdir)/poproto.h \
202         $(srcdir)/smtp.h
203 extra = $(srcdir)/alloca.c $(srcdir)/bzero.[ch] $(srcdir)/errorcodes \
204         $(srcdir)/getopt.[ch] $(srcdir)/getopt1.c $(srcdir)/md5*.[ch] \
205         $(srcdir)/strcasecmp.c $(srcdir)/strdup.c
206 docs = $(srcdir)/COPYING $(srcdir)/README $(srcdir)/INSTALL $(srcdir)/NEWS \
207         $(srcdir)/fetchmail.lsm $(srcdir)/RFC/*.txt \
208         $(srcdir)/*.man $(srcdir)/sample.rcfile
209 config = $(srcdir)/Makefile.in $(srcdir)/configure.in $(srcdir)/configure \
210         $(srcdir)/config.guess $(srcdir)/config.h.in $(srcdir)/config.sub
211 scripts = $(srcdir)/install.sh $(srcdir)/mkinstalldirs
212 all = $(docs) $(config) $(srcs) $(parser) $(headers) $(extra) $(scripts) MANIFEST
213
214 manifest: $(all)
215         @echo $(all) | tr "[ \t]" '\n' | sort | sed "s/\\./fetchmail-$(VERS)/"
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 # The automatically generated dependencies below may omit config.h
224 # because it is included with ``#include <config.h>'' rather than
225 # ``#include "config.h"''.  So we add the explicit dependency to make sure.
226 $(objs): config.h
227
228 # Automatically generated dependencies will be put at the end of the file.