]> granicus.if.org Git - libexpat/commitdiff
Simplify the version handling some more by breaking the release process out
authorGreg Stein <gstein@users.sourceforge.net>
Thu, 23 Aug 2001 13:26:37 +0000 (13:26 +0000)
committerGreg Stein <gstein@users.sourceforge.net>
Thu, 23 Aug 2001 13:26:37 +0000 (13:26 +0000)
of the makefile into a separate script -- the script can do much more and
the makefile dependencies were not used anyways (just serving to obfuscate).

expat/Makefile.in
expat/configure.in
expat/make-release.sh [new file with mode: 0755]

index 43f33076415d1d5f4e8d4752f50ff4f0cca47fb2..5b62eb4c200f49dd5843523bcc8900a2ca9d5005 100644 (file)
@@ -46,7 +46,6 @@ top_builddir = .
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
 mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
 
 CC = @CC@
@@ -60,10 +59,6 @@ APIHEADER = expat.h
 LIBRARY = libexpat.la
 
 
-DISTDIR = expat-@EXPAT_MAJOR_VERSION@.@EXPAT_MINOR_VERSION@.@EXPAT_MICRO_VERSION@
-DISTRIBUTION = $(DISTDIR).tar.gz
-
-
 default:  lib xmlwf
 
 buildlib: lib
@@ -88,25 +83,9 @@ extraclean: distclean
        rm -f conftools/config.guess conftools/config.sub
        rm -f conftools/ltconfig conftools/ltmain.sh
 
-maintainer-clean: distclean
-       rm -f $(DISTRIBUTION)
-       rm -rf $(DISTDIR)
-
-distdir: MANIFEST
-       test -d $(DISTDIR) && rm -rf $(DISTDIR); \
-       mkdir $(DISTDIR); \
-       flist=`sed -e "s/[      ]:.*$$//" MANIFEST`; for file in $$flist; do \
-               cp -P $$file $(DISTDIR); \
-       done
-
 check: $(SUBDIRS)
        cd tests && $(MAKE) check
 
-$(DISTRIBUTION): distdir
-       tar cf - $(DISTDIR) | gzip -9 >$(DISTRIBUTION)
-
-dist: $(DISTRIBUTION)
-
 install: xmlwf/xmlwf lib/$(LIBRARY) lib/$(APIHEADER)
        $(mkinstalldirs) $(bindir) $(libdir) $(includedir)
        $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(bindir)/xmlwf
index def9cd95ef053b7c23b25553c4bc0af8c78a5885..12b7472f0fd87275608eae1d690ff46b24fec49c 100644 (file)
@@ -13,12 +13,6 @@ dnl
 AC_INIT(Makefile.in)
 AC_CONFIG_AUX_DIR(conftools)
 
-changequote({,})
-EXPAT_MAJOR_VERSION="`sed -n '/MAJOR_VERSION/s/[^0-9]*//gp' lib/expat.h`"
-EXPAT_MINOR_VERSION="`sed -n '/MINOR_VERSION/s/[^0-9]*//gp' lib/expat.h`"
-EXPAT_MICRO_VERSION="`sed -n '/MICRO_VERSION/s/[^0-9]*//gp' lib/expat.h`"
-changequote([,])
-
 
 dnl
 dnl Increment LIBREVISION if source code has changed at all
@@ -43,10 +37,6 @@ sinclude(conftools/ac_c_bigendian_cross.m4)
 AC_LIBTOOL_WIN32_DLL
 AC_PROG_LIBTOOL
 
-AC_SUBST(EXPAT_MAJOR_VERSION)
-AC_SUBST(EXPAT_MINOR_VERSION)
-AC_SUBST(EXPAT_MICRO_VERSION)
-
 AC_SUBST(LIBCURRENT)
 AC_SUBST(LIBREVISION)
 AC_SUBST(LIBAGE)
diff --git a/expat/make-release.sh b/expat/make-release.sh
new file mode 100755 (executable)
index 0000000..86990f3
--- /dev/null
@@ -0,0 +1,65 @@
+#! /bin/bash
+#
+# make-release.sh: make an Expat release
+#
+# USAGE: make-release.sh tagname
+#
+# Note: tagname may be HEAD to just grab the head revision (e.g. for testing)
+#
+
+if test $# != 1; then
+  echo "USAGE: $0 tagname"
+  exit 1
+fi
+
+tmpdir=expat-release.$$
+if test -e $tmpdir; then
+  echo "ERROR: oops. chose the $tmpdir subdir, but it exists."
+  exit 1
+fi
+
+echo "Checking out into temporary area: $tmpdir"
+cvs -d :pserver:anonymous@cvs.expat.sourceforge.net:/cvsroot/expat export -r "$1" -d $tmpdir expat || exit 1
+
+echo ""
+echo "----------------------------------------------------------------------"
+echo "Preparing $tmpdir for release (running buildconf.sh)"
+(cd $tmpdir && ./buildconf.sh) || exit 1
+
+# figure out the release version
+hdr="$tmpdir/lib/expat.h"
+MAJOR_VERSION="`sed -n -e '/MAJOR_VERSION/s/[^0-9]*//gp' $hdr`"
+MINOR_VERSION="`sed -n -e '/MINOR_VERSION/s/[^0-9]*//gp' $hdr`"
+MICRO_VERSION="`sed -n -e '/MICRO_VERSION/s/[^0-9]*//gp' $hdr`"
+vsn=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
+
+echo ""
+echo "Release version: $vsn"
+
+distdir=expat-$vsn
+if test -e $distdir; then
+  echo "ERROR: for safety, you must manually remove $distdir."
+  rm -rf $tmpdir
+  exit 1
+fi
+mkdir $distdir || exit 1
+
+echo ""
+echo "----------------------------------------------------------------------"
+echo "Building $distdir based on the MANIFEST:"
+files="`sed -e 's/[    ]:.*$//' $tmpdir/MANIFEST`"
+for file in $files; do
+  echo "Copying $file..."
+  (cd $tmpdir && cp -Pp $file ../$distdir) || exit 1
+done
+
+echo ""
+echo "----------------------------------------------------------------------"
+echo "Removing (temporary) checkout directory..."
+rm -rf $tmpdir
+
+tarball=$distdir.tar.gz
+echo "Constructing $tarball..."
+tar cf - $distdir | gzip -9 > $tarball
+
+echo "Done."