[Expat-checkins] CVS: expat make-release.sh,NONE,1.1 Makefile.in,1.17,1.18 configure.in,1.23,1.24

Greg Stein gstein@users.sourceforge.net
Thu, 23 Aug 2001 06:26:39 -0700


Update of /cvsroot/expat/expat
In directory usw-pr-cvs1:/tmp/cvs-serv22015

Modified Files:
	Makefile.in configure.in 
Added Files:
	make-release.sh 
Log Message:
Simplify the version handling some more by breaking the release process out
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).



--- NEW FILE: make-release.sh ---
#! /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."

Index: Makefile.in
===================================================================
RCS file: /cvsroot/expat/expat/Makefile.in,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** Makefile.in	2001/08/23 12:35:53	1.17
--- Makefile.in	2001/08/23 13:26:37	1.18
***************
*** 47,51 ****
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_DATA = @INSTALL_DATA@
- INSTALL_SCRIPT = @INSTALL_SCRIPT@
  mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
  
--- 47,50 ----
***************
*** 61,68 ****
  
  
- DISTDIR = expat-@EXPAT_MAJOR_VERSION@.@EXPAT_MINOR_VERSION@.@EXPAT_MICRO_VERSION@
- DISTRIBUTION = $(DISTDIR).tar.gz
- 
- 
  default:  lib xmlwf
  
--- 60,63 ----
***************
*** 89,110 ****
  	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)
--- 84,89 ----

Index: configure.in
===================================================================
RCS file: /cvsroot/expat/expat/configure.in,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** configure.in	2001/08/23 12:35:53	1.23
--- configure.in	2001/08/23 13:26:37	1.24
***************
*** 14,24 ****
  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
--- 14,18 ----
***************
*** 43,50 ****
  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)
--- 37,40 ----