Fix missing va_end call in uip/mhmisc.c
[mmh] / Makefile.in
index 83af4c2..f93359d 100644 (file)
@@ -63,16 +63,13 @@ INSTALL_DATA    = @INSTALL_DATA@
 
 .SUFFIXES:
 
-# all files in this directory included in the distribution
-DIST = COPYRIGHT DATE INSTALL README VERSION \
-       autogen.sh install-sh Makefile.in aclocal.m4 \
-       acconfig.h config.h.in configure.ac configure stamp-h.in \
-       config.sub config.guess
+# distribute all files that are under version control ...
+# ... plus (for convenience):
+DISTINCLUDE = config.h.in configure stamp-h.in sbr/dtimep.c ChangeLog
+# ... minus (git stuff):
+DISTEXCLUDE = .git .gitignore
 
-# these directories included in the distribution
-DISTDIRS = docs test
-
-# subdirectories in distribution
+# Subdirectories with own Makefiles
 SUBDIRS = h config sbr uip etc man
 
 # ========== DEPENDENCIES FOR BUILDING AND INSTALLING ==========
@@ -110,7 +107,7 @@ mostlyclean-local:
 clean-local: mostlyclean-local
 
 distclean-local: clean-local
-       rm -f Makefile config.h config.status config.log config.cache stamp-h distname
+       rm -f Makefile config.h config.status config.log config.cache stamp-h distname ChangeLog
 
 realclean-local: distclean-local
 
@@ -138,7 +135,7 @@ Makefile: Makefile.in config.status
 config.status: configure VERSION
        ./config.status --recheck
 
-configure: configure.ac aclocal.m4
+configure: configure.ac
        cd $(srcdir) && autoconf
 
 config.h: stamp-h
@@ -146,7 +143,7 @@ stamp-h: config.h.in config.status
        ./config.status config.h stamp
 
 config.h.in: stamp-h.in
-stamp-h.in: configure.ac acconfig.h aclocal.m4
+stamp-h.in: configure.ac
        cd $(srcdir) && autoheader
        date > $@
 
@@ -163,27 +160,29 @@ tarfile = mmh-$(VERSION).tar.gz
 distname:
        @echo mmh-$(VERSION) > distname
 
+# pre-generate this file so users don't need lex(1)
+sbr/dtimep.c:
+       @cd $(srcdir)/sbr && $(MAKE) dtimep.c
+
+ChangeLog:
+       @git whatchanged --format=fuller > $@
+
 # build mmh distribution
 distdir = `cat distname`
-mmhdist: $(DIST) distname
+mmhdist: $(DISTINCLUDE) distname
        @echo "Begin building mmh-$(VERSION) distribution"
-       rm -rf $(distdir)
-       mkdir $(distdir)
+       @rm -rf $(distdir)
+       @echo "Copying files to distribution directory"
+       @git clone $(srcdir) $(distdir)
        @chmod 755 $(distdir)
-       @echo "Copying distribution files in main directory"
-       @for file in $(DIST); do \
-         cp -p $(srcdir)/$$file $(distdir); \
-       done
-       @echo "Copying distribution dirs in main directory"
-       @for dir in $(DISTDIRS); do \
-         cp -rp $(srcdir)/$$dir $(distdir); \
+       @for file in $(DISTINCLUDE); do \
+         cp -p $(srcdir)/$$file $(distdir)/$$file; \
+         touch $(distdir)/$$file; \
        done
-       @for subdir in $(SUBDIRS); do \
-         mkdir $(distdir)/$$subdir; \
-         chmod 755 $(distdir)/$$subdir; \
-         (cd $$subdir && $(MAKE) $@) || exit 1; \
+       @for file in $(DISTEXCLUDE); do \
+         rm -rf $(distdir)/$$file; \
        done
-       chmod -R a+r $(distdir)
+       @chmod -R a+r $(distdir)
        tar chf - $(distdir) | gzip -c > $(tarfile)
-       rm -rf $(distdir) distname
+       @rm -rf $(distdir) distname
        @echo "Done building mmh-$(VERSION) distribution"