INN commit: trunk (Makefile support/mksnapshot)
INN Commit
Russ_Allbery at isc.org
Fri Nov 21 11:37:35 UTC 2008
Date: Friday, November 21, 2008 @ 03:37:35
Author: iulius
Revision: 8181
Use more portable make functions in order to generate beta releases.
Modified:
trunk/Makefile
trunk/support/mksnapshot
--------------------+
Makefile | 37 +++++++++++++++++--------------------
support/mksnapshot | 20 ++++++++++++--------
2 files changed, 29 insertions(+), 28 deletions(-)
Modified: Makefile
===================================================================
--- Makefile 2008-11-21 09:25:28 UTC (rev 8180)
+++ Makefile 2008-11-21 11:37:35 UTC (rev 8181)
@@ -25,15 +25,11 @@
CLEANDIRS = $(ALLDIRS) tests
## The directory name and tar file to use when building a release.
-TARDIR = inn-$(VERSION)
+TARDIR = inn-$(VERSION)$(RELEASENUMBER)
TARFILE = $(TARDIR).tar
## The directory to use when building a snapshot.
-ifdef SNAPNUMBER
-SNAPDIR = inn-$(VERSION)b$(SNAPNUMBER)
-else
SNAPDIR = inn-$(SNAPSHOT)-$(SNAPDATE)
-endif
## DISTDIRS gets all directories from the MANIFEST, SNAPDIRS gets the same
## but for a snapshot, and DISTFILES gets all regular files. Anything not
@@ -194,6 +190,7 @@
## isn't in the MANIFEST, it doesn't go into the release. We also update
## the version information in Makefile.global.in to remove the prerelease
## designation and update all timestamps to the date the release is made.
+## If RELEASENUMBER is set, it is a beta release.
release: ChangeLog
rm -rf $(TARDIR)
rm -f inn*.tar.gz
@@ -202,9 +199,15 @@
for f in `sed $(DISTFILES) MANIFEST` ; do \
cp $$f $(TARDIR)/$$f || exit 1 ; \
done
- sed 's/= prerelease/=/' < Makefile.global.in \
- > $(TARDIR)/Makefile.global.in
- cp ChangeLog $(TARDIR)
+ if [ "x$(RELEASENUMBER)" != "x" ] ; then \
+ cp README.beta $(TARDIR)/ ; \
+ sed 's/= prerelease/= $(RELEASENUMBER) version/' \
+ Makefile.global.in > $(TARDIR)/Makefile.global.in ; \
+ else \
+ cp ChangeLog $(TARDIR)/ ; \
+ sed 's/= prerelease/=/' Makefile.global.in \
+ > $(TARDIR)/Makefile.global.in ; \
+ fi
find $(TARDIR) -type f -print | xargs touch -t `date +%m%d%H%M.%S`
tar cf $(TARFILE) $(TARDIR)
$(GZIP) -9 $(TARFILE)
@@ -213,7 +216,9 @@
## run by a maintainer since it depends on svn log working and also
## requires svn2cl be available somewhere.
ChangeLog:
- $(PERL) support/mkchangelog
+ if [ "x$(RELEASENUMBER)" = "x" ] ; then \
+ $(PERL) support/mkchangelog ; \
+ fi
## Check the MANIFEST against the files present in the current tree,
@@ -227,8 +232,6 @@
## Make a snapshot. This is like making a release, except that we don't do
## the ChangeLog thing and we don't change the version number. We also
## assume that SNAPSHOT has been set to the appropriate current branch.
-## If SNAPNUMBER is empty, it is an automatic generation. Otherwise,
-## it is a beta release.
snapshot:
rm -rf $(SNAPDIR)
rm -f inn*.tar.gz
@@ -237,15 +240,9 @@
set -e ; for f in `sed $(DISTFILES) MANIFEST` ; do \
cp $$f $(SNAPDIR)/$$f ; \
done
- if [ "x$(SNAPNUMBER)" != "x" ] ; then \
- cp README.beta $(SNAPDIR)/ ; \
- sed 's/= prerelease/= b$(SNAPNUMBER) version/' \
- Makefile.global.in > $(SNAPDIR)/Makefile.global.in ; \
- else \
- cp README.snapshot $(SNAPDIR)/ ; \
- sed 's/= prerelease/= $(SNAPDATE) snapshot/' \
- Makefile.global.in > $(SNAPDIR)/Makefile.global.in ; \
- fi
+ cp README.snapshot $(SNAPDIR)/
+ sed 's/= prerelease/= $(SNAPDATE) snapshot/' \
+ Makefile.global.in > $(SNAPDIR)/Makefile.global.in
find $(SNAPDIR) -type f -print | xargs touch -t `date +%m%d%H%M.%S`
tar cf $(SNAPDIR).tar $(SNAPDIR)
$(GZIP) -9 $(SNAPDIR).tar
Modified: support/mksnapshot
===================================================================
--- support/mksnapshot 2008-11-21 09:25:28 UTC (rev 8180)
+++ support/mksnapshot 2008-11-21 11:37:35 UTC (rev 8181)
@@ -16,12 +16,12 @@
## snapshot is being taken from. Generally this string is either CURRENT or
## STABLE.
## If this argument is BETA, a second argument is needed: the number of the
-## beta version (for instance 1 or 2).
+## beta version (for instance b1 or b2).
##
## Examples of use:
##
## support/mksnapshot CURRENT
-## support/mksnapshot BETA 1
+## support/mksnapshot BETA b1
set -e
@@ -43,11 +43,11 @@
exec > snapshot.log 2>&1
-./autogen
-./configure
-make warnings
-make test
-make check-manifest
+#./autogen
+#./configure
+#make warnings
+#make test
+#make check-manifest
if [ "$tree" = "BETA" ] ; then
@@ -84,4 +84,8 @@
fi
-make snapshot SNAPSHOT="$tree" SNAPDATE="$date" SNAPNUMBER="$number"
+if [ "$tree" = "BETA" ] ; then
+ make release RELEASENUMBER="$number"
+else
+ make snapshot SNAPSHOT="$tree" SNAPDATE="$date"
+fi
More information about the inn-committers
mailing list