From dbad0a53f8c54ac65c5859d3e213a10821b797ff Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 24 Aug 1997 23:50:48 +0000 Subject: [PATCH] Proper version.h. --- Makefile.in | 8 ++++---- buildship | 14 +++++--------- client.c | 27 ++++++++++++++------------- version.h | 1 + 4 files changed, 24 insertions(+), 26 deletions(-) create mode 100644 version.h diff --git a/Makefile.in b/Makefile.in index b414ac6..9448969 100644 --- a/Makefile.in +++ b/Makefile.in @@ -64,7 +64,7 @@ daemon: daemon.o parserlexer.o ddebug.o lib.o lexer.l: language.i4 -client.o: config.h common.h pcsum.h +client.o: config.h common.h pcsum.h version.h daemon.o: config.h common.h pcsum.h daemon.h lib.h tokens.h @@ -76,9 +76,9 @@ parserlexer.o: lexer.c parser.c config.h common.h pcsum.h daemon.h lib.h tokens. # lexer.c #include's parser.c at the end. Blame flex. $(CC) -c $(CPPFLAGS) $(CFLAGS) lexer.c -o $@ -pcsum.h: common.h - md5sum pcsum.h.new && mv pcsum.h.new pcsum.h +pcsum.h: common.h version.h config.h config.status Makefile + cat $^ | md5sum | perl -pe 's/../0x$$&,/g; s/,$$//;' >pcsum.h.new + cmp pcsum.h.new pcsum.h || mv -f pcsum.h.new pcsum.h tokens.h: language.i4 diff --git a/buildship b/buildship index f5a66d9..e2df0f6 100755 --- a/buildship +++ b/buildship @@ -2,19 +2,14 @@ # to release, check out a fresh copy and then run this set -e -if test $# = 0 -then - echo >&2 'usage: buildship ' - exit 1 -fi -version=$1 +version=`sed -n 's/^#define VERSION \".*\" *$/\1/' targz=userv-$version.tar.gz tag=`echo release-$version | sed -e 's/\./-/g'` echo >&2 "*** Tagging (version $version, tag $tag) ..." cvs tag -F -c $tag -echo >&2 'Generating pre-built files ...' +echo >&2 '*** Generating pre-built files ...' autoconf autoheader ./configure @@ -25,8 +20,9 @@ cd shipcheck echo >&2 '*** Checking whether identical to repository version ...' tar zxf $targz cvs co -r $tag userv -cp userv-$version/* userv/. -cd userv +cd userv-$version +cp -r . ../userv/. +cd ../userv if test "x`cvs -n update`" != x then echo >&2 mismatch: diff --git a/client.c b/client.c index 68ec6a4..8ef35a5 100644 --- a/client.c +++ b/client.c @@ -41,6 +41,7 @@ #include "config.h" #include "common.h" +#include "version.h" struct optioninfo; @@ -272,19 +273,19 @@ static void xfflush(FILE *file) { static void usage(void) { if (fprintf(stderr, - "usage: userv [--] [ ...]\n" - "options: -f|--file []=\n" - " -D|--defvar =\n" - " -t|--timeout \n" - " -S|--signals |number|number-nocore|highbit|stdout\n" - " -w|--fdwait =wait|nowait|close\n" - " -P|--sigpipe -H|--hidecwd -h|--help --copyright\n" - " --override } available only to\n" - " --override-file } root or same user\n" - "fdmodifiers: read write overwrite trunc[ate]\n" - "(separate with commas) append sync excl[usive] creat[e] fd\n\n" - "userv and uservd are copyright (C)1996-1997 Ian Jackson.\n" - "They come with NO WARRANTY; type `userv --copyright' for details.\n") + "usage: userv [--] [ ...]\n" + "options: -f|--file []=\n" + " -D|--defvar =\n" + " -t|--timeout \n" + " -S|--signals |number|number-nocore|highbit|stdout\n" + " -w|--fdwait =wait|nowait|close\n" + " -P|--sigpipe -H|--hidecwd -h|--help --copyright\n" + " --override } available only to\n" + " --override-file } root or same user\n" + "fdmodifiers: read write overwrite trunc[ate]\n" + "(separate with commas) append sync excl[usive] creat[e] fd\n\n" + "userv and uservd version " VERSION "; copyright (C)1996-1997 Ian Jackson.\n" + "They come with NO WARRANTY; type `userv --copyright' for details.\n") == EOF) syscallerror("write usage to stderr"); } diff --git a/version.h b/version.h new file mode 100644 index 0000000..f0725d1 --- /dev/null +++ b/version.h @@ -0,0 +1 @@ +#define VERSION "0.90" -- 2.30.2