example-tutorial Makefile,1.24,1.25

Paul W. Frields (pfrields) fedora-docs-commits at redhat.com
Fri Dec 30 16:56:46 UTC 2005


Author: pfrields

Update of /cvs/docs/example-tutorial
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29842/example-tutorial

Modified Files:
	Makefile 
Log Message:
Rebuilding docs offline from SRPM now works too


Index: Makefile
===================================================================
RCS file: /cvs/docs/example-tutorial/Makefile,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- Makefile	30 Dec 2005 07:10:10 -0000	1.24
+++ Makefile	30 Dec 2005 16:56:39 -0000	1.25
@@ -54,6 +54,11 @@
 # Some RPM flags...
 ######################################################
 RPMFLAGS=--define "docbase $(DOCBASE)" --define "version $(VERSION)" --define "_topdir $(PWD)" --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" --define "_sourcedir $(PWD)" --define "_rpmdir $(PWD)" --define "_srcrpmdir $(PWD)" --define "_specdir $(PWD)" --define "fdpdir $(FDPDIR)"
+
+SPECFILE=$(PWD)/fedora-doc-$(DOCBASE).spec
+ifeq	(${RPMDEBUG},1)
+RPMDFLAG	= -vv
+endif
 ######################################################
 
 
@@ -61,7 +66,7 @@
 	${RM} -rf fedora-doc-$(DOCBASE)*.rpm
 	${RM} -rf $(DOCBASE)-$(VERSION)*.src.tar.gz
 	${RM} -rf BUILD/ $(DOCBASE)-$(VERSION)/
-	${RM} -f *omf *desktop *spec
+	${RM} -f *omf *desktop $(SPECFILE)
 	${RM} -f fdp-info-*.xml
 	sed -i 's@^\( *[^<]*&FDP-INFO;.*\)@\<!-- \1 - DO NOT REMOVE THIS COMMENT --\>@g' $(DOCBASE)-*.xml
 
@@ -83,7 +88,7 @@
 
 spec::
 	$(XSLTPROC) ../docs-common/packaging/spec.xsl rpm-info.xml > \
-		fedora-doc-$(DOCBASE).spec
+		$(SPECFILE)
 
 
 gnome.desktop::
@@ -134,13 +139,18 @@
 src-tarball:: $(DOCBASE)-$(VERSION).src.tar.gz
 
 
-rpm::  src-tarball spec
-# depend on source tarball and lang-specific HTML tarball
-# Make RPM build tree; don't rely on local user's setup
+package-prep::
+# This keeps things tidier when looking at results
 	mkdir -p BUILD
-	rpmbuild -ba $(RPMFLAGS) fedora-doc-$(DOCBASE).spec
-	rpmbuild --clean --rmsource $(RPMFLAGS) fedora-doc-$(DOCBASE).spec
-	rm -rf BUILD
+
+i386 ppc x86_64 noarch::  src-tarball package-prep spec
+# Capture all arch since package is noarch anyway
+	rpmbuild -bb $(RPMDFLAG) $(RPMFLAGS) $(SPECFILE)
+
+srpm::  src-tarball package-prep spec
+	rpmbuild -bs $(RPMDFLAG) $(RPMFLAGS) $(SPECFILE)
+
+rpm::  src-tarball package-prep spec noarch srpm
 
 
 showvars::




More information about the Fedora-docs-commits mailing list