Project import
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c2c38b0 --- /dev/null +++ b/Makefile
@@ -0,0 +1,105 @@ +# +# Copyright (c) 2010-2011 Nest, Inc. +# All rights reserved. +# +# This document is the property of Nest. It is considered +# confidential and proprietary information. +# +# This document may not be reproduced or transmitted in any form, +# in whole or in part, without the express written permission of +# Nest. +# +# Description: +# This file is the makefile for lmbench, a set of utilities to +# test the performance of a POSIX/UNIX system. +# + +BuildConfigSpecialized := No +BuildProductSpecialized := No + +include pre.mak + +PackageName := lmbench + +PackageExtension := tar.gz +PackageSeparator := + +PackagePatchArgs := -p1 + +PackageArchive := $(PackageName).$(PackageExtension) +PackageSourceDir := $(PackageName)$(PackageSeparator)$(PackageVersion) + +PackageBuildMakefile = $(call GenerateBuildPaths,src/Makefile) +PackageBuildDir = $(dir $(PackageBuildMakefile)) + +LicenseSourceFiles := COPYING COPYING-2 +LicenseSourcePaths := $(addprefix $(PackageSourceDir)/,$(LicenseSourceFiles)) + +CleanPaths += $(PackageLicenseFile) + +all: $(PackageDefaultGoal) + +# Generate the package license contents. + +$(LicenseSourcePaths): source + +$(PackageLicenseFile): $(LicenseSourcePaths) + $(Verbose)touch $@ + $(Verbose)for file in $(LicenseSourcePaths); do \ + cat $${file} >> $@; \ + done + +# Extract the source from the archive and apply patches, if any. + +$(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths) + $(expand-and-patch-package) + +# Prepare the sources. + +.PHONY: source +source: | $(PackageSourceDir) + +# Patch the sources, if necessary. + +.PHONY: patch +patch: source + +# Generate the package build makefile. + +$(PackageBuildMakefile): | $(PackageSourceDir) $(BuildDirectory) + $(call create-links,$(CURDIR)/$(PackageSourceDir),$(BuildDirectory)) + +# Configure the source for building. + +.PHONY: configure +configure: source $(PackageBuildMakefile) + +# Build the source. + +.PHONY: build +build: configure + $(Verbose)unset MAKEFLAGS && \ + $(MAKE) $(JOBSFLAG) -C $(PackageBuildDir) \ + CC="$(CC)" CXX="$(CXX)" AR=$(AR) NM=$(NM) RANLIB=$(RANLIB) STRIP=$(STRIP) \ + INSTALL="$(INSTALL) $(INSTALLFLAGS)" \ + BASE=$(ResultDirectory) \ + OS=$(TargetTuple) + +# Stage the build to a temporary installation area. + +.PHONY: stage +stage: build | $(ResultDirectory) + $(Verbose)unset MAKEFLAGS && \ + $(MAKE) $(JOBSFLAG) -C $(PackageBuildDir) \ + CC="$(CC)" CXX="$(CXX)" AR=$(AR) NM=$(NM) RANLIB=$(RANLIB) STRIP=$(STRIP) \ + INSTALL="$(INSTALL) $(INSTALLFLAGS)" \ + BASE=$(ResultDirectory) \ + OS=$(TargetTuple) \ + install + +clean: + $(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir) + $(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory) + $(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory) + +include post.mak
diff --git a/lmbench.patches/lmbench-50.description b/lmbench.patches/lmbench-50.description new file mode 100644 index 0000000..fc9d8e8 --- /dev/null +++ b/lmbench.patches/lmbench-50.description
@@ -0,0 +1,3 @@ +This patch generates lmbench's version number from a preexisting version +script rather than trying to generate it from BitKeeper, which isn't +available when building lmbench from an archive distribution.
diff --git a/lmbench.patches/lmbench-50.patch b/lmbench.patches/lmbench-50.patch new file mode 100644 index 0000000..fa26775 --- /dev/null +++ b/lmbench.patches/lmbench-50.patch
@@ -0,0 +1,27 @@ +diff -aruN a/src/Makefile b/src/Makefile +--- a/src/Makefile 2005-08-22 17:19:54.000000000 -0700 ++++ b/src/Makefile 2010-11-11 10:29:01.965965108 -0800 +@@ -170,6 +170,11 @@ + -echo `bk prs -hr+ -d'$$if(:SYMBOL:){:SYMBOL: }:UTC:' ../ChangeSet;` > bk.ver + touch bk.ver + ++version.out: ../scripts/version ++ rm -f $@ ++ -$< > $@ ++ touch $@ ++ + dist: bk.ver + @if [ "X`cd ..; bk sfiles -c`" != "X" ]; then \ + echo "modified files!"; \ +@@ -228,9 +233,9 @@ + install install-target dist get edit get-e clean clobber \ + share depend testmake + +-$O/lmbench : ../scripts/lmbench bk.ver ++$O/lmbench : ../scripts/lmbench version.out + rm -f $O/lmbench +- sed -e "s/<version>/`cat bk.ver`/g" < ../scripts/lmbench > $O/lmbench ++ sed -e "s/<version>/`cat version.out`/g" < ../scripts/lmbench > $O/lmbench + chmod +x $O/lmbench + + $O/lmbench.a: $(LIBOBJS)
diff --git a/lmbench.patches/lmbench-51.description b/lmbench.patches/lmbench-51.description new file mode 100644 index 0000000..2e72345 --- /dev/null +++ b/lmbench.patches/lmbench-51.description
@@ -0,0 +1,4 @@ +This patch ensures that headers and man pages are installed with user +and group writable permissions. This ensures that subsequent build passes +don't fail when trying to overwrite what were previously read-only +files.
diff --git a/lmbench.patches/lmbench-51.patch b/lmbench.patches/lmbench-51.patch new file mode 100644 index 0000000..77e90f6 --- /dev/null +++ b/lmbench.patches/lmbench-51.patch
@@ -0,0 +1,24 @@ +diff -aruN a/doc/Makefile b/doc/Makefile +--- a/doc/Makefile 2005-08-22 17:19:54.000000000 -0700 ++++ b/doc/Makefile 2010-11-11 10:51:09.130032921 -0800 +@@ -79,7 +79,7 @@ + fi; \ + base=`basename $${f} .$${s}`; \ + if [ "$${base}.$${s}" = "$$f" ]; then \ +- cp $$f ${MANDIR}/man$${s}/; \ ++ install -m 664 $$f ${MANDIR}/man$${s}/; \ + fi; \ + done; \ + done +diff -aruN a/src/Makefile b/src/Makefile +--- a/src/Makefile 2010-11-11 10:29:01.965965108 -0800 ++++ b/src/Makefile 2010-11-11 10:49:21.618659334 -0800 +@@ -144,7 +144,7 @@ + if [ ! -d $(BASE)/include ]; then mkdir $(BASE)/include; fi + if [ ! -d $(BASE)/lib ]; then mkdir $(BASE)/lib; fi + cp $(EXES) $(BASE)/bin +- cp $(INCS) $(BASE)/include ++ install -m 644 $(INCS) $(BASE)/include + cp $O/lmbench.a $(BASE)/lib/libmbench.a + cd ../doc; env MAKEFLAGS="$(MAKEFLAGS)" make CC="${CC}" OS="${OS}" BASE="$(BASE)" install +
diff --git a/lmbench.patches/lmbench-52.description b/lmbench.patches/lmbench-52.description new file mode 100644 index 0000000..4009318 --- /dev/null +++ b/lmbench.patches/lmbench-52.description
@@ -0,0 +1,2 @@ +This patch ensures that the lmbench script is installed when the make +install target is run.
diff --git a/lmbench.patches/lmbench-52.patch b/lmbench.patches/lmbench-52.patch new file mode 100644 index 0000000..29a6de1 --- /dev/null +++ b/lmbench.patches/lmbench-52.patch
@@ -0,0 +1,11 @@ +diff -aruN a/src/Makefile b/src/Makefile +--- a/src/Makefile 2010-11-11 11:56:48.065133553 -0800 ++++ b/src/Makefile 2010-11-11 11:52:27.829228416 -0800 +@@ -144,6 +144,7 @@ + if [ ! -d $(BASE)/include ]; then mkdir $(BASE)/include; fi + if [ ! -d $(BASE)/lib ]; then mkdir $(BASE)/lib; fi + cp $(EXES) $(BASE)/bin ++ cp $O/lmbench $(BASE)/bin + install -m 644 $(INCS) $(BASE)/include + cp $O/lmbench.a $(BASE)/lib/libmbench.a + cd ../doc; env MAKEFLAGS="$(MAKEFLAGS)" make CC="${CC}" OS="${OS}" BASE="$(BASE)" install
diff --git a/lmbench.tar.gz b/lmbench.tar.gz new file mode 100644 index 0000000..3acd63e --- /dev/null +++ b/lmbench.tar.gz Binary files differ
diff --git a/lmbench.url b/lmbench.url new file mode 100644 index 0000000..fcfac8e --- /dev/null +++ b/lmbench.url
@@ -0,0 +1 @@ +http://www.bitmover.com/lmbench/lmbench3.tar.gz
diff --git a/lmbench.version b/lmbench.version new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/lmbench.version
@@ -0,0 +1 @@ +3