--- gforth/Makedist.in 2008/07/15 21:54:43 1.29 +++ gforth/Makedist.in 2012/07/31 00:27:23 1.36 @@ -1,7 +1,7 @@ #make dist targets (workaround for broken makes) #use GNU make if your make does not grok this. -#Copyright (C) 1995,1996,1997,1998,2000,2003,2006,2007,2008 Free Software Foundation, Inc. +#Copyright (C) 1995,1996,1997,1998,2000,2003,2006,2007,2008,2010,2011 Free Software Foundation, Inc. #This file is part of Gforth. @@ -23,21 +23,15 @@ include Makefile #!! redundancy with engine/Makefile.in DOBJECTS=engine/*.o -PRECISE=kernel/version.fs kernl16b.fi kernl16l.fi kernl32b.fi kernl32l.fi kernl64b.fi kernl64l.fi - #stuff in a binonly distribution BINONLYDIST = config.status Makefile Makedist \ $(ENGINES) $(ENGINES_FAST) \ $(DOBJECTS) engine/config.h engine/Makefile \ - engine/gforth$(EXE) engine/gforth-fast$(EXE) \ - engine/gforth-ditc$(EXE) engine/gforth-itc$(EXE) \ - $(addprefix engine/,$(PROFEXES)) \ - stamp-h build-ec INSTALL.BINDIST + $(wildcard engine/gforth*$(EXE)) \ + stamp-h kernel/version.fs envos.fs build-ec INSTALL.BINDIST #use dist targets only when srcdir=. ddist: $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) - echo $(VERSION) > version - $(MAKE) $(PRECISE) -$(RMTREE) gforth-$(VERSION) mkdir gforth-$(VERSION) $(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) | \ @@ -47,8 +41,6 @@ ddist: $(SOURCES) $(FORTH_GEN0) @KERNEL #use dist targets only when srcdir=. ddosdist: $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) - echo $(VERSION) > version - $(MAKE) $(PRECISE) -$(RMTREE) gforth.$(DOSVERSION) mkdir gforth.$(DOSVERSION) $(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) | \ @@ -63,8 +55,6 @@ ddosdist: $(SOURCES) $(FORTH_GEN0) @KERN #A source distribution contains only the things needed to install gforth, #without the documents. dsrcdist: $(SOURCES) $(FORTH_GEN0) @KERNEL@ - echo $(VERSION) > version - $(MAKE) $(PRECISE) -$(RMTREE) gforth-$(VERSION) mkdir gforth-$(VERSION) $(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ | \ @@ -73,7 +63,6 @@ dsrcdist: $(SOURCES) $(FORTH_GEN0) @KERN -$(RMTREE) gforth-$(VERSION) dsrconlydist: $(SOURCES) - echo $(VERSION) > version -$(RMTREE) gforth-$(VERSION) mkdir gforth-$(VERSION) $(TAR) $(SOURCES) | \ @@ -84,8 +73,6 @@ dsrconlydist: $(SOURCES) #A document distribution contains only the documents, which can be created #with MAKE. ddocdist: $(DOCDIST) - echo $(VERSION) > version - $(MAKE) $(PRECISE) -$(RMTREE) gforth-$(VERSION) mkdir gforth-$(VERSION) $(TAR) $(DOCDIST) | (cd gforth-$(VERSION); tar xf -) @@ -93,20 +80,16 @@ ddocdist: $(DOCDIST) -$(RMTREE) gforth-$(VERSION) dhtmldist: html - echo $(VERSION) > version - $(MAKE) $(PRECISE) $(TAR) html|gzip -9 >gforth-html-$(VERSION).tar.gz #a binary distribution contains the complete source distribution, # the objects, the executable and the links. the objects are there for making # make happy. dbindist: $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST) - echo $(VERSION) > version - $(MAKE) $(PRECISE) -$(RMTREE) gforth-$(VERSION) mkdir gforth-$(VERSION) $(TAR) $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST) | (cd gforth-$(VERSION); tar xf -) - $(STRIP) gforth-$(VERSION){,/engine}/gforth{,-fast,-ditc,-itc}$(EXE) + -$(STRIP) gforth-$(VERSION){,/engine}/gforth*$(EXE) $(TAR) gforth-$(VERSION)|gzip -9 >gforth-$(VERSION).bin.@host@.tar.gz #All file names in a binary distribution @@ -121,10 +104,21 @@ distfiles: #then just has to unpack the source and his favourite binonly into the #same directory and has a full binary distribution. dbinonlydist: $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST) - echo $(VERSION) > version - $(MAKE) $(PRECISE) -$(RMTREE) gforth-$(VERSION) mkdir gforth-$(VERSION) $(TAR) $(BINONLYDIST) | (cd gforth-$(VERSION); tar xf -) $(STRIP) gforth-$(VERSION)/gforth$(EXE) $(TAR) gforth-$(VERSION)|gzip -9 >gforth-$(VERSION).binonly.@host@.tar.gz + +dsetup-debdist: $(SOURCES) $(FORTH_GEN0) @KERNEL@ $(DOCDIST) $(BINONLYDIST) debian.control + -rm -rf debian + mkdir debian + make package=$$PWD/debian install + +ddebdist: dsetup-debdist + mkdir debian/DEBIAN + (cd debian; find . -name '*' -exec md5sum '{}' ';') >debian/DEBIAN/md5sums + cp debian.control debian/DEBIAN/control + dpkg-deb --build debian + mv debian.deb gforth_$(VERSION)_@host_cpu@.deb + rm -rf md5sums debian