Raymond Toy pushed to branch issue-363-add-version-number at cmucl / cmucl Commits: 1eb057e6 by Raymond Toy at 2025-02-04T11:44:42-08:00 Address review comments removing some commented out stuff. - - - - - 2d25c77d by Raymond Toy at 2025-02-04T11:47:38-08:00 Rename cmucl-version.sh to git-version.sh Update callers with the new name. - - - - - bf47121d by Raymond Toy at 2025-02-04T13:05:59-08:00 Have build.sh generate src/lisp/cmucl-version.h This works a bit better than having GNUmakefile do it. Plus, when we create a src tarball, cmucl-version.h is included. - - - - - 7 changed files: - bin/build.sh - bin/cmucl-version.sh → bin/git-version.sh - bin/make-dist.sh - bin/make-main-dist.sh - bin/make-src-dist.sh - bin/run-unit-tests.sh - src/lisp/GNUmakefile Changes: ===================================== bin/build.sh ===================================== @@ -49,9 +49,6 @@ GIT_FILE_COMMENT="yes" export GIT_FILE_COMMENT SKIPUTILS=no -DEFAULT_VERSION="`bin/cmucl-version.sh`" -export DEFAULT_VERISON -echo DEFAULT_VERSION = $DEFAULT_VERSION # If gmake exists, assume it is GNU make and use it. if [ -z "$MAKE" ]; then @@ -113,6 +110,13 @@ case `uname -s` in esac ;; esac +# Set default version and generate lisp/cmucl-version.h +DEFAULT_VERSION="`bin/git-version.sh`" +export DEFAULT_VERISON +echo DEFAULT_VERSION = $DEFAULT_VERSION + +bin/git-version.sh -f > src/lisp/cmucl-version.h + export LANG=en_US.UTF-8 buildit () @@ -132,9 +136,7 @@ buildit () if [ "$ENABLE" = "yes" ]; then $TOOLDIR/clean-target.sh $CLEAN_FLAGS $TARGET || { echo "Failed: $TOOLDIR/clean-target.sh"; exit 1; } - #set -x time $BUILDWORLD $TARGET $OLDLISP $BOOT || { echo "Failed: $BUILDWORLD"; exit 1; } - #set +x if [ "$REBUILD_LISP" = "yes" ]; then $TOOLDIR/rebuild-lisp.sh $TARGET fi @@ -145,15 +147,12 @@ buildit () if [ "$BUILD_WORLD2" = "yes" ]; then - #set -x $BUILDWORLD $TARGET $OLDLISP $BOOT || { echo "Failed: $BUILDWORLD"; exit 1; } - #set +x fi $TOOLDIR/load-world.sh $TARGET "$VERSION" || { echo "Failed: $TOOLDIR/load-world.sh"; exit 1; } - #set -x $TARGET/lisp/lisp -lib $TARGET/lisp -batch -noinit -nositeinit < /dev/null || { echo "Failed: $TARGET/lisp/lisp -batch -noinit"; exit 1; } - #set +x + return 0; fi } ===================================== bin/cmucl-version.sh → bin/git-version.sh ===================================== @@ -35,7 +35,7 @@ else /* * Cmucl version * - * DO NOT EDIT! This file is auto-generated via bin/cmucl-version.sh. + * DO NOT EDIT! This file is auto-generated via bin/git-version.sh. */ #define CMUCL_VERSION "$DEFAULT_VERSION" ===================================== bin/make-dist.sh ===================================== @@ -97,7 +97,7 @@ def_arch_os # Choose a version based on the git hash as the default version. We # only compute a default if the git hash looks like a snapshot # ("snapshot-yyyy-mm") or a release number.. -DEFAULT_VERSION="`bin/cmucl-version.sh`" +DEFAULT_VERSION="`bin/git-version.sh`" # Default compression is -J (xz). These variables are passed to the # other scripts via the environmen, so export them. @@ -149,7 +149,6 @@ if [ -n "$COMPRESS_ARG" ]; then esac fi -#set -x if [ -z "$VERSION" ]; then # If a default version exists, use it. Otherwise this is an # error---at least one of these must not be empty. ===================================== bin/make-main-dist.sh ===================================== @@ -217,14 +217,13 @@ install ${GROUP} ${OWNER} -m 0644 src/general-info/cmucl.1 \ $DESTDIR/${MANDIR}/cmucl-$VERSION.1 install ${GROUP} ${OWNER} -m 0644 src/general-info/lisp.1 \ $DESTDIR/${MANDIR}/lisp-$VERSION.1 -set -x install ${GROUP} ${OWNER} -m 0644 src/general-info/README $DESTDIR/${DOCDIR} if [ -f src/general-info/release-$VERSION.txt ] then install ${GROUP} ${OWNER} -m 0644 src/general-info/release-$VERSION.txt \ $DESTDIR/${DOCDIR} fi -set +x + if [ -z "$INSTALL_DIR" ]; then sync ; sleep 1 ; sync ; sleep 1 ; sync echo Tarring main components ===================================== bin/make-src-dist.sh ===================================== @@ -55,7 +55,6 @@ fi DESTDIR=${INSTALL_DIR:-release-$$} echo Creating source distribution -set -x GTAR_OPTIONS="--exclude=.git --exclude='*.pot.~*~'" install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/share/cmucl/$VERSION/ install ${GROUP} ${OWNER} -m 0755 bin/run-unit-tests.sh $DESTDIR/bin ===================================== bin/run-unit-tests.sh ===================================== @@ -49,7 +49,6 @@ function cleanup { trap cleanup EXIT -#set -x if [ -n "${TESTDIR}" ]; then TESTDIRARG=" :test-directory \"$TESTDIR/\"" else ===================================== src/lisp/GNUmakefile ===================================== @@ -41,8 +41,6 @@ OBJS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(patsubst %.s,%.o,$(SRCS)))) ### Don't look in RCS for the files, because we might not want the latest. %: RCS/%,v -#DEFAULT_VERSION = $(shell ../../bin/cmucl-version.sh) - lisp.nm: lisp lisp.a echo 'Map file for lisp version ' `cat version` > ,lisp.nm $(NM) lisp | grep -v " [F] " >> ,lisp.nm @@ -57,7 +55,7 @@ lisp.o : lisp.c cmucl-version.h $(CC) ${CFLAGS} $(CPPFLAGS) -c $< cmucl-version.h: - ../../bin/cmucl-version.sh -f > cmucl-version.h + ../../bin/git-version.sh -f > cmucl-version.h lisp: ${OBJS} version.o $(CC) -g ${OS_LINK_FLAGS} -o ,lisp $^ ${OS_LIBS} -lm View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/dc084d13a5a0ad5c5c16d5f... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/dc084d13a5a0ad5c5c16d5f... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)