From cd8db1accc380a8c2e4cb20857ecff3e5f443d38 Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Mon, 16 Oct 2000 15:36:11 +0000 Subject: [PATCH] updated Guys program to handle tmp make file creation --- utils/mkTarg | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) 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 ' $< > $@' -- 2.30.2