summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2005-12-24 00:54:09 +0000
committerPaul W. Frields <stickster@gmail.com>2005-12-24 00:54:09 +0000
commit5c10f18776f6e5c5d46ce05606dcfa78b935103a (patch)
tree276a46c36a14002eb161760772218e6cef32fc4c /Makefile
parentcef6135ebb5ae52fb480321f8347254510960a17 (diff)
downloadfedora-doc-utils-5c10f18776f6e5c5d46ce05606dcfa78b935103a.zip
fedora-doc-utils-5c10f18776f6e5c5d46ce05606dcfa78b935103a.tar.gz
fedora-doc-utils-5c10f18776f6e5c5d46ce05606dcfa78b935103a.tar.xz
Make build a little cleaner
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index ef9c338..6bfb38f 100644
--- a/Makefile
+++ b/Makefile
@@ -14,8 +14,8 @@ RELEASE = cvs$(shell date +"%Y%m%d")
DATE = $(shell date +"%Y-%m-%d")
NOW = $(shell date +"%a %b %e %Y")
SPECIN = ../docs-common/packaging/$(DOCBASE).spec
-DOCSPEC = $(PWD)/SPECS/$(DOCBASE).spec
-DOCSRCTAR = $(PWD)/SOURCES/$(DOCBASE)-$(RELEASE).src.tar.gz
+DOCSPEC = $(shell rpm ${RPMFLAGS} --eval '%{_specdir}')/$(DOCBASE).spec
+DOCSRCTAR = $(shell rpm ${RPMFLAGS} --eval '%{_sourcedir}')/$(DOCBASE)-$(RELEASE).src.tar.gz
TITLE = Fedora Documentation Project Shared Files
######################################################
# Some RPM flags...
@@ -23,7 +23,9 @@ TITLE = Fedora Documentation Project Shared Files
RPMFLAGS = --define "docbase $(DOCBASE)" \
--define "version $(VERSION)" \
--define "release $(RELEASE)" \
- --define "_topdir $(PWD)"
+ --define "_topdir $(PWD)/rpmbuild"
+
+RPM = rpm ${RPMFLAGS}
######################################################
@@ -48,7 +50,7 @@ rpm: update
cpio -pamdv $(DOCBASE)-$(RELEASE)
#
# Make RPM build tree; don't rely on local user's setup
- mkdir -p {BUILD,RPMS/noarch,SOURCES,SPECS,SRPMS}
+ mkdir -p rpmbuild/{BUILD,RPMS/noarch,SOURCES,SPECS,SRPMS}
tar -zcvf $(DOCSRCTAR) $(DOCBASE)-$(RELEASE)
cp $(SPECIN) $(DOCSPEC)
rm -rf $(DOCBASE)-$(RELEASE)/
@@ -62,6 +64,6 @@ rpm: update
# Do the build...
#
rpmbuild -bb $(RPMFLAGS) $(DOCSPEC)
- mv RPMS/noarch/*.rpm .
+ mv $(shell ${RPM} --eval '%{_rpmdir}')/noarch/*.rpm .
rpmbuild --clean --rmsource $(RPMFLAGS) $(DOCSPEC)
- rm -rf {BUILD,RPMS,SOURCES,SPECS,SRPMS}
+ rm -rf $(shell ${RPM} --eval '%{_topdir}')