X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=Makefile.in;h=465beda0daf5aa212d56c6f3b61cdf32f9e0828e;hp=83af4c2470b516c1536b1e2ea6396f15165fe60b;hb=6e9577f324bef90765a5edc02044eb111ec48072;hpb=5faf465b84082afa8bb85ce6fe87ce6675749675 diff --git a/Makefile.in b/Makefile.in index 83af4c2..465beda 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2,15 +2,15 @@ # Makefile for top level of mmh distribution # -# mmh version -VERSION = @VERSION@ - SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ VPATH = @srcdir@ +# mmh version +VERSION = `sed q $(srcdir)/VERSION` + # ========== USER CONFIGURATION SECTION ========== # # If `make' is executed in the directory containing this Makefile, @@ -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"