]> diplodocus.org Git - nmh/blob - mts/Makefile.in
Fix stupid accidental dependence on a bash quirk in previous
[nmh] / mts / Makefile.in
1 #
2 # Makefile for mts subdirectory
3 #
4 # $Id$
5 #
6
7 SHELL = /bin/sh
8
9 srcdir = @srcdir@
10 VPATH = @srcdir@
11
12 # flags passed to recursive makes in subdirectories
13 MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
14 CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
15 prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
16 etcdir='$(etcdir)' libdir='$(libdir)' mandir='$(mandir)' \
17 mailspool='$(mailspool)' sendmailpath='$(sendmailpath)' \
18 default_editor='$(default_editor)' default_pager='$(default_pager)'
19
20 LORDER = @LORDER@
21 TSORT = @TSORT@
22 RANLIB = @RANLIB@
23 LIBTOOL = @LIBTOOL@
24 GNU_LIBTOOL = @GNU_LIBTOOL@
25
26 # object files that go into libmts.a
27 OBJS = smtp/hosts.o smtp/smtp.o
28
29 # auxiliary files
30 AUX = Makefile.in
31
32 # all files in this directory included in the distribution
33 DIST = $(AUX)
34
35 # subdirectories
36 SUBDIRS = smtp
37
38 # mail transport agent we are using (currently always smtp)
39 # MTS = smtp
40 # DEPRECATED: smtp/sendmail functionality handled by mts.conf
41
42 # ========= DEPENDENCIES FOR BUILDING AND INSTALLING ==========
43
44 all: all-recursive libmts.a
45
46 all-recursive:
47 for subdir in $(SUBDIRS); do \
48 (cd $$subdir && $(MAKE) $(MAKEDEFS) all) || exit 1; \
49 done
50
51 libmts.a: $(OBJS)
52 rm -f $@
53 if test x$(LIBTOOL) != x -a x$(GNU_LIBTOOL) = x ; then \
54 $(LIBTOOL) -static -c $(OBJS) -o $@ ; \
55 else \
56 ar cr $@ `$(LORDER) $(OBJS) | $(TSORT)` ; \
57 $(RANLIB) $@ ; \
58 fi
59
60 install uninstall:
61
62 # ========== DEPENDENCIES FOR CLEANUP ==========
63
64 mostlyclean: mostlyclean-recursive mostlyclean-local
65 clean: clean-recursive clean-local
66 distclean: distclean-recursive distclean-local
67 realclean: realclean-recursive realclean-local
68 superclean: superclean-recursive superclean-local
69
70 mostlyclean-local:
71 rm -f *~
72
73 clean-local: mostlyclean-local
74 rm -f libmts.a
75 distclean-local: clean-local
76 rm -f Makefile
77
78 realclean-local: distclean-local
79
80 superclean-local: realclean-local
81
82 mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive superclean-recursive:
83 for subdir in $(SUBDIRS); do \
84 target=`echo $@ | sed 's/-recursive//'`; \
85 (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
86 done
87
88 # ========== DEPENDENCIES FOR LINT =================
89
90 lint:
91 for subdir in $(SUBDIRS); do \
92 ( cd $$subdir && $(MAKE) $(MAKEDEFS) lint ) || exit 1; \
93 done
94
95 # ========== DEPENDENCIES FOR MAINTENANCE ==========
96
97 subdir = mts
98
99 Makefile: Makefile.in ../config.status
100 cd .. && ./config.status $(subdir)/$@
101
102 distdir = ../`cat ../distname`/$(subdir)
103 nmhdist: $(DIST)
104 @echo "Copying distribution files in $(subdir)"
105 @for file in $(DIST); do \
106 cp -p $(srcdir)/$$file $(distdir); \
107 done
108 @for subdir in $(SUBDIRS); do \
109 mkdir $(distdir)/$$subdir; \
110 chmod 755 $(distdir)/$$subdir; \
111 (cd $$subdir && $(MAKE) $@) || exit 1; \
112 done
113