From 3beed9d9c6ba51d83667921c2bdfe55e594406f9 Mon Sep 17 00:00:00 2001 From: agc Date: Thu, 24 Sep 1998 08:45:00 +0000 Subject: + Use @PREFIX@ as the pattern to substitute for ${PREFIX} + Cleanup the substitutions a bit. + Add a benchmark target to the package Makefile to enable the benchmark to be run. --- benchmarks/lmbench/Makefile | 22 ++++++++++---------- benchmarks/lmbench/patches/patch-af | 40 ++++++++++++++++++------------------- benchmarks/lmbench/patches/patch-ag | 10 +++++----- benchmarks/lmbench/patches/patch-ah | 20 +++++++++---------- benchmarks/lmbench/patches/patch-ai | 24 +++++++++++----------- benchmarks/lmbench/patches/patch-aj | 4 ++-- 6 files changed, 59 insertions(+), 61 deletions(-) (limited to 'benchmarks/lmbench') diff --git a/benchmarks/lmbench/Makefile b/benchmarks/lmbench/Makefile index 5ee582985b9..57f4f2af012 100644 --- a/benchmarks/lmbench/Makefile +++ b/benchmarks/lmbench/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 1998/08/30 17:46:25 garbled Exp $ +# $NetBSD: Makefile,v 1.2 1998/09/24 08:45:00 agc Exp $ DISTNAME= lmbench-2alpha11 PKGNAME= lmbench-2.11a @@ -14,17 +14,12 @@ USE_GMAKE= yes USE_PERL5= yes post-configure: - @${MV} ${WRKSRC}/scripts/os foo - ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/os - @${MV} ${WRKSRC}/scripts/results foo - ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/results - @${MV} ${WRKSRC}/scripts/config-run foo - ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/config-run - @${MV} ${WRKSRC}/scripts/lmbench foo - ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/lmbench - @${MV} ${WRKSRC}/results/Makefile foo - ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/results/Makefile - @${RM} -f foo + @cd ${WRKSRC}; \ + for f in scripts/os scripts/results scripts/config-run \ + scripts/lmbench results/Makefile; do \ + ${MV} $$f $$f.in; \ + ${SED} -e 's|@PREFIX@|${PREFIX}|g' $$f.in > $$f; \ + done @chmod 0755 ${WRKSRC}/scripts/config-run @chmod 0755 ${WRKSRC}/scripts/os @chmod 0755 ${WRKSRC}/scripts/results @@ -33,4 +28,7 @@ post-configure: do-install: @${SETENV} PREFIX=${PREFIX} WRKSRC=${WRKSRC} ${SCRIPTDIR}/do-install +benchmark: + @cd ${WRKSRC}/src; ${GMAKE} results + .include "../../mk/bsd.pkg.mk" diff --git a/benchmarks/lmbench/patches/patch-af b/benchmarks/lmbench/patches/patch-af index b0c6f103201..ca7fffca509 100644 --- a/benchmarks/lmbench/patches/patch-af +++ b/benchmarks/lmbench/patches/patch-af @@ -1,4 +1,4 @@ -$NetBSD: patch-af,v 1.1 1998/08/30 17:46:26 garbled Exp $ +$NetBSD: patch-af,v 1.2 1998/09/24 08:45:00 agc Exp $ --- scripts/config-run.orig Fri Jul 31 12:55:19 1998 +++ scripts/config-run Sun Aug 30 08:08:52 1998 @@ -3,7 +3,7 @@ @@ -6,7 +6,7 @@ $NetBSD: patch-af,v 1.1 1998/08/30 17:46:26 garbled Exp $ # 1.23 98/07/31 lm@lm.bitmover.com -OS=`../scripts/os` -+OS=`XXXPREFIXXXX/bin/lmbench/os` ++OS=`@PREFIX@/bin/lmbench/os` L='=====================================================================' echo $L; cat< /dev/tty < ../bin/$OS/`../scripts/config` +cat <$CONFIG diff --git a/benchmarks/lmbench/patches/patch-ag b/benchmarks/lmbench/patches/patch-ag index 3bd09b7dac9..08719e79172 100644 --- a/benchmarks/lmbench/patches/patch-ag +++ b/benchmarks/lmbench/patches/patch-ag @@ -1,4 +1,4 @@ -$NetBSD: patch-ag,v 1.1 1998/08/30 17:46:26 garbled Exp $ +$NetBSD: patch-ag,v 1.2 1998/09/24 08:45:00 agc Exp $ --- scripts/os.orig Sun Aug 30 05:38:55 1998 +++ scripts/os Sun Aug 30 05:40:06 1998 @@ -1,10 +1,10 @@ @@ -7,12 +7,12 @@ $NetBSD: patch-ag,v 1.1 1998/08/30 17:46:26 garbled Exp $ OS=bloat-os -if [ -f ../scripts/gnu-os ] -then OS=`../scripts/gnu-os | sed s/unknown-//` -+if [ -f XXXPREFIXXXX/bin/lmbench/gnu-os ] -+then OS=`XXXPREFIXXXX/bin/lmbench/gnu-os | sed s/unknown-//` ++if [ -f @PREFIX@/bin/lmbench/gnu-os ] ++then OS=`@PREFIX@/bin/lmbench/gnu-os | sed s/unknown-//` fi -if [ -f ../../scripts/gnu-os ] -then OS=`../../scripts/gnu-os | sed s/unknown-//` -+if [ -f XXXPREFIXXXX/bin/lmbench/gnu-os ] -+then OS=`XXXPREFIXXXX/bin/lmbench/gnu-os | sed s/unknown-//` ++if [ -f @PREFIX@/bin/lmbench/gnu-os ] ++then OS=`@PREFIX@/bin/lmbench/gnu-os | sed s/unknown-//` fi echo $OS diff --git a/benchmarks/lmbench/patches/patch-ah b/benchmarks/lmbench/patches/patch-ah index 6f25535b281..255ffa9e11c 100644 --- a/benchmarks/lmbench/patches/patch-ah +++ b/benchmarks/lmbench/patches/patch-ah @@ -1,27 +1,27 @@ -$NetBSD: patch-ah,v 1.1 1998/08/30 17:46:27 garbled Exp $ +$NetBSD: patch-ah,v 1.2 1998/09/24 08:45:00 agc Exp $ --- scripts/results.orig Fri Jul 31 12:55:19 1998 +++ scripts/results Sun Aug 30 08:42:03 1998 @@ -2,20 +2,20 @@ - # $Id: patch-ah,v 1.1 1998/08/30 17:46:27 garbled Exp $ + # $Id: patch-ah,v 1.2 1998/09/24 08:45:00 agc Exp $ -OS=`../scripts/os` -CONFIG=`../scripts/config` -RESULTS=results/$OS -BASE=../$RESULTS/`uname -n` -+OS=`XXXPREFIXXXX/bin/lmbench/os` -+CONFIG=`XXXPREFIXXXX/bin/lmbench/config` -+RESULTS=XXXPREFIXXXX/share/lmbench/results/$OS ++OS=`@PREFIX@/bin/lmbench/os` ++CONFIG=`@PREFIX@/bin/lmbench/config` ++RESULTS=@PREFIX@/share/lmbench/results/$OS +BASE=$RESULTS/`uname -n` EXT=0 -if [ ! -f "../bin/$OS/$CONFIG" ] -+if [ ! -f "XXXPREFIXXXX/share/lmbench/$CONFIG" ] ++if [ ! -f "@PREFIX@/share/lmbench/$CONFIG" ] then echo "No config file?" exit 1 fi -. ../bin/$OS/$CONFIG -+. XXXPREFIXXXX/share/lmbench/$CONFIG ++. @PREFIX@/share/lmbench/$CONFIG -if [ ! -d ../$RESULTS ] -then mkdir -p ../$RESULTS @@ -35,14 +35,14 @@ $NetBSD: patch-ah,v 1.1 1998/08/30 17:46:27 garbled Exp $ done -cd ../bin/$OS -+cd XXXPREFIXXXX/share/lmbench/results/$OS ++cd @PREFIX@/share/lmbench/results/$OS if [ "X$SYNC_MAX" = X ]; then echo "No SYNC_MAX variable."; exit 1; fi if [ $SYNC_MAX -gt 1 ] then SYNC_PID=1; export SYNC_PID while [ $SYNC_PID -le $SYNC_MAX ] do echo Results $SYNC_PID going to ${RESULTS}.$SYNC_PID - ../../scripts/lmbench $CONFIG 2>../${RESULTS}.$SYNC_PID & -+ XXXPREFIXXXX/bin/lmbench/lmbench XXXPREFIXXXX/share/lmbench/$CONFIG 2>${RESULTS}.$SYNC_PID & ++ @PREFIX@/bin/lmbench/lmbench @PREFIX@/share/lmbench/$CONFIG 2>${RESULTS}.$SYNC_PID & SYNC_PID=`expr $SYNC_PID + 1` done; wait else echo Results going to ${RESULTS} @@ -50,7 +50,7 @@ $NetBSD: patch-ah,v 1.1 1998/08/30 17:46:27 garbled Exp $ SYNC_MAX=1 export SYNC_PID SYNC_MAX - ../../scripts/lmbench $CONFIG 2>../${RESULTS} -+ XXXPREFIXXXX/bin/lmbench/lmbench XXXPREFIXXXX/share/lmbench/$CONFIG 2>${RESULTS} ++ @PREFIX@/bin/lmbench/lmbench @PREFIX@/share/lmbench/$CONFIG 2>${RESULTS} fi if [ X$MAIL = Xyes ] diff --git a/benchmarks/lmbench/patches/patch-ai b/benchmarks/lmbench/patches/patch-ai index 2d5d35a2d2b..1f87e5609a8 100644 --- a/benchmarks/lmbench/patches/patch-ai +++ b/benchmarks/lmbench/patches/patch-ai @@ -1,12 +1,12 @@ -$NetBSD: patch-ai,v 1.1 1998/08/30 17:46:27 garbled Exp $ +$NetBSD: patch-ai,v 1.2 1998/09/24 08:45:00 agc Exp $ --- scripts/lmbench.orig Fri Jul 31 12:55:19 1998 +++ scripts/lmbench Sun Aug 30 09:05:29 1998 @@ -7,7 +7,7 @@ - # $Id: patch-ai,v 1.1 1998/08/30 17:46:27 garbled Exp $ + # $Id: patch-ai,v 1.2 1998/09/24 08:45:00 agc Exp $ # Make sure we can find: ./cmd, df, and netstat -PATH=.:../../scripts:$PATH:/etc:/usr/etc:/sbin:/usr/sbin -+PATH=.:XXXPREFIXXXX/bin/lmbench:$PATH:/etc:/usr/etc:/sbin:/usr/sbin ++PATH=.:@PREFIX@/bin/lmbench:$PATH:/etc:/usr/etc:/sbin:/usr/sbin export PATH if [ -f $1 ] @@ -15,10 +15,10 @@ $NetBSD: patch-ai,v 1.1 1998/08/30 17:46:27 garbled Exp $ lat_unix if [ $MP = Y ] -then if [ $SYNC_MAX = $SYNC_PID ]; then cp hello /tmp/hello; fi -+then if [ $SYNC_MAX = $SYNC_PID ]; then cp XXXPREFIXXXX/bin/lmbench/hello /tmp/hello; fi ++then if [ $SYNC_MAX = $SYNC_PID ]; then cp @PREFIX@/bin/lmbench/hello /tmp/hello; fi synchronize $SYNC/lat_proc -else cp hello /tmp/hello -+else cp XXXPREFIXXXX/bin/lmbench/hello /tmp/hello ++else cp @PREFIX@/bin/lmbench/hello /tmp/hello fi lat_proc fork lat_proc exec @@ -27,7 +27,7 @@ $NetBSD: patch-ai,v 1.1 1998/08/30 17:46:27 garbled Exp $ then date > /dev/tty echo Local networking > /dev/tty - if [ ! -d ../../src/webpage-lm ] -+ if [ ! -d XXXPREFIXXXX/share/lmbench/webpage-lm ] ++ if [ ! -d @PREFIX@/share/lmbench/webpage-lm ] then (cd ../../src && tar xf webpage-lm.tar) sync sleep 1 @@ -35,7 +35,7 @@ $NetBSD: patch-ai,v 1.1 1998/08/30 17:46:27 garbled Exp $ SERVERS="lat_udp lat_tcp lat_rpc lat_connect bw_tcp" for server in $SERVERS; do $server -s; done - DOCROOT=../../src/webpage-lm lmhttp 8008 & -+ DOCROOT=XXXPREFIXXXX/share/lmbench/webpage-lm lmhttp 8008 & ++ DOCROOT=@PREFIX@/share/lmbench/webpage-lm lmhttp 8008 & sleep 2; for i in localhost do @@ -45,15 +45,15 @@ $NetBSD: patch-ai,v 1.1 1998/08/30 17:46:27 garbled Exp $ # I want a hot cache number - lat_http $i 8008 < ../../src/webpage-lm/URLS > /dev/null 2>&1 - lat_http $i 8008 < ../../src/webpage-lm/URLS -+ lat_http $i 8008 < XXXPREFIXXXX/share/lmbench/webpage-lm/URLS > /dev/null 2>&1 -+ lat_http $i 8008 < XXXPREFIXXXX/share/lmbench/webpage-lm/URLS ++ lat_http $i 8008 < @PREFIX@/share/lmbench/webpage-lm/URLS > /dev/null 2>&1 ++ lat_http $i 8008 < @PREFIX@/share/lmbench/webpage-lm/URLS lat_http -$i 8008 done for remote in $REMOTE do echo Networking to $remote > /dev/tty - rcp $SERVERS lmhttp ../../src/webpage-lm.tar ${remote}:/tmp -+ rcp $SERVERS lmhttp XXXPREFIXXXX/share/lmbench/webpage-lm.tar ${remote}:/tmp ++ rcp $SERVERS lmhttp @PREFIX@/share/lmbench/webpage-lm.tar ${remote}:/tmp for server in $SERVERS do $RSH $remote -n /tmp/$server -s & done @@ -63,8 +63,8 @@ $NetBSD: patch-ai,v 1.1 1998/08/30 17:46:27 garbled Exp $ # I want a hot cache number - lat_http $remote 8008 < ../../src/webpage-lm/URLS > /dev/null 2>&1 - lat_http $remote 8008 < ../../src/webpage-lm/URLS -+ lat_http $remote 8008 < XXXPREFIXXXX/share/lmbench/webpage-lm/URLS > /dev/null 2>&1 -+ lat_http $remote 8008 < XXXPREFIXXXX/share/lmbench/webpage-lm/URLS ++ lat_http $remote 8008 < @PREFIX@/share/lmbench/webpage-lm/URLS > /dev/null 2>&1 ++ lat_http $remote 8008 < @PREFIX@/share/lmbench/webpage-lm/URLS lat_http -$remote 8008 RM= for server in $SERVERS diff --git a/benchmarks/lmbench/patches/patch-aj b/benchmarks/lmbench/patches/patch-aj index 84a3518ba14..eb559ca64ee 100644 --- a/benchmarks/lmbench/patches/patch-aj +++ b/benchmarks/lmbench/patches/patch-aj @@ -1,4 +1,4 @@ -$NetBSD: patch-aj,v 1.1 1998/08/30 17:46:27 garbled Exp $ +$NetBSD: patch-aj,v 1.2 1998/09/24 08:45:00 agc Exp $ --- results/Makefile.orig Sun Aug 30 09:20:26 1998 +++ results/Makefile Sun Aug 30 09:23:43 1998 @@ -49,7 +49,7 @@ @@ -6,7 +6,7 @@ $NetBSD: patch-aj,v 1.1 1998/08/30 17:46:27 garbled Exp $ SHELL=/bin/sh -SCRIPTS=../scripts/ -+SCRIPTS=XXXPREFIXXXX/bin/lmbench/ ++SCRIPTS=@PREFIX@/bin/lmbench/ MISC= tmp/misc_mhz.bg \ tmp/lat_ctx.bg \ -- cgit v1.2.3