diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2009-10-09 18:17:02 +0000 |
---|---|---|
committer | <> | 2013-09-20 15:53:04 +0000 |
commit | e6a27c468cae77ce26f6aa924b22bd39055892fe (patch) | |
tree | 5799c05ec62d99e582db411ed0fe5ffd2ba519db /libaio-0.3.109/Makefile | |
download | libaio-tarball-e6a27c468cae77ce26f6aa924b22bd39055892fe.tar.gz |
Imported from /home/lorry/working-area/delta_libaio-tarball/libaio_0.3.109.orig.tar.gz.HEADlibaio_0.3.109.origmaster
Diffstat (limited to 'libaio-0.3.109/Makefile')
-rw-r--r-- | libaio-0.3.109/Makefile | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/libaio-0.3.109/Makefile b/libaio-0.3.109/Makefile new file mode 100644 index 0000000..21fb6ae --- /dev/null +++ b/libaio-0.3.109/Makefile @@ -0,0 +1,71 @@ +NAME=libaio +SPECFILE=$(NAME).spec +VERSION=$(shell awk '/Version:/ { print $$2 }' $(SPECFILE)) +RELEASE=$(shell awk '/Release:/ { print $$2 }' $(SPECFILE)) +CVSTAG = $(NAME)_$(subst .,-,$(VERSION))_$(subst .,-,$(RELEASE)) +RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm") + +prefix=/usr +includedir=$(prefix)/include +libdir=$(prefix)/lib + +pkgname := libaio +ver := $(shell cat .version) + +version_dirty := $(strip $(shell git diff | lsdiff | grep ".version")) +dirty := $(strip $(shell git whatchanged ${pkgname}-${ver}... 2>/dev/null)) +new_changes := $(strip $(shell git diff 2>/dev/null)) +tag_valid := $(strip $(shell git tag -l ${pkgname}-${ver})) + +default: all + +all: + @$(MAKE) -C src + +install: + @$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir) + +check: + @$(MAKE) -C harness check + +partcheck: all + @$(MAKE) -C harness partcheck + +clean: + @$(MAKE) -C src clean + @$(MAKE) -C harness clean + +tag: tag-checks + git tag ${pkgname}-${ver} + +archive: uptodate + @echo "Creating archive from version ${pkgname}-${ver}:" + git archive --format=tar --prefix=${pkgname}-${ver}/ \ + ${pkgname}-${ver} | gzip > ${pkgname}-${ver}.tar.gz +tag-checks: +ifneq (${version_dirty},) + @echo "Error: .version is not committed to the repository." + @exit 1 +endif +ifneq (${new_changes},) + @echo "Error: there are changes in this checkout that have not been" + @echo "committed to the repository." + @exit 1 +endif + +uptodate: tag-checks +ifneq (${dirty},) + @echo -n "Error: this branch contains changes that are not part of tag " + @echo "${pkgname}-${ver}." + @echo -n "Try running git-whatchanged ${pkgname}-${ver}... to see " + @echo "the changes." + @exit 1 +endif +ifeq (${tag_valid},) + @echo "Error: tag ${pkgname}-${ver} does not exist. Run 'make tag'" + @echo "and try again." + @exit 1 +endif + +srpm: archive + $(RPMBUILD) --define "_sourcedir `pwd`" --define "_srcrpmdir `pwd`" --nodeps -bs $(SPECFILE) |