2 # Makefile for uip subdirectory
7 top_srcdir = @top_srcdir@
12 exec_prefix = @exec_prefix@
20 INCLUDES = -I$(srcdir) -I$(top_srcdir) @CPPFLAGS@
24 LOCALLIBS = ../config/version.o ../config/config.o ../sbr/libmh.a
25 LINKLIBS = $(LOCALLIBS) $(LIBS)
28 LINTFLAGS = @LINTFLAGS@
33 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
34 LINK = $(CC) $(LDFLAGS) -o $@
38 INSTALL_PROGRAM = @INSTALL_PROGRAM@
40 MAIL_SPOOL_GRP = @MAIL_SPOOL_GRP@
41 SETGID_MAIL = @SETGID_MAIL@
50 CMDS = ali anno burst comp dist flist folder forw mmh mark \
52 mhlist mhmail mhparam mhpath mhshow mhstore msgchk new packf pick \
53 print-mimetype prompter rcvdist rcvpack rcvstore refile repl rmf \
54 rmm scan send sendfiles show slocal sortm spost whatnow
56 # commands that are links to other commands
57 LCMDS = flists folders next prev fnext fprev unseen
59 # misc support binaries
60 MISC = ap dp fmtdump mhtest mmhwrap
62 # commands with 'S'pecial installation needs
66 SRCS = ali.c aliasbr.c anno.c ap.c burst.c comp.c \
67 dist.c distsbr.c dp.c dropsbr.c flist.c fmtdump.c \
68 folder.c forw.c inc.c mark.c mmh.sh mmhwrap.sh md5.c mhbuild.c \
69 mhcachesbr.c mhfree.c mhl.c mhlist.c mhlistsbr.c \
70 mhmail.c mhmisc.c mhoutsbr.c mhparam.c mhparse.c \
71 mhpath.c mhshow.c mhshowsbr.c mhstore.c mhtest.c \
72 msgchk.c new.c packf.c pick.c print-mimetype.sh \
73 prompter.c rcvdist.c rcvpack.c rcvstore.c \
74 refile.c repl.c rmf.c rmm.c scan.c scansbr.c send.c \
75 sendfiles.sh show.c slocal.c sortm.c spost.c termsbr.c \
76 whatnow.c whatnowproc.c
81 # all files in this directory included in the distribution
84 # ========== DEFAULT TARGET ==========
86 all: $(CMDS) $(MISC) $(SCMDS)
88 # ========= DEPENDENCIES FOR BUILDING ==========
90 ali: ali.o aliasbr.o $(LOCALLIBS)
91 $(LINK) ali.o aliasbr.o $(LINKLIBS)
94 $(LINK) ap.o $(LINKLIBS)
96 anno: anno.o $(LOCALLIBS)
97 $(LINK) anno.o $(LINKLIBS)
99 burst: burst.o $(LOCALLIBS)
100 $(LINK) burst.o $(LINKLIBS)
102 comp: comp.o whatnowproc.o $(LOCALLIBS)
103 $(LINK) comp.o whatnowproc.o $(LINKLIBS)
105 dist: dist.o whatnowproc.o $(LOCALLIBS)
106 $(LINK) dist.o whatnowproc.o $(LINKLIBS)
108 dp: dp.o $(LOCALLIBS)
109 $(LINK) dp.o $(LINKLIBS)
111 flist: flist.o $(LOCALLIBS)
112 $(LINK) flist.o $(LINKLIBS)
114 fmtdump: fmtdump.o $(LOCALLIBS)
115 $(LINK) fmtdump.o $(LINKLIBS)
117 folder: folder.o $(LOCALLIBS)
118 $(LINK) folder.o $(LINKLIBS)
120 forw: forw.o whatnowproc.o $(LOCALLIBS)
121 $(LINK) forw.o whatnowproc.o $(LINKLIBS)
123 inc: inc.o scansbr.o termsbr.o $(LOCALLIBS)
124 $(LINK) inc.o scansbr.o termsbr.o $(LINKLIBS) $(TERMLIB)
126 mark: mark.o $(LOCALLIBS)
127 $(LINK) mark.o $(LINKLIBS)
130 cp $(srcdir)/mmh.sh mmh
134 sed "s,%bindir%,"$(bindir)"," $(srcdir)/mmhwrap.sh >mmhwrap
137 mhbuild: mhbuild.o mhcachesbr.o mhlistsbr.o mhoutsbr.o mhmisc.o mhfree.o mhparse.o termsbr.o md5.o $(LOCALLIBS)
138 $(LINK) mhbuild.o mhcachesbr.o mhlistsbr.o mhoutsbr.o mhmisc.o mhfree.o mhparse.o md5.o $(LINKLIBS) $(TERMLIB)
140 mhl: mhl.o termsbr.o $(LOCALLIBS)
141 $(LINK) mhl.o termsbr.o $(LINKLIBS) $(TERMLIB)
143 mhlist: mhlist.o mhparse.o mhcachesbr.o mhlistsbr.o mhmisc.o mhfree.o termsbr.o md5.o $(LOCALLIBS)
144 $(LINK) mhlist.o mhparse.o mhcachesbr.o mhlistsbr.o mhmisc.o mhfree.o termsbr.o md5.o $(LINKLIBS) $(TERMLIB)
146 mhmail: mhmail.o $(LOCALLIBS)
147 $(LINK) mhmail.o $(LINKLIBS)
149 mhparam: mhparam.o $(LOCALLIBS)
150 $(LINK) mhparam.o $(LINKLIBS)
152 mhpath: mhpath.o $(LOCALLIBS)
153 $(LINK) mhpath.o $(LINKLIBS)
155 mhshow: mhshow.o mhparse.o mhcachesbr.o mhshowsbr.o mhlistsbr.o mhmisc.o mhfree.o termsbr.o md5.o $(LOCALLIBS)
156 $(LINK) mhshow.o mhparse.o mhcachesbr.o mhshowsbr.o mhlistsbr.o mhmisc.o mhfree.o termsbr.o md5.o $(LINKLIBS) $(TERMLIB)
158 mhstore: mhstore.o mhparse.o mhcachesbr.o mhshowsbr.o mhlistsbr.o mhmisc.o mhfree.o termsbr.o md5.o $(LOCALLIBS)
159 $(LINK) mhstore.o mhparse.o mhcachesbr.o mhshowsbr.o mhlistsbr.o mhmisc.o mhfree.o termsbr.o md5.o $(LINKLIBS) $(TERMLIB)
161 mhtest: mhtest.o mhparse.o mhcachesbr.o mhoutsbr.o mhmisc.o mhfree.o termsbr.o md5.o $(LOCALLIBS)
162 $(LINK) mhtest.o mhparse.o mhcachesbr.o mhoutsbr.o mhmisc.o mhfree.o termsbr.o md5.o $(LINKLIBS) $(TERMLIB)
164 msgchk: msgchk.o $(LOCALLIBS)
165 $(LINK) msgchk.o $(LINKLIBS)
167 new: new.o $(LOCALLIBS)
168 $(LINK) new.o $(LINKLIBS)
170 packf: packf.o dropsbr.o $(LOCALLIBS)
171 $(LINK) packf.o dropsbr.o $(LINKLIBS)
173 pick: pick.o $(LOCALLIBS)
174 $(LINK) pick.o $(LINKLIBS)
176 print-mimetype: print-mimetype.sh
177 cp $(srcdir)/print-mimetype.sh print-mimetype
178 chmod +x print-mimetype
180 prompter: prompter.o $(LOCALLIBS)
181 $(LINK) prompter.o $(LINKLIBS)
183 rcvdist: rcvdist.o distsbr.o $(LOCALLIBS)
184 $(LINK) rcvdist.o distsbr.o $(LINKLIBS)
186 rcvpack: rcvpack.o dropsbr.o $(LOCALLIBS)
187 $(LINK) rcvpack.o dropsbr.o $(LINKLIBS)
189 rcvstore: rcvstore.o $(LOCALLIBS)
190 $(LINK) rcvstore.o $(LINKLIBS)
192 refile: refile.o $(LOCALLIBS)
193 $(LINK) refile.o $(LINKLIBS)
195 repl: repl.o whatnowproc.o $(LOCALLIBS)
196 $(LINK) repl.o whatnowproc.o $(LINKLIBS)
198 rmf: rmf.o $(LOCALLIBS)
199 $(LINK) rmf.o $(LINKLIBS)
201 rmm: rmm.o $(LOCALLIBS)
202 $(LINK) rmm.o $(LINKLIBS)
204 scan: scan.o scansbr.o termsbr.o $(LOCALLIBS)
205 $(LINK) scan.o scansbr.o termsbr.o $(LINKLIBS) $(TERMLIB)
207 send: send.o distsbr.o $(LOCALLIBS)
208 $(LINK) send.o distsbr.o $(LINKLIBS)
210 sendfiles: sendfiles.sh
211 cp $(srcdir)/sendfiles.sh sendfiles
214 show: show.o $(LOCALLIBS)
215 $(LINK) show.o $(LINKLIBS)
217 slocal: slocal.o $(LOCALLIBS)
218 $(LINK) slocal.o $(LINKLIBS)
220 sortm: sortm.o $(LOCALLIBS)
221 $(LINK) sortm.o $(LINKLIBS)
223 spost: spost.o aliasbr.o $(LOCALLIBS)
224 $(LINK) spost.o aliasbr.o $(LINKLIBS)
226 whatnow: whatnow.o $(LOCALLIBS)
227 $(LINK) whatnow.o $(LINKLIBS)
229 # ========== DEPENDENCIES FOR INSTALLING ==========
232 install: install-cmds install-misc install-lcmds install-scmds
236 mkdir -p $(DESTDIR)$(bindir)
237 for cmd in $(CMDS); do \
238 $(INSTALL_PROGRAM) $$cmd $(DESTDIR)$(bindir)/$$cmd; \
243 rm -f $(DESTDIR)$(bindir)/flists
244 rm -f $(DESTDIR)$(bindir)/folders
245 rm -f $(DESTDIR)$(bindir)/fnext
246 rm -f $(DESTDIR)$(bindir)/fprev
247 rm -f $(DESTDIR)$(bindir)/unseen
248 rm -f $(DESTDIR)$(bindir)/prev
249 rm -f $(DESTDIR)$(bindir)/next
250 $(LN) $(DESTDIR)$(bindir)/flist $(DESTDIR)$(bindir)/flists
251 $(LN) $(DESTDIR)$(bindir)/folder $(DESTDIR)$(bindir)/folders
252 $(LN) $(DESTDIR)$(bindir)/new $(DESTDIR)$(bindir)/fnext
253 $(LN) $(DESTDIR)$(bindir)/new $(DESTDIR)$(bindir)/fprev
254 $(LN) $(DESTDIR)$(bindir)/new $(DESTDIR)$(bindir)/unseen
255 $(LN) $(DESTDIR)$(bindir)/show $(DESTDIR)$(bindir)/prev
256 $(LN) $(DESTDIR)$(bindir)/show $(DESTDIR)$(bindir)/next
258 # install misc support binaries
260 mkdir -p $(DESTDIR)$(libdir)
261 for misc in $(MISC); do \
262 $(INSTALL_PROGRAM) $$misc $(DESTDIR)$(libdir)/$$misc; \
265 # install commands with special installation needs (thus no $(SCMDS) use here)
267 if test x$(SETGID_MAIL) != x; then \
268 $(INSTALL_PROGRAM) -g $(MAIL_SPOOL_GRP) -m 2755 inc $(DESTDIR)$(bindir)/$$cmd; \
270 $(INSTALL_PROGRAM) inc $(DESTDIR)$(bindir)/$$cmd; \
274 for cmd in $(CMDS); do \
275 rm -f $(DESTDIR)$(bindir)/$$cmd; \
277 for lcmd in $(LCMDS); do \
278 rm -f $(DESTDIR)$(bindir)/$$lcmd; \
280 for misc in $(MISC); do \
281 rm -f $(DESTDIR)$(libdir)/$$misc; \
283 for cmd in $(SCMDS); do \
284 rm -f $(DESTDIR)$(bindir)/$$cmd; \
287 # ========== DEPENDENCIES FOR CLEANUP ==========
293 rm -f $(CMDS) $(MISC) $(SCMDS)
300 superclean: realclean
302 # ========== DEPENDENCIES FOR LINT ================
305 $(LINT) $(LINTFLAGS) $(INCLUDES) $(DEFS) $(SRCS)
307 # ========== DEPENDENCIES FOR MAINTENANCE ==========
311 Makefile: Makefile.in ../config.status
312 cd .. && ./config.status $(subdir)/$@
314 distdir = ../`cat ../distname`/$(subdir)
316 @echo "Copying distribution files in $(subdir)"
317 @for file in $(DIST); do \
318 cp -p $(srcdir)/$$file $(distdir); \