From: Stephen L Johnson Date: Mon, 16 Oct 2000 15:36:11 +0000 (+0000) Subject: updated Guys program to handle tmp make file creation X-Git-Tag: spong-2_7_0-beta1~4 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd8db1accc380a8c2e4cb20857ecff3e5f443d38;p=spong.git updated Guys program to handle tmp make file creation --- diff --git a/utils/mkTarg b/utils/mkTarg index dfafaf0..40815e7 100755 --- a/utils/mkTarg +++ b/utils/mkTarg @@ -1,20 +1,23 @@ #!/bin/sh SCRIPT=`basename $0` +PATH=$PATH:`dirname $0` die() { - echo "Usage: $SCRIPT NAME" - echo " where NAME.in is a file" + echo "Usage: $SCRIPT NAME(.in) TARGET" + echo " where NAME and TARGET is a file" echo "$*" exit 1 } set -e [ $# -eq 1 ] || die "Found $# ARGS not 1" NAME=$1 -shift -[ -f $NAME.in ] || die "No FILE $NAME.in" -echo "$NAME: $NAME.in" -echo ' sed -e \' -for var in `findVars $NAME.in` +TARGET=`dirname $NAME`/`basename $NAME .in` +[ -f $NAME ] || die "No FILE $NAME" +echo "include config.mk" +echo +echo "$TARGET: $NAME" +echo ' sed \' +for var in `findVars $NAME` do - echo ' "s%@@'$var'@@%$('$var')%g" \' + echo '-e s%@@'$var'@@%${'$var'}%g \' done -echo ' $< > $@' +echo ' $< > $@'