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
# 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
# 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
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:
#include "config.h"
#include "common.h"
+#include "version.h"
struct optioninfo;
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");
}