Fix the test for sasl.h to look in the correct place.
[mmh] / Makefile.in
1 #
2 # Makefile for top level of nmh distribution
3 #
4 # $Id$
5 #
6
7 # nmh version
8 VERSION = @VERSION@
9
10 SHELL = /bin/sh
11 @SET_MAKE@
12
13 srcdir = @srcdir@
14 VPATH  = @srcdir@
15
16 # ========== USER CONFIGURATION SECTION ==========
17 #
18 # If `make' is executed in the directory containing this Makefile,
19 # any changes made in this section will override the values of
20 # these parameters in makefiles in any of the subdirectories.
21
22 prefix      = @prefix@
23 exec_prefix = @exec_prefix@
24
25 # location of standard commands
26 bindir      = @bindir@
27
28 # location of support binaries and scripts
29 libdir      = @libdir@
30
31 # location of nmh configuration and formats files
32 etcdir      = @sysconfdir@
33
34 # location of man pages
35 mandir      = @mandir@
36
37 # location of incoming mail
38 mailspool   = @mailspool@
39
40 # location of mail transport agent
41 sendmailpath = @sendmailpath@
42
43 # default editor
44 default_editor = @editorpath@
45
46 # default pager
47 default_pager = @pagerpath@
48
49 CC       = @CC@
50 CPPFLAGS = @CPPFLAGS@
51 DEFS     = @DEFS@ @OURDEFS@
52 CFLAGS   = @CFLAGS@
53 LDFLAGS  = @LDFLAGS@
54 LIBS     = @LIBS@
55
56 # ========== YOU SHOULDN'T HAVE TO CHANGE ANYTHING BELOW HERE ==========
57
58 # flags passed to recursive makes in subdirectories
59 MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
60 CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
61 prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
62 etcdir='$(etcdir)' libdir='$(libdir)' mandir='$(mandir)' \
63 mailspool='$(mailspool)' sendmailpath='$(sendmailpath)' \
64 default_editor='$(default_editor)' default_pager='$(default_pager)'
65
66 INSTALL         = @INSTALL@
67 INSTALL_PROGRAM = @INSTALL_PROGRAM@
68 INSTALL_DATA    = @INSTALL_DATA@
69
70 .SUFFIXES:
71
72 # all files in this directory included in the distribution
73 DIST = ChangeLog COPYRIGHT DATE INSTALL MACHINES README VERSION         \
74         ChangeLog install-sh mkinstalldirs Makefile.in aclocal.m4       \
75         acconfig.h config.h.in configure.in configure stamp-h.in        \
76         config.sub config.guess
77
78 # subdirectories in distribution
79 SUBDIRS = h config sbr mts uip etc man docs
80
81 # ========== DEPENDENCIES FOR BUILDING AND INSTALLING ==========
82
83 # default target
84 all: config.h Makefile all-recursive
85
86 all-recursive:
87         for subdir in $(SUBDIRS); do \
88           (cd $$subdir && $(MAKE) $(MAKEDEFS) all) || exit 1; \
89         done
90
91 install: all
92         for subdir in $(SUBDIRS); do \
93           (cd $$subdir && $(MAKE) $(MAKEDEFS) $@) || exit 1; \
94         done
95
96 uninstall:
97         for subdir in $(SUBDIRS); do \
98           (cd $$subdir && $(MAKE) $(MAKEDEFS) $@) || exit 1; \
99         done
100
101 # ========== DEPENDENCIES FOR CLEANUP ==========
102
103 mostlyclean: mostlyclean-recursive mostlyclean-local
104 clean:       clean-recursive       clean-local
105 distclean:   distclean-recursive   distclean-local
106 realclean:   realclean-recursive   realclean-local
107 superclean:  superclean-recursive  superclean-local
108
109 mostlyclean-local:
110         rm -f *~
111
112 clean-local: mostlyclean-local
113
114 distclean-local: clean-local
115         rm -f Makefile config.h config.status config.log config.cache stamp-h distname
116
117 realclean-local: distclean-local
118
119 superclean-local: realclean-local
120         cd $(srcdir) && rm -f config.h.in stamp-h.in configure
121
122 mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive superclean-recursive:
123         for subdir in $(SUBDIRS); do \
124           target=`echo $@ | sed 's/-recursive//'`; \
125           (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
126         done
127
128 # ========== DEPENDENCIES FOR MAINTENANCE ==========
129
130 lint:
131         for subdir in $(SUBDIRS); do \
132           ( cd $$subdir && $(MAKE) $(MAKEDEFS) lint ) || exit 1; \
133         done
134
135 # ========== DEPENDENCIES FOR MAINTENANCE ==========
136
137 Makefile: Makefile.in config.status
138         ./config.status $@
139
140 config.status: configure VERSION
141         ./config.status --recheck
142
143 configure: configure.in aclocal.m4
144         cd $(srcdir) && autoconf
145
146 config.h: stamp-h
147 stamp-h: config.h.in config.status
148         ./config.status config.h stamp
149
150 config.h.in: stamp-h.in
151 stamp-h.in: configure.in acconfig.h aclocal.m4
152         cd $(srcdir) && autoheader
153         date > $@
154
155 # rebuild all autoconf files
156 reset:
157         cd $(srcdir) && autoheader
158         cd $(srcdir) && autoconf
159         cd $(srcdir) && date > stamp-h.in
160
161 # name of new nmh distribution tar file
162 tarfile = nmh-$(VERSION).tar.gz
163
164 # ftp directory location
165 ftpdir = /ftp/nmh
166
167 # file containing name of new nmh distribution
168 distname:
169         @echo nmh-$(VERSION) > distname
170
171 # build nmh distribution
172 distdir = `cat distname`
173 nmhdist: $(DIST) distname
174         @echo "Begin building nmh-$(VERSION) distribution"
175         rm -rf $(distdir)
176         mkdir $(distdir)
177         @chmod 755 $(distdir)
178         @echo "Copying distribution files in main directory"
179         @for file in $(DIST); do \
180           cp -p $(srcdir)/$$file $(distdir); \
181         done
182         @for subdir in $(SUBDIRS); do \
183           mkdir $(distdir)/$$subdir; \
184           chmod 755 $(distdir)/$$subdir; \
185           (cd $$subdir && $(MAKE) $@) || exit 1; \
186         done
187         chmod -R a+r $(distdir)
188         tar chf - $(distdir) | gzip -c > $(tarfile)
189         rm -rf $(distdir) distname
190         @echo "Done building nmh-$(VERSION) distribution"
191
192 # release a new nmh distribution into ftp directory
193 nmhrelease:
194         rm -f $(ftpdir)/$(tarfile)
195         rm -f $(ftpdir)/nmh.tar.gz
196         mv $(tarfile) $(ftpdir)/$(tarfile)
197         cd $(ftpdir) && ln -s $(tarfile) nmh.tar.gz
198         cd $(ftpdir) && md5sum *.gz > MD5SUM
199