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