]> Zhao Yanbai Git Server - minix.git/commitdiff
compile & install the unixbenchmark netbsd style 54/354/3
authorBen Gras <ben@minix3.org>
Sat, 16 Feb 2013 23:22:48 +0000 (00:22 +0100)
committerBen Gras <ben@minix3.org>
Fri, 22 Feb 2013 11:49:56 +0000 (12:49 +0100)
for convenient crosscompiling & running.

Change-Id: I7dfcea109c00e1457f9de9b2e6437fe6cf925ba7

55 files changed:
Makefile
benchmarks/Makefile
benchmarks/unixbench-5.1.2/Makefile
benchmarks/unixbench-5.1.2/Makefile.inc [new file with mode: 0644]
benchmarks/unixbench-5.1.2/Run
benchmarks/unixbench-5.1.2/pgms/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/Makefile.inc [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/arithoh/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/context1/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/dhry2/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/dhry2reg/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/double/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/execl/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/float/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/fstime/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/hanoi/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/index.base/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/index.base/index.base [moved from benchmarks/unixbench-5.1.2/pgms/index.base with 100% similarity]
benchmarks/unixbench-5.1.2/pgms/int/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/long/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/looper/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/multi.sh/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/multi.sh/multi.sh [moved from benchmarks/unixbench-5.1.2/pgms/multi.sh with 100% similarity]
benchmarks/unixbench-5.1.2/pgms/pipe/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/poll/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/poll2/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/register/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/select/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/short/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/spawn/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/syscall/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/tst.sh/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/tst.sh/tst.sh [moved from benchmarks/unixbench-5.1.2/pgms/tst.sh with 100% similarity]
benchmarks/unixbench-5.1.2/pgms/ubgears/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/unixbench.logo/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/pgms/unixbench.logo/unixbench.logo [moved from benchmarks/unixbench-5.1.2/pgms/unixbench.logo with 100% similarity]
benchmarks/unixbench-5.1.2/pgms/whetstone-double/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/run.sh/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/run.sh/run.sh [moved from benchmarks/unixbench-5.1.2/run.sh with 100% similarity]
benchmarks/unixbench-5.1.2/src/big.c
benchmarks/unixbench-5.1.2/src/fstime.c
benchmarks/unixbench-5.1.2/src/time-polling.c
benchmarks/unixbench-5.1.2/testdir/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/testdir/Makefile.inc [new file with mode: 0644]
benchmarks/unixbench-5.1.2/testdir/cctest.c/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/testdir/cctest.c/cctest.c [moved from benchmarks/unixbench-5.1.2/testdir/cctest.c with 100% similarity]
benchmarks/unixbench-5.1.2/testdir/dc.dat/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/testdir/dc.dat/dc.dat [moved from benchmarks/unixbench-5.1.2/testdir/dc.dat with 100% similarity]
benchmarks/unixbench-5.1.2/testdir/large.txt/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/testdir/large.txt/large.txt [moved from benchmarks/unixbench-5.1.2/testdir/large.txt with 100% similarity]
benchmarks/unixbench-5.1.2/testdir/sort.src/Makefile [new file with mode: 0644]
benchmarks/unixbench-5.1.2/testdir/sort.src/sort.src [moved from benchmarks/unixbench-5.1.2/testdir/sort.src with 100% similarity]
distrib/sets/getdirs.awk
distrib/sets/lists/minix/mi
etc/mtree/NetBSD.dist.base

index 0455875bc36ade1f0aee47f6982591f1e6dc3137..dce1cde8f5d271ab8f6554e2e46c007023954c88 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -143,6 +143,10 @@ _SUBDIR+=  commands man
 _SUBDIR+=      common drivers kernel servers
 _SUBDIR+=      usr.sbin share rescue sys etc tests compat .WAIT distrib regress
 
+.if defined(__MINIX)
+_SUBDIR+=      benchmarks
+.endif
+
 .for dir in ${_SUBDIR}
 .if "${dir}" == ".WAIT" \
        || (${BUILD_${dir}:Uyes} != "no" && exists(${dir}/Makefile))
index 322246d5f8146214e81d47ab53bd84cf005a3a41..f0578eda76887363163e64712a6feb3b8b6611da 100644 (file)
@@ -1,7 +1,5 @@
 # Makefile for the benchmarks.
 
-all::
-       chmod 755 run
+SUBDIR=unixbench-5.1.2
 
-all clean::
-       for b in *bench*; do cd $$b && $(MAKE) $@; done
+.include <bsd.subdir.mk>
index 5c09de9ab9991790c270a4fe4f22f1caf5e608f9..a35ba60b0f127fa43dbd31d84578c0aac59c08b1 100644 (file)
@@ -1,246 +1,5 @@
-##############################################################################
-#      UnixBench v5.1.1
-#  Based on The BYTE UNIX Benchmarks - Release 3
-#          Module: Makefile   SID: 3.9 5/15/91 19:30:15
-#
-##############################################################################
-# Bug reports, patches, comments, suggestions should be sent to:
-#      David C Niemi <niemi@tux.org>
-#
-# Original Contacts at Byte Magazine:
-#      Ben Smith or Tom Yager at BYTE Magazine
-#      bensmith@bytepb.byte.com    tyager@bytepb.byte.com
-#
-##############################################################################
-#  Modification Log: 7/28/89 cleaned out workload files
-#                    4/17/90 added routines for installing from shar mess
-#                    7/23/90 added compile for dhrystone version 2.1
-#                          (this is not part of Run file. still use old)
-#                          removed HZ from everything but dhry.
-#                          HZ is read from the environment, if not
-#                          there, you must define it in this file
-#                    10/30/90 moved new dhrystone into standard set
-#                          new pgms (dhry included) run for a specified
-#                          time rather than specified number of loops
-#                    4/5/91 cleaned out files not needed for
-#                          release 3 -- added release 3 files -ben
-#                    10/22/97 added compiler options for strict ANSI C
-#                          checking for gcc and DEC's cc on
-#                          Digital Unix 4.x (kahn@zk3.dec.com)
-#                    09/26/07 changes for UnixBench 5.0
-#                    09/30/07 adding ubgears, GRAPHIC_TESTS switch
-#                    10/14/07 adding large.txt
-##############################################################################
-
-##############################################################################
-# CONFIGURATION
-##############################################################################
-
-SHELL = /bin/sh
-
-# GRAPHICS TESTS: Uncomment the definition of "GRAPHIC_TESTS" to enable
-# the building of the graphics benchmarks.  This will require the
-# X11 libraries on your system.
-#
-# Comment the line out to disable these tests.
-# GRAPHIC_TESTS = defined
-
-# Set "GL_LIBS" to the libraries needed to link a GL program.
-GL_LIBS = -lGL -lXext -lX11
-
-# OPTIMISATION SETTINGS:
-
-## Very generic
-OPTON = -O
-
-## For Linux 486/Pentium, GCC 2.7.x and 2.8.x
-#OPTON = -O2 -fomit-frame-pointer -fforce-addr -fforce-mem -ffast-math \
-#      -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2
-
-## For Linux, GCC previous to 2.7.0
-#OPTON = -O2 -fomit-frame-pointer -fforce-addr -fforce-mem -ffast-math -m486
-
-#OPTON = -O2 -fomit-frame-pointer -fforce-addr -fforce-mem -ffast-math \
-#      -m386 -malign-loops=1 -malign-jumps=1 -malign-functions=1
-
-## For Solaris 2, or general-purpose GCC 2.7.x
-#OPTON = -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall
-
-## For Digital Unix v4.x, with DEC cc v5.x
-#OPTON = -O4
-#CFLAGS = -DTIME -std1 -verbose -w0
-
-## generic gcc CFLAGS.  -DTIME must be included.
-CFLAGS += $(CPPFLAGS) -DTIME -DMINIX=1 -D_MINIX=1 -D_POSIX_SOURCE=1
-
-
-##############################################################################
-# END CONFIGURATION
-##############################################################################
-
-
-# local directories
-PROGDIR = ./pgms
-SRCDIR = ./src
-TESTDIR = ./testdir
-RESULTDIR = ./results
-TMPDIR = ./tmp
-# other directories
-INCLDIR = /usr/include
-LIBDIR = /lib
-SCRIPTS = unixbench.logo multi.sh tst.sh index.base
-SOURCES = arith.c big.c context1.c \
-       dummy.c execl.c \
-       fstime.c hanoi.c \
-       pipe.c spawn.c \
-       syscall.c looper.c timeit.c time-polling.c \
-       dhry_1.c dhry_2.c dhry.h whets.c ubgears.c
-TESTS = sort.src cctest.c dc.dat large.txt
-
-# ifdef GRAPHIC_TESTS
-# GRAPHIC_BINS = $(PROGDIR)/ubgears
-# else
-GRAPHIC_BINS =
-# endif
-
-# Program binaries.
-BINS = $(PROGDIR)/arithoh $(PROGDIR)/register $(PROGDIR)/short \
-       $(PROGDIR)/int $(PROGDIR)/long $(PROGDIR)/float $(PROGDIR)/double \
-       $(PROGDIR)/hanoi $(PROGDIR)/syscall $(PROGDIR)/context1 \
-       $(PROGDIR)/pipe $(PROGDIR)/spawn $(PROGDIR)/execl \
-       $(PROGDIR)/dhry2 $(PROGDIR)/dhry2reg  $(PROGDIR)/looper \
-       $(PROGDIR)/fstime $(PROGDIR)/whetstone-double $(GRAPHIC_BINS)
-## These compile only on some platforms...
-# $(PROGDIR)/poll $(PROGDIR)/poll2 $(PROGDIR)/select
-
-# Required non-binary files.
-REQD = $(BINS) $(PROGDIR)/unixbench.logo \
-       $(PROGDIR)/multi.sh $(PROGDIR)/tst.sh $(PROGDIR)/index.base \
-       $(PROGDIR)/gfx-x11 \
-       $(TESTDIR)/sort.src $(TESTDIR)/cctest.c $(TESTDIR)/dc.dat \
-       $(TESTDIR)/large.txt
-
-# ######################### the big ALL ############################
-all: distr programs
-## Ick!!!  What is this about???  How about let's not chmod everything bogusly.
-#      @chmod 744 * $(SRCDIR)/* $(PROGDIR)/* $(TESTDIR)/* $(DOCDIR)/*
-
-# ####################### a check for Run ######################
-check: $(REQD)
-       make all
-# ##############################################################
-# distribute the files out to subdirectories if they are in this one
-distr:
-       @echo "Checking distribution of files"
-# scripts
-       @if  test ! -d  $(PROGDIR) \
-        ; then  \
-           mkdir $(PROGDIR) \
-           ; mv $(SCRIPTS) $(PROGDIR) \
-        ; else \
-           echo "$(PROGDIR)  exists" \
-        ; fi
-# C sources
-       @if  test ! -d  $(SRCDIR) \
-        ; then  \
-           mkdir $(SRCDIR) \
-           ; mv $(SOURCES) $(SRCDIR) \
-        ; else \
-           echo "$(SRCDIR)  exists" \
-        ; fi
-# test data
-       @if  test ! -d  $(TESTDIR) \
-        ; then  \
-           mkdir $(TESTDIR) \
-           ; mv $(TESTS) $(TESTDIR) \
-        ; else \
-           echo "$(TESTDIR)  exists" \
-        ; fi
-# temporary work directory
-       @if  test ! -d  $(TMPDIR) \
-        ; then  \
-           mkdir $(TMPDIR) \
-        ; else \
-           echo "$(TMPDIR)  exists" \
-        ; fi
-# directory for results
-       @if  test ! -d  $(RESULTDIR) \
-        ; then  \
-           mkdir $(RESULTDIR) \
-        ; else \
-           echo "$(RESULTDIR)  exists" \
-        ; fi
-
-programs: $(BINS)
-
-# Individual programs
-$(PROGDIR)/arithoh:    $(SRCDIR)/arith.c
-       $(CC) -o $(PROGDIR)/arithoh ${CFLAGS} ${OPTON} -Darithoh $(SRCDIR)/arith.c
-$(PROGDIR)/register: $(SRCDIR)/arith.c
-       $(CC) -o $(PROGDIR)/register ${CFLAGS} ${OPTON} -Ddatum='register int' $(SRCDIR)/arith.c
-$(PROGDIR)/short: $(SRCDIR)/arith.c
-       $(CC) -o $(PROGDIR)/short ${CFLAGS} ${OPTON} -Ddatum=short $(SRCDIR)/arith.c
-$(PROGDIR)/int: $(SRCDIR)/arith.c
-       $(CC) -o $(PROGDIR)/int ${CFLAGS} ${OPTON} -Ddatum=int $(SRCDIR)/arith.c
-$(PROGDIR)/long: $(SRCDIR)/arith.c
-       $(CC) -o $(PROGDIR)/long ${CFLAGS} ${OPTON} -Ddatum=long $(SRCDIR)/arith.c
-$(PROGDIR)/float: $(SRCDIR)/arith.c
-       $(CC) -o $(PROGDIR)/float ${CFLAGS} ${OPTON} -Ddatum=float $(SRCDIR)/arith.c
-$(PROGDIR)/double: $(SRCDIR)/arith.c
-       $(CC) -o $(PROGDIR)/double ${CFLAGS} ${OPTON} -Ddatum=double $(SRCDIR)/arith.c
-$(PROGDIR)/whetstone-double: $(SRCDIR)/whets.c
-       $(CC) -o $(PROGDIR)/whetstone-double ${CFLAGS} ${OPTON} -DDP -DUNIX -DUNIXBENCH $(SRCDIR)/whets.c -lm
-$(PROGDIR)/hanoi: $(SRCDIR)/hanoi.c
-       $(CC) -o $(PROGDIR)/hanoi ${CFLAGS} ${OPTON} $(SRCDIR)/hanoi.c
-
-$(PROGDIR)/poll: $(SRCDIR)/time-polling.c
-       $(CC) -DHAS_POLL -DUNIXBENCH -o $(PROGDIR)/poll ${CFLAGS} ${OPTON} $(SRCDIR)/time-polling.c
-
-$(PROGDIR)/poll2: $(SRCDIR)/time-polling.c
-       $(CC) -DHAS_POLL2 -DUNIXBENCH -o $(PROGDIR)/poll2 ${CFLAGS} ${OPTON} $(SRCDIR)/time-polling.c
-
-$(PROGDIR)/select: $(SRCDIR)/time-polling.c
-       $(CC) -DHAS_SELECT -DUNIXBENCH -o $(PROGDIR)/select ${CFLAGS} ${OPTON} $(SRCDIR)/time-polling.c
-
-$(PROGDIR)/fstime: $(SRCDIR)/fstime.c
-       $(CC) -o $(PROGDIR)/fstime ${CFLAGS} ${OPTON} $(SRCDIR)/fstime.c
-
-$(PROGDIR)/syscall: $(SRCDIR)/syscall.c
-       $(CC) -o $(PROGDIR)/syscall ${CFLAGS} ${OPTON} $(SRCDIR)/syscall.c
-$(PROGDIR)/context1: $(SRCDIR)/context1.c
-       $(CC) -o $(PROGDIR)/context1 ${CFLAGS} ${OPTON} $(SRCDIR)/context1.c
-$(PROGDIR)/pipe: $(SRCDIR)/pipe.c
-       $(CC) -o $(PROGDIR)/pipe ${CFLAGS} ${OPTON} $(SRCDIR)/pipe.c
-$(PROGDIR)/spawn: $(SRCDIR)/spawn.c
-       $(CC) -o $(PROGDIR)/spawn ${CFLAGS} ${OPTON} $(SRCDIR)/spawn.c
-$(PROGDIR)/execl: $(SRCDIR)/execl.c $(SRCDIR)/big.c
-       $(CC) -o $(PROGDIR)/execl ${CFLAGS} ${OPTON} $(SRCDIR)/execl.c
-
-$(PROGDIR)/dhry2: $(SRCDIR)/dhry_1.c $(SRCDIR)/dhry_2.c $(SRCDIR)/dhry.h
-       cd $(SRCDIR); $(CC) -c ${CFLAGS} -DHZ=${HZ} ${OPTON} dhry_1.c
-       cd $(SRCDIR); $(CC) -c ${CFLAGS} -DHZ=${HZ} ${OPTON} dhry_2.c
-       $(CC) -o $(PROGDIR)/dhry2 ${CFLAGS} ${OPTON} $(SRCDIR)/dhry_1.o $(SRCDIR)/dhry_2.o
-       cd $(SRCDIR); rm -f dhry_1.o dhry_2.o
-$(PROGDIR)/dhry2reg: $(SRCDIR)/dhry_1.c $(SRCDIR)/dhry_2.c $(SRCDIR)/dhry.h
-       cd $(SRCDIR); $(CC) -c ${CFLAGS} -DREG=register -DHZ=${HZ} ${OPTON} dhry_1.c
-       cd $(SRCDIR); $(CC) -c ${CFLAGS} -DREG=register -DHZ=${HZ} ${OPTON} dhry_2.c
-       $(CC) -o $(PROGDIR)/dhry2reg ${CFLAGS} ${OPTON} $(SRCDIR)/dhry_1.o $(SRCDIR)/dhry_2.o
-       cd $(SRCDIR); rm -f dhry_1.o dhry_2.o
-
-$(PROGDIR)/looper: $(SRCDIR)/looper.c
-       $(CC) -o $(PROGDIR)/looper ${CFLAGS} ${OPTON} $(SRCDIR)/looper.c
-
-$(PROGDIR)/ubgears: $(SRCDIR)/ubgears.c
-       $(CC) -o $(PROGDIR)/ubgears ${CFLAGS} ${OPTON} $(SRCDIR)/ubgears.c $(GL_LIBS)
-
-# Run the benchmarks and create the reports
-run:
-       sh ./Run
-
-clean:
-       rm -f $(BINS) core *~ */*~
-
-spotless:      clean
-       rm -f $(RESULTDIR)/* $(TMPDIR)/*
-
-## END ##
+SCRIPTS=Run
+SUBDIR=pgms testdir run.sh
+.include "Makefile.inc"
+.include <bsd.prog.mk>
+.include <bsd.subdir.mk>
diff --git a/benchmarks/unixbench-5.1.2/Makefile.inc b/benchmarks/unixbench-5.1.2/Makefile.inc
new file mode 100644 (file)
index 0000000..63ca782
--- /dev/null
@@ -0,0 +1 @@
+BINDIR=/usr/benchmarks/unixbench
index d5279a62aa060a62dad82b53a89962966280fc1c..799f81665e6537dfe96a4a280e948ceaa782abf7 100755 (executable)
@@ -796,6 +796,7 @@ sub preChecks {
     $ENV{'LANG'} = $language;
 
     # Check that the required files are in the proper places.
+   if (!$ENV{MINIX}) {
     system("make check");
     if ($? != 0) {
         system("make all");
@@ -803,6 +804,7 @@ sub preChecks {
             abortRun("\"make all\" failed");
         }
     }
+   }
 
     # Create a script to kill this run.
     system("echo \"kill -9 $$\" > \"${TMPDIR}/kill_run\"");
diff --git a/benchmarks/unixbench-5.1.2/pgms/Makefile b/benchmarks/unixbench-5.1.2/pgms/Makefile
new file mode 100644 (file)
index 0000000..ba0a874
--- /dev/null
@@ -0,0 +1,6 @@
+
+SUBDIR=arithoh register short int long float double whetstone-double hanoi \
+       poll select fstime syscall context1 pipe spawn execl dhry2 \
+       dhry2reg looper multi.sh tst.sh unixbench.logo index.base # ubgears poll2BB 
+
+.include <bsd.subdir.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/Makefile.inc b/benchmarks/unixbench-5.1.2/pgms/Makefile.inc
new file mode 100644 (file)
index 0000000..2144813
--- /dev/null
@@ -0,0 +1,5 @@
+CPPFLAGS+=-DTIME -DMINIX=1 -D_MINIX=1 -D_POSIX_SOURCE=1 -I../../src/ -D_NETBSD_SOURCE
+HZ=60
+BINDIR=/usr/benchmarks/unixbench/pgms
+
+.PATH: ${.CURDIR}/../../src
diff --git a/benchmarks/unixbench-5.1.2/pgms/arithoh/Makefile b/benchmarks/unixbench-5.1.2/pgms/arithoh/Makefile
new file mode 100644 (file)
index 0000000..b22e4eb
--- /dev/null
@@ -0,0 +1,7 @@
+
+PROG=arithoh
+SRCS=arith.c
+CPPFLAGS+=-Darithoh
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/context1/Makefile b/benchmarks/unixbench-5.1.2/pgms/context1/Makefile
new file mode 100644 (file)
index 0000000..ab0ba81
--- /dev/null
@@ -0,0 +1,5 @@
+
+PROG=context1
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/dhry2/Makefile b/benchmarks/unixbench-5.1.2/pgms/dhry2/Makefile
new file mode 100644 (file)
index 0000000..b4fda6a
--- /dev/null
@@ -0,0 +1,7 @@
+
+PROG=dhry2
+SRCS=dhry_1.c dhry_2.c
+CPPFLAGS+=-DHZ=${HZ}
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/dhry2reg/Makefile b/benchmarks/unixbench-5.1.2/pgms/dhry2reg/Makefile
new file mode 100644 (file)
index 0000000..818fecf
--- /dev/null
@@ -0,0 +1,7 @@
+
+PROG=dhry2reg
+SRCS=dhry_1.c dhry_2.c
+CPPFLAGS+=-DHZ=${HZ} -DREG=register
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/double/Makefile b/benchmarks/unixbench-5.1.2/pgms/double/Makefile
new file mode 100644 (file)
index 0000000..a2b1ce7
--- /dev/null
@@ -0,0 +1,7 @@
+
+PROG=double
+SRCS=arith.c
+CPPFLAGS=-Ddatum='double'
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/execl/Makefile b/benchmarks/unixbench-5.1.2/pgms/execl/Makefile
new file mode 100644 (file)
index 0000000..fc3f7e0
--- /dev/null
@@ -0,0 +1,5 @@
+
+PROG=execl
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/float/Makefile b/benchmarks/unixbench-5.1.2/pgms/float/Makefile
new file mode 100644 (file)
index 0000000..1194e4c
--- /dev/null
@@ -0,0 +1,7 @@
+
+PROG=float
+SRCS=arith.c
+CPPFLAGS=-Ddatum='float'
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/fstime/Makefile b/benchmarks/unixbench-5.1.2/pgms/fstime/Makefile
new file mode 100644 (file)
index 0000000..9500a60
--- /dev/null
@@ -0,0 +1,5 @@
+
+PROG=fstime
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/hanoi/Makefile b/benchmarks/unixbench-5.1.2/pgms/hanoi/Makefile
new file mode 100644 (file)
index 0000000..61169f3
--- /dev/null
@@ -0,0 +1,5 @@
+
+PROG=hanoi
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/index.base/Makefile b/benchmarks/unixbench-5.1.2/pgms/index.base/Makefile
new file mode 100644 (file)
index 0000000..8b563d0
--- /dev/null
@@ -0,0 +1,3 @@
+SCRIPTS=index.base
+SCRIPTSNAME=index.base
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/int/Makefile b/benchmarks/unixbench-5.1.2/pgms/int/Makefile
new file mode 100644 (file)
index 0000000..efff6db
--- /dev/null
@@ -0,0 +1,7 @@
+
+PROG=int
+SRCS=arith.c
+CPPFLAGS=-Ddatum='int'
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/long/Makefile b/benchmarks/unixbench-5.1.2/pgms/long/Makefile
new file mode 100644 (file)
index 0000000..b4c4aca
--- /dev/null
@@ -0,0 +1,7 @@
+
+PROG=long
+SRCS=arith.c
+CPPFLAGS=-Ddatum='long'
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/looper/Makefile b/benchmarks/unixbench-5.1.2/pgms/looper/Makefile
new file mode 100644 (file)
index 0000000..d19bdee
--- /dev/null
@@ -0,0 +1,5 @@
+
+PROG=looper
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/multi.sh/Makefile b/benchmarks/unixbench-5.1.2/pgms/multi.sh/Makefile
new file mode 100644 (file)
index 0000000..49470df
--- /dev/null
@@ -0,0 +1,3 @@
+SCRIPTS=multi.sh
+SCRIPTSNAME=multi.sh
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/pipe/Makefile b/benchmarks/unixbench-5.1.2/pgms/pipe/Makefile
new file mode 100644 (file)
index 0000000..58c702d
--- /dev/null
@@ -0,0 +1,5 @@
+
+PROG=pipe
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/poll/Makefile b/benchmarks/unixbench-5.1.2/pgms/poll/Makefile
new file mode 100644 (file)
index 0000000..dd4965b
--- /dev/null
@@ -0,0 +1,7 @@
+
+PROG=poll
+SRCS=time-polling.c
+CPPFLAGS+=-DHAS_POLL -DUNIXBENCH
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/poll2/Makefile b/benchmarks/unixbench-5.1.2/pgms/poll2/Makefile
new file mode 100644 (file)
index 0000000..ba378ca
--- /dev/null
@@ -0,0 +1,7 @@
+
+PROG=poll2
+SRCS=time-polling.c
+CPPFLAGS+=-DHAS_POLL2 -DUNIXBENCH
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/register/Makefile b/benchmarks/unixbench-5.1.2/pgms/register/Makefile
new file mode 100644 (file)
index 0000000..d3b24d2
--- /dev/null
@@ -0,0 +1,7 @@
+
+PROG=register
+SRCS=arith.c
+CPPFLAGS=-Ddatum='register int'
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/select/Makefile b/benchmarks/unixbench-5.1.2/pgms/select/Makefile
new file mode 100644 (file)
index 0000000..dfc639c
--- /dev/null
@@ -0,0 +1,7 @@
+
+PROG=select
+SRCS=time-polling.c
+CPPFLAGS+=-DHAS_SELECT -DUNIXBENCH
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/short/Makefile b/benchmarks/unixbench-5.1.2/pgms/short/Makefile
new file mode 100644 (file)
index 0000000..95f8423
--- /dev/null
@@ -0,0 +1,7 @@
+
+PROG=short
+SRCS=arith.c
+CPPFLAGS=-Ddatum='short'
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/spawn/Makefile b/benchmarks/unixbench-5.1.2/pgms/spawn/Makefile
new file mode 100644 (file)
index 0000000..8ce1730
--- /dev/null
@@ -0,0 +1,5 @@
+
+PROG=spawn
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/syscall/Makefile b/benchmarks/unixbench-5.1.2/pgms/syscall/Makefile
new file mode 100644 (file)
index 0000000..4545ec3
--- /dev/null
@@ -0,0 +1,5 @@
+
+PROG=syscall
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/tst.sh/Makefile b/benchmarks/unixbench-5.1.2/pgms/tst.sh/Makefile
new file mode 100644 (file)
index 0000000..00699ad
--- /dev/null
@@ -0,0 +1,3 @@
+SCRIPTS=tst.sh
+SCRIPTSNAME=tst.sh
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/ubgears/Makefile b/benchmarks/unixbench-5.1.2/pgms/ubgears/Makefile
new file mode 100644 (file)
index 0000000..c10ca15
--- /dev/null
@@ -0,0 +1,5 @@
+
+PROG=ubgears
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/unixbench.logo/Makefile b/benchmarks/unixbench-5.1.2/pgms/unixbench.logo/Makefile
new file mode 100644 (file)
index 0000000..78e25e7
--- /dev/null
@@ -0,0 +1,3 @@
+SCRIPTS=unixbench.logo
+SCRIPTSNAME=unixbench.logo
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/pgms/whetstone-double/Makefile b/benchmarks/unixbench-5.1.2/pgms/whetstone-double/Makefile
new file mode 100644 (file)
index 0000000..1d3edd2
--- /dev/null
@@ -0,0 +1,8 @@
+
+PROG=whetstone-double
+SRCS=whets.c
+CPPFLAGS+= -DDP -DUNIX -DUNIXBENCH
+LDADD+=-lm
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/run.sh/Makefile b/benchmarks/unixbench-5.1.2/run.sh/Makefile
new file mode 100644 (file)
index 0000000..5f7b3a8
--- /dev/null
@@ -0,0 +1,3 @@
+SCRIPTS=run.sh
+SCRIPTSNAME=run.sh
+.include <bsd.prog.mk>
index b3433782fe2fe0df698d278c4e52eace0965c5fe..2a7b93c068002a6cdf2cbaff729804f8bc55b492 100644 (file)
@@ -581,7 +581,7 @@ void dumpwork(void)
 void fatal(char *s)
 {
     int        i;
-    fprintf(stderr, s);
+    fprintf(stderr, "%s", s);
     fflush(stderr);
     perror("Reason?");
     fflush(stderr);
index 1ed40771249ca7f8c2dcb8fd75577744078e2081..043c6a03d6df39ffc8e32a6b2c33c3cbb878297f 100644 (file)
@@ -53,8 +53,6 @@ char SCCSid[] = "@(#) @(#)fstime.c:3.5 -- 5/15/91 19:30:19";
 
 #ifndef MINIX
 extern void sync(void);
-#else
-extern int sync(void);
 #endif
 
 int w_test(int timeSecs);
index 21fa8b2206186923620b6f19e45756a20c630731..6cad896d1a37e7e432b5f604875fc729ac1d943a 100644 (file)
@@ -62,6 +62,9 @@
 #ifdef HAS_POLL2
 #  include <linux/poll2.h>
 #endif
+#ifdef HAS_SELECT
+#  include <sys/select.h>
+#endif
 #include <unistd.h>
 #include <errno.h>
 #include <stdlib.h>
@@ -80,6 +83,7 @@
 typedef int flag;
 
     
+#ifndef HAS_POLL
 /*
 static inline int find_first_set_bit (CONST void *array, int size)
 */
@@ -143,6 +147,7 @@ static int find_next_set_bit (CONST void *array, int size, int offset)
     index += ul_size - offset;
     return (find_first_set_bit (++ul_array, size - index) + index);
 }   /*  End Function find_next_set_bit  */
+#endif
 
 
 struct callback_struct
diff --git a/benchmarks/unixbench-5.1.2/testdir/Makefile b/benchmarks/unixbench-5.1.2/testdir/Makefile
new file mode 100644 (file)
index 0000000..09d3083
--- /dev/null
@@ -0,0 +1,2 @@
+SUBDIR=cctest.c dc.dat large.txt sort.src
+.include <bsd.subdir.mk>
diff --git a/benchmarks/unixbench-5.1.2/testdir/Makefile.inc b/benchmarks/unixbench-5.1.2/testdir/Makefile.inc
new file mode 100644 (file)
index 0000000..0d4404d
--- /dev/null
@@ -0,0 +1 @@
+BINDIR=/usr/benchmarks/unixbench/testdir
diff --git a/benchmarks/unixbench-5.1.2/testdir/cctest.c/Makefile b/benchmarks/unixbench-5.1.2/testdir/cctest.c/Makefile
new file mode 100644 (file)
index 0000000..96c7ffe
--- /dev/null
@@ -0,0 +1,3 @@
+SCRIPTS=cctest.c
+SCRIPTSNAME=cctest.c
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/testdir/dc.dat/Makefile b/benchmarks/unixbench-5.1.2/testdir/dc.dat/Makefile
new file mode 100644 (file)
index 0000000..73d2bbe
--- /dev/null
@@ -0,0 +1,3 @@
+SCRIPTS=dc.dat
+SCRIPTSNAME=dc.dat
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/testdir/large.txt/Makefile b/benchmarks/unixbench-5.1.2/testdir/large.txt/Makefile
new file mode 100644 (file)
index 0000000..8ee0c16
--- /dev/null
@@ -0,0 +1,3 @@
+SCRIPTS=large.txt
+SCRIPTSNAME=large.txt
+.include <bsd.prog.mk>
diff --git a/benchmarks/unixbench-5.1.2/testdir/sort.src/Makefile b/benchmarks/unixbench-5.1.2/testdir/sort.src/Makefile
new file mode 100644 (file)
index 0000000..58f3b71
--- /dev/null
@@ -0,0 +1,3 @@
+SCRIPTS=sort.src
+SCRIPTSNAME=sort.src
+.include <bsd.prog.mk>
index f82e6a2a6a90a4ffc663daf15316fe8376809896..fa84a723be35a0db0524ec9f541d1305c0fba275 100644 (file)
@@ -32,7 +32,7 @@
 function dirname(file) \
 {
        # no need to worry about args that do not contain at least one "/"
-       gsub(/\/[^\/]+$/, "", file)
+       gsub(/\/[^\/]*+/, "", file)
        return file
 }
 
index d1616b56c8ead4bea520b3aa07bdc3d7f3fd35cb..491b911fb208d21aa05b740b8736b0815f42616d 100644 (file)
 ./usr/ast/.exrc                                minix-sys
 ./usr/ast                              minix-sys
 ./usr/ast/.profile                     minix-sys
+./usr/benchmarks                                       minix-sys
+./usr/benchmarks/unixbench                             minix-sys
+./usr/benchmarks/unixbench/pgms                                minix-sys
+./usr/benchmarks/unixbench/pgms/arithoh                        minix-sys
+./usr/benchmarks/unixbench/pgms/register               minix-sys
+./usr/benchmarks/unixbench/pgms/short                  minix-sys
+./usr/benchmarks/unixbench/pgms/int                    minix-sys
+./usr/benchmarks/unixbench/pgms/long                   minix-sys
+./usr/benchmarks/unixbench/pgms/float                  minix-sys
+./usr/benchmarks/unixbench/pgms/double                 minix-sys
+./usr/benchmarks/unixbench/pgms/whetstone-double       minix-sys
+./usr/benchmarks/unixbench/pgms/hanoi                  minix-sys
+./usr/benchmarks/unixbench/pgms/poll                   minix-sys
+./usr/benchmarks/unixbench/pgms/select                 minix-sys
+./usr/benchmarks/unixbench/pgms/fstime                 minix-sys
+./usr/benchmarks/unixbench/pgms/syscall                        minix-sys
+./usr/benchmarks/unixbench/pgms/context1               minix-sys
+./usr/benchmarks/unixbench/pgms/pipe                   minix-sys
+./usr/benchmarks/unixbench/pgms/spawn                  minix-sys
+./usr/benchmarks/unixbench/pgms/execl                  minix-sys
+./usr/benchmarks/unixbench/pgms/dhry2                  minix-sys
+./usr/benchmarks/unixbench/pgms/dhry2reg               minix-sys
+./usr/benchmarks/unixbench/pgms/looper                 minix-sys
+./usr/benchmarks/unixbench/pgms/multi.sh               minix-sys
+./usr/benchmarks/unixbench/pgms/tst.sh                 minix-sys
+./usr/benchmarks/unixbench/pgms/unixbench.logo         minix-sys
+./usr/benchmarks/unixbench/pgms/index.base             minix-sys
+./usr/benchmarks/unixbench/tmp                         minix-sys
+./usr/benchmarks/unixbench/testdir                     minix-sys
+./usr/benchmarks/unixbench/testdir/cctest.c            minix-sys
+./usr/benchmarks/unixbench/testdir/dc.dat              minix-sys
+./usr/benchmarks/unixbench/testdir/large.txt           minix-sys
+./usr/benchmarks/unixbench/testdir/sort.src            minix-sys
+./usr/benchmarks/unixbench/Run                         minix-sys
+./usr/benchmarks/unixbench/run.sh                      minix-sys
+./usr/benchmarks/unixbench/results                     minix-sys
 ./usr/bin/acknm                                minix-sys
 ./usr/bin/acksize                      minix-sys
 ./usr/bin/add_route                    minix-sys
index f251f34aecb458603af339d3da4e7aec75ccf9b1..eddf262ce668a738627b61108d7246ff8bf9b202 100644 (file)
 ./usr/ast
 ./usr/bin
 ./usr/etc
+./usr/benchmarks
+./usr/benchmarks/unixbench
+./usr/benchmarks/unixbench/pgms
+./usr/benchmarks/unixbench/tmp
+./usr/benchmarks/unixbench/testdir
+./usr/benchmarks/unixbench/results
 ./usr/include
 ./usr/include/arpa
 ./usr/include/compat