[Commit] nickle update-version.sh, NONE, 1.1 version.m4, NONE,
1.1 Makefile.am, 1.37, 1.38 configure.in, 1.26, 1.27
Bart Massey
commit at keithp.com
Mon Oct 13 19:20:32 PDT 2003
Committed by: bart
Update of /local/src/CVS/nickle
In directory home.keithp.com:/tmp/cvs-serv10848
Modified Files:
Makefile.am configure.in
Added Files:
update-version.sh version.m4
Log Message:
Experimental changes to auto-increment the version number.
I can't stand it any longer :-).
--- NEW FILE: update-version.sh ---
#!/bin/sh
FILE=version.m4
CURHEADER="`sed -e '/CURHEADER/!d' -e 's=^.*\$\(.*\)\$$=\1=' <$FILE`"
OLDHEADER="`sed -e '/OLDHEADER/!d' -e 's=^.*<\(.*\)>$=\1=' <$FILE`"
CURVERSION="`sed -e '/CURVERSION/!d' -e 's=^[^0-9]*\(.*\)$=\1=' <$FILE`"
if [ "$CURHEADER" != "$OLDHEADER" ]
then
CURVERSION="`echo \"$CURVERSION\" |
awk -F. '{printf("%d.%d\n", $1, $2+1);}'`"
OLDHEADER="$CURHEADER"
fi
echo dnl 'This file is maintained automatically by update-version.sh'
echo dnl 'The file format is finicky, so do not hand-edit lightly.'
echo dnl 'Last updated' "`date`"
echo dnl CURHEADER "\$$CURHEADER\$"
echo dnl OLDHEADER "<$OLDHEADER>"
echo dnl CURVERSION $CURVERSION
echo "define([VERSION_NUMBER],[$CURVERSION])"
--- NEW FILE: version.m4 ---
dnl CURHEADER $Header: /local/src/CVS/nickle/version.m4,v 1.1 2003/10/14 01:20:29 bart Exp $
dnl OLDHEADER <Header: /local/src/CVS/nickle/version.m4,v 1.00 2003/10/13 00:01:00 bart Exp >
dnl CURVERSION 2.20
define([VERSION_NUMBER],[2.20])
Index: Makefile.am
===================================================================
RCS file: /local/src/CVS/nickle/Makefile.am,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- Makefile.am 13 Oct 2003 05:48:57 -0000 1.37
+++ Makefile.am 14 Oct 2003 01:20:29 -0000 1.38
@@ -37,6 +37,17 @@
nickle_LDADD = -Lbuiltin -lbuiltin
nickle_DEPENDENCIES = builtin/libbuiltin.a
+# XXX for version numbering only
+
+NICKLEBUILTINSOURCES = builtin/bsdrandom.c builtin/builtin.c \
+ builtin/builtin.h builtin/command.c \
+ builtin/debug.c builtin/environ.c \
+ builtin/file.c builtin/gcd.c \
+ builtin/math.c builtin/namespaces.h \
+ builtin/semaphore.c builtin/sockets.c \
+ builtin/string.c builtin/thread.c \
+ builtin/toplevel.c
+
pkgdata_DATA = $(NICKLEFILES)
man_MANS = nickle.1
@@ -50,6 +61,15 @@
$(nickle_OBJECTS): avl.h gram.h memp.h opcode.h stack.h \
config.h mem.h nickle.h ref.h value.h
+all: version.m4
+
gram.c gram.h: gram.y
lex.c: lex.l
+
+version.m4: update-version.sh \
+ $(nickle_SOURCES) $(NICKLEFILES) $(NICKLEBUILTINSOURCES)
+ sh update-version.sh > version.m4.new && \
+ /bin/mv -f version.m4.new version.m4
+ sh ./autogen.sh
+ ./config.status
Index: configure.in
===================================================================
RCS file: /local/src/CVS/nickle/configure.in,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- configure.in 11 Jul 2003 16:27:34 -0000 1.26
+++ configure.in 14 Oct 2003 01:20:29 -0000 1.27
@@ -6,8 +6,11 @@
AC_PREREQ(2.50)
+sinclude([version.m4])
+ifdef([VERSION_NUMBER],,[define([VERSION_NUMBER],[0.00])])
+
AC_INIT(nickle.h)
-AM_INIT_AUTOMAKE(nickle,2.20)
+AM_INIT_AUTOMAKE(nickle,VERSION_NUMBER)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_AUX_DIR(.)
More information about the Commit
mailing list