From 7ac9b0e140bed0b34dc88674b3098caa5e193acf Mon Sep 17 00:00:00 2001 From: rsc Date: Wed, 21 Apr 2004 05:49:52 +0000 Subject: make scripts work with more shells, use current variable names. --- src/libmp/mkfile | 2 +- src/libmp/port/mkfile | 2 +- src/libmp/port/reduce | 6 ++++-- src/libsec/mkfile | 2 +- src/libsec/port/mkfile | 4 +++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/libmp/mkfile b/src/libmp/mkfile index 417804df..e3f1aa69 100644 --- a/src/libmp/mkfile +++ b/src/libmp/mkfile @@ -2,6 +2,6 @@ DIRS=\ port\ - $objtype\ + $OBJTYPE\ <$PLAN9/src/mkdirs diff --git a/src/libmp/port/mkfile b/src/libmp/port/mkfile index 682c6763..b0cf77cd 100644 --- a/src/libmp/port/mkfile +++ b/src/libmp/port/mkfile @@ -35,7 +35,7 @@ FILES=\ ALLOFILES=${FILES:%=%.$O} # cull things in the per-machine directories from this list -OFILES= `{sh ./reduce $O $objtype $ALLOFILES} +OFILES= `{sh ./reduce $O $OBJTYPE $ALLOFILES} HFILES=\ $PLAN9/include/lib9.h\ diff --git a/src/libmp/port/reduce b/src/libmp/port/reduce index b3980756..269f510a 100644 --- a/src/libmp/port/reduce +++ b/src/libmp/port/reduce @@ -3,6 +3,8 @@ shift objtype=$1 shift -reduce="("`ls -p ../$objtype/*.[cs] 2>/dev/null | sed 's/..$//' | sed 's/^.*\///' | tr '\012' '|' | sed 's/.$//'`")" +nl=' +' +reduce="("`ls -p ../$objtype/*.[cs] 2>/dev/null | sed 's/..$//' | sed 's/^.*\///' | tr "$nl" '|' | sed 's/.$//'`")" -echo $* | tr ' ' '\012' | egrep -v $reduce | tr \012 ' ' +echo $* | tr ' ' "$nl" | egrep -v $reduce | tr "$nl" ' ' diff --git a/src/libsec/mkfile b/src/libsec/mkfile index aab57462..e3f1aa69 100644 --- a/src/libsec/mkfile +++ b/src/libsec/mkfile @@ -2,6 +2,6 @@ DIRS=\ port\ -# $systype-$objtype\ + $OBJTYPE\ <$PLAN9/src/mkdirs diff --git a/src/libsec/port/mkfile b/src/libsec/port/mkfile index ca37b0b4..63fd5f96 100644 --- a/src/libsec/port/mkfile +++ b/src/libsec/port/mkfile @@ -2,7 +2,7 @@ LIB=libsec.a -OFILES=\ +ALLOFILES=\ aes.$O\ blowfish.$O\ decodepem.$O\ @@ -54,6 +54,8 @@ OFILES=\ tlshand.$O\ x509.$O\ +OFILES=`{sh ./reduce $O $OBJTYPE $ALLOFILES} + HFILES=$PLAN9/include/libsec.h <$PLAN9/src/mksyslib -- cgit v1.2.3