docs-common Makefile,1.2,1.3
Paul W. Frields (pfrields)
fedora-docs-commits at redhat.com
Sat Dec 24 00:54:17 UTC 2005
Author: pfrields
Update of /cvs/docs/docs-common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12519
Modified Files:
Makefile
Log Message:
Make build a little cleaner
Index: Makefile
===================================================================
RCS file: /cvs/docs/docs-common/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Makefile 12 Oct 2005 14:59:44 -0000 1.2
+++ Makefile 24 Dec 2005 00:54:09 -0000 1.3
@@ -14,8 +14,8 @@
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 @@
RPMFLAGS = --define "docbase $(DOCBASE)" \
--define "version $(VERSION)" \
--define "release $(RELEASE)" \
- --define "_topdir $(PWD)"
+ --define "_topdir $(PWD)/rpmbuild"
+
+RPM = rpm ${RPMFLAGS}
######################################################
@@ -48,7 +50,7 @@
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 @@
# 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}')
More information about the docs-commits
mailing list