X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=Makefile.in;h=465beda0daf5aa212d56c6f3b61cdf32f9e0828e;hp=85dbf101a4ffe6f7c34d97f9f95ebd687c6c9f4c;hb=6e9577f324bef90765a5edc02044eb111ec48072;hpb=5d43a99db70c12a673028c7758c20cbe3e13ef5f diff --git a/Makefile.in b/Makefile.in index 85dbf10..465beda 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,16 +1,16 @@ # -# Makefile for top level of nmh distribution +# Makefile for top level of mmh distribution # -# nmh 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, @@ -26,9 +26,12 @@ bindir = @bindir@ # location of support binaries and scripts libdir = @libdir@ -# location of nmh configuration and formats files +# location of mmh configuration and formats files etcdir = @sysconfdir@ +# location of ... +datarootdir = @datarootdir@ + # location of man pages mandir = @mandir@ @@ -60,14 +63,14 @@ INSTALL_DATA = @INSTALL_DATA@ .SUFFIXES: -# all files in this directory included in the distribution -DIST = ChangeLog COPYRIGHT DATE INSTALL MACHINES README VERSION \ - ChangeLog install-sh mkinstalldirs 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 -# subdirectories in distribution -SUBDIRS = h config sbr uip etc man docs +# Subdirectories with own Makefiles +SUBDIRS = h config sbr uip etc man # ========== DEPENDENCIES FOR BUILDING AND INSTALLING ========== @@ -99,11 +102,12 @@ superclean: superclean-recursive superclean-local mostlyclean-local: rm -f *~ + rm -rf autom4te.cache 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 @@ -131,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 @@ -139,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 > $@ @@ -149,42 +153,36 @@ reset: cd $(srcdir) && autoconf cd $(srcdir) && date > stamp-h.in -# name of new nmh distribution tar file -tarfile = nmh-$(VERSION).tar.gz - -# ftp directory location -ftpdir = /ftp/nmh +# name of new mmh distribution tar file +tarfile = mmh-$(VERSION).tar.gz -# file containing name of new nmh distribution +# file containing name of new mmh distribution distname: - @echo nmh-$(VERSION) > distname + @echo mmh-$(VERSION) > distname -# build nmh distribution +# 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` -nmhdist: $(DIST) distname - @echo "Begin building nmh-$(VERSION) distribution" - rm -rf $(distdir) - mkdir $(distdir) +mmhdist: $(DISTINCLUDE) distname + @echo "Begin building mmh-$(VERSION) distribution" + @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); \ + @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 - @echo "Done building nmh-$(VERSION) distribution" - -# release a new nmh distribution into ftp directory -nmhrelease: - rm -f $(ftpdir)/$(tarfile) - rm -f $(ftpdir)/nmh.tar.gz - mv $(tarfile) $(ftpdir)/$(tarfile) - cd $(ftpdir) && ln -s $(tarfile) nmh.tar.gz - cd $(ftpdir) && md5sum *.gz > MD5SUM - + @rm -rf $(distdir) distname + @echo "Done building mmh-$(VERSION) distribution"