summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Moyer <jmoyer@redhat.com>2004-02-26 15:25:10 +0000
committerJeff Moyer <jmoyer@redhat.com>2004-02-26 15:25:10 +0000
commit7e19431abe4429d64c13a4e778c6521b1d18a8cd (patch)
tree3eef5095c66d0fbfdcd0aae7d393bc638fd9d88f
parent72dbddab6bee0379fe272a9cb3e386666f7cbad5 (diff)
downloadlibaio-7e19431abe4429d64c13a4e778c6521b1d18a8cd.tar.gz
rpm building has been moved to rpmbuild. fallback to rpm if rpmbuild is not present
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 868de0a..53f9bd0 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ SPECFILE=$(NAME).spec
VERSION=$(shell awk '/Version:/ { print $$2 }' $(SPECFILE))
RELEASE=$(shell awk '/Release:/ { print $$2 }' $(SPECFILE))
CVSTAG = $(NAME)_$(subst .,-,$(VERSION))_$(subst .,-,$(RELEASE))
-RPM=rpm
+RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm")
prefix=/usr
includedir=$(prefix)/include
@@ -39,4 +39,4 @@ create-archive: tag-archive
archive: clean tag-archive create-archive
srpm: create-archive
- $(RPM) --define "_sourcedir `pwd`" --define "_srcrpmdir `pwd`" --nodeps -bs $(SPECFILE)
+ $(RPMBUILD) --define "_sourcedir `pwd`" --define "_srcrpmdir `pwd`" --nodeps -bs $(SPECFILE)