Mercurial > hg > xemacs-beta
changeset 4354:232d873b9705
Add support for installing bundled patches.
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Sun, 23 Dec 2007 20:32:16 -0800 |
parents | 4143b78d0df0 |
children | cc293ef846d2 |
files | .hgignore ChangeLog Makefile.in.in etc/ChangeLog etc/bundled-packages/README etc/bundled-packages/test.sh |
diffstat | 6 files changed, 232 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Sun Dec 23 15:29:17 2007 +0100 +++ b/.hgignore Sun Dec 23 20:32:16 2007 -0800 @@ -44,4 +44,4 @@ ^src/xemacs\.def(\.in)?$ ^src/xemacs\.dmp$ ^src/Emacs\.ad\.h$ - +^etc/bundled-packages/.*\.tar\.gz$
--- a/ChangeLog Sun Dec 23 15:29:17 2007 +0100 +++ b/ChangeLog Sun Dec 23 20:32:16 2007 -0800 @@ -1,3 +1,14 @@ +2007-12-23 Stephen J. Turnbull <stephen@xemacs.org> + + * Makefile.in.in (mkpkgdir): + (check-available-packages): + (install-bootstrap-packages): + (install-nonmule-packages): + (install-all-packages): + New targets supporting bundled packages. + + * .hgignore: Ignore tarballs in etc/bundled-packages/. + 2007-12-08 Jerry James <james@xemacs.org> * config.guess:
--- a/Makefile.in.in Sun Dec 23 15:29:17 2007 +0100 +++ b/Makefile.in.in Sun Dec 23 20:32:16 2007 -0800 @@ -491,6 +491,48 @@ #endif ${sitelispdir} +## Install bundled packages, if present. + +package_path = @LATE_PACKAGE_DIRECTORIES@ +pkgsrcdir = ${srcdir}/etc/bundled-packages + +## #### Probably we should add a rule for lib-src/make-path here. + +check-available-packages: + @if test -r ${pkgsrcdir}/bootstrap.tar.gz; \ + then echo "To install a set of bootstrap packages, type:"; \ + echo " make install-bootstrap-packages"; \ + fi; \ + if test -r ${pkgsrcdir}/xemacs-sumo.tar.gz; \ + then echo "To install the full set of non-mule packages, type:"; \ + echo " make install-nonmule-packages"; \ + fi; \ + if test -r ${pkgsrcdir}/xemacs-mule-sumo.tar.gz; \ + then echo "To install the full set of packages with mule, type:"; \ + echo " make install-all-packages"; \ + fi; + +mkpkgdir: FRC.mkdir ${MAKEPATH} + @if test -z ${package_path}; \ + then echo "not configured --with-late-packages; no place to install."; \ + exit -1; \ + elif test -e ${package_path}/xemacs-packages \ + -o -e ${package_path}/mule-packages; \ + then echo "${package_path} is installed; won't overwrite packages."; \ + exit -1; \ + fi + ${MAKEPATH} ${package_path}; + +install-bootstrap-packages: mkpkgdir + cd ${package_path}; tar xvzf ${pkgsrcdir}/bootstrap.tar.gz + +install-nonmule-packages: mkpkgdir + cd ${package_path}; tar xvzf ${pkgsrcdir}/xemacs-sumo.tar.gz + +install-all-packages: mkpkgdir + cd ${package_path}; tar xvzf ${pkgsrcdir}/xemacs-sumo.tar.gz; \ + cd ${package_path}; tar xvzf ${pkgsrcdir}/xemacs-mule-sumo.tar.gz + ## Delete all the installed files that the `install' target would ## create (but not the noninstalled files such as `make all' would ## create).
--- a/etc/ChangeLog Sun Dec 23 15:29:17 2007 +0100 +++ b/etc/ChangeLog Sun Dec 23 20:32:16 2007 -0800 @@ -1,3 +1,8 @@ +2007-12-23 Stephen J. Turnbull <stephen@xemacs.org> + + * bundled-packages/README: Documentation for bundled packages. + * bundled-packages/test.sh: Test suite for bundled packages. + 2007-11-22 Vin Shelton <acs@xemacs.org> * photos/vin.png:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/bundled-packages/README Sun Dec 23 20:32:16 2007 -0800 @@ -0,0 +1,68 @@ +Package distributions may be placed in this directory. +If present and a package-path is configured, packages can be installed +using the top-level makefile. + +To configure the package path, use the --with-late-packages option to +configure, which specifies the path to the directory containing the +xemacs-packages and mule-packages hierarchies to install. + +To find out if a distribution includes bundled packages, type + + make check-available-packages + +There are three Make targets that may be available depending on the package +sets supplied. + + make install-bootstrap-packages + Install a selected set of packages sufficient to support + downloading and installing packages via the M-x list-packages + interface. Chose this if you want to be able to install the + latest version of each package immediately. + + make install-nomule-packages + Install the full distribution of packages that do not require a + Mule-enabled XEmacs. Choose this package if you don't have a + Mule-enabled XEmacs and want the convenience of a single-command + installation. You can add or update packages via M-x list-packages + at any time. + + make install-all-packages + Install the full distribution of packages, including those requiring + a Mule-enabled XEmacs. Choose this package if you have a Mule- + enabled XEmacs and want the convenience of a single-command + installation. You can add or update packages via M-x list-packages + at any time. + +DISTRIBUTOR'S NOTE: you may choose what packages you wish to include in +bootstrap.tar.gz, but to make list-packages work you need to include at +least xemacs-base, dired, and efs. The tarball should unpack directly as +an xemacs-packages tree (and optionaly, a mule-packages tree. Also, if +either of xemacs-sumo.tar.gz or xemacs-mule-sumo.tar.gz is provided, the +other should be as well. + +If packages are not available with the distribution, you can get them at + + ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo.tar.gz + ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-mule-sumo.tar.gz + http://turnbull.sk.tsukuba.ac.jp/Tools/XEmacs/bootstrap.tar.gz + +and place them in the same directory as this file. You can also make your +own bootstrap.tar.gz by creating a directory xemacs-packages, then +untarring the packages of your choice into that directory, and tarring the +whole thing up with "tar czf bootstrap.tar.gz xemacs-packages". (If you +wish to include mule-packages, you should place them in mule-packages as +a sibling of xemacs-packages.) + +This facility currently does not support installations which configure +the --with-early-packages, --with-late-packages, or --with-last-packages +options. + +This facility currently will not overwrite an existing package +installation, not even if a whole hierarchy (usually the mule-packages) +is missing. In particular, you cannot use this feature to add the +mule-packages to a package installation which lacks them, even if the +hierarchy is missing, or the xemacs-packages hierarchy was installed +this way. Nor can you "upgrade" a bootstrap installation to a full +installation. If you wish to do any of these things you will need to +remove the existing hierarchies. +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/bundled-packages/test.sh Sun Dec 23 20:32:16 2007 -0800 @@ -0,0 +1,105 @@ +# tests for the bundled packages feature + +# usage: sh etc/bundled-packages/tests.sh [TMP_TEST_DIR] + +# Always run this script from the top directory of the source tree. +# You need a mv that supports the -v for verbose flag, and a mkdir that +# supports the -p flag to make parents. +# Output from this script is preceded by 4 stars (****). + +# This test script is probably more fragile than the build process, but if +# it runs to completion things are probably OK. + +# configure the installation target + +if test -z "$1"; then + TMP_TEST_DIR=/tmp/test/bundled-packages +else + TMP_TEST_DIR=$1 +fi + +srcdir=`pwd` +blddir=${TMP_TEST_DIR}/build +pkgdir=${TMP_TEST_DIR}/lib/xemacs + +echo "**** srcdir = ${srcdir}" +echo "**** blddir = ${blddir}" +echo "**** pkgdir = ${pkgdir}" + +if test -e "${pkgdir}"; then + echo "**** pkgdir (${pkgdir}) exists; bailing out." + exit -1 +fi + +# mv existing tarballs out of harm's way and make a fake one + +echo "**** Moving existing tarballs to etc/bundled-packages/saved." +mkdir -p etc/bundled-packages/saved +cd etc/bundled-packages +echo "**** 'mv' may error because there are no files to move. It's harmless." +mv -v *.tar.gz saved/ +cd ../.. + +# configure in a temporary directory + +if test -e ${blddir}; then + echo "**** blddir (${blddir}) exists; bailing out." + exit -1 +fi +mkdir -p ${blddir} +cd ${blddir} +echo "**** Running 'configure'. This takes *several minutes*." +echo "**** Redirecting configure output to ${blddir}/beta.err." +${srcdir}/configure >beta.err 2>&1 + +# test check-available-packages + +echo "**** This test should produce no error and no output." +make check-available-packages +cd ${srcdir}/etc/bundled-packages +echo "**** This test should explain how to install bootstrap packages." +echo "This file pretends to be a bootstrap hierarchy." > xemacs-packages +tar czf bootstrap.tar.gz xemacs-packages +rm xemacs-packages +cd ${blddir} +make check-available-packages +echo "**** This test should explain how to install all three." +cd ${srcdir}/etc/bundled-packages +echo "This file pretends to be a xemacs-packages hierarchy." > xemacs-packages +echo "This file pretends to be a mule-packages hierarchy." > mule-packages +tar czf xemacs-sumo.tar.gz xemacs-packages +tar czf xemacs-mule-sumo.tar.gz mule-packages +rm xemacs-packages mule-packages +cd ${blddir} +make check-available-packages + +# test installation without package path given + +echo "**** Make the 'make-path' utility needed by the installation routine." +make -C lib-src make-path +echo "**** This test should error because --with-late-packages wasn't given." +make install-bootstrap-packages + +# test installation with package path given + +echo "**** Running 'configure'. This takes *several minutes*." +echo "**** Redirecting configure output to ${blddir}/beta.err." +${srcdir}/configure --with-late-packages=${pkgdir} >beta.err 2>&1 +echo "**** Make the 'make-path' utility needed by the installation routine." +make -C lib-src make-path +echo "**** Test install-bootstrap-packages." +make install-bootstrap-packages +echo "**** The following should list xemacs-packages in the right place." +ls ${pkgdir}/* + +#### no tests below this line #### + +# put tarballs back and clean up + +cd ${srcdir}/etc/bundled-packages +rm *.tar.gz +echo "**** 'mv' may error because there are no files to move. It's harmless." +mv -v saved/*.tar.gz ../ +rmdir saved +rm -rf ${blddir} ${pkgdir} +exit 0