chiark / gitweb /
Proper version.h.
authorian <ian>
Sun, 24 Aug 1997 23:50:48 +0000 (23:50 +0000)
committerian <ian>
Sun, 24 Aug 1997 23:50:48 +0000 (23:50 +0000)
Makefile.in
buildship
client.c
version.h [new file with mode: 0644]

index b414ac6..9448969 100644 (file)
@@ -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 <common.h | perl -pe 's/../0x$$&,/g; s/,$$//;' \
-                       >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
 
index f5a66d9..e2df0f6 100755 (executable)
--- 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 <version>'
-       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:
index 68ec6a4..8ef35a5 100644 (file)
--- 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 <options> [--] <service-user> <service-name> [<argument> ...]\n"
-              "options: -f|--file <fd>[<fdmodifiers>]=<filename>\n"
-              "         -D|--defvar <name>=<value>\n"
-              "         -t|--timeout <seconds>\n"
-              "         -S|--signals <status>|number|number-nocore|highbit|stdout\n"
-              "         -w|--fdwait <fd>=wait|nowait|close\n"
-              "         -P|--sigpipe  -H|--hidecwd  -h|--help  --copyright\n"
-              "         --override <configuration-data> } available only to\n"
-              "         --override-file <filename>      } 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 <options> [--] <service-user> <service-name> [<argument> ...]\n"
+    "options: -f|--file <fd>[<fdmodifiers>]=<filename>\n"
+    "         -D|--defvar <name>=<value>\n"
+    "         -t|--timeout <seconds>\n"
+    "         -S|--signals <status>|number|number-nocore|highbit|stdout\n"
+    "         -w|--fdwait <fd>=wait|nowait|close\n"
+    "         -P|--sigpipe  -H|--hidecwd  -h|--help  --copyright\n"
+    "         --override <configuration-data> } available only to\n"
+    "         --override-file <filename>      } 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 (file)
index 0000000..f0725d1
--- /dev/null
+++ b/version.h
@@ -0,0 +1 @@
+#define VERSION "0.90"