docs-common Makefile.common,1.47,1.48
Paul W. Frields (pfrields)
fedora-docs-commits at redhat.com
Thu Feb 9 00:27:47 UTC 2006
Author: pfrields
Update of /cvs/docs/docs-common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv331
Modified Files:
Makefile.common
Log Message:
SHORT VERSION:
* Separate out rpm-common and package-post
* Create additional noarch and srpm targets
LONG VERSION: We need a target that builds only the SRPM to go with
spec file for FE review, so here it is. (Also an additional
disincentive to installing drafts, but that's neither here nor
there.) Next up, adding this functionality to build-docs in
infrastructure/ module. Note that you can now pass flags to
prevent the package-prep and/or package-post steps with any RPM
building process, although this might be an edge case.
Robust! Simple! Elegant! Hopefully not stupid! Now with 50%
more targets. (I added these to .PHONY which I think is the
right thing to do. Everything still works at least...
Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- Makefile.common 7 Feb 2006 21:59:34 -0000 1.47
+++ Makefile.common 9 Feb 2006 00:27:39 -0000 1.48
@@ -62,6 +62,12 @@
# All other rpm-info usages are driven by XSLT scripts.
RPMINFO = ${PWD}/${PRI_LANG}/rpm-info-${PRI_LANG}.xml
endif
+ifeq "${RPMPREP}" ""
+RPMPREP=yes
+endif
+ifeq "${RPMPOST}" ""
+RPMPOST=yes
+endif
#########################################################################
# Define a macro to locate xmlto(1) so we can choose a specific version
# by "make XMLTO=/path/to/xmlto", if we so desire.
@@ -105,7 +111,7 @@
# In a properly-constructed Makefile, this will be the default target
TARGETS=all clean distclean fdp-info html html-nochunks pdf po showvars \
- tarball
+ tarball rpm rpm-common noarch srpm package-prep package-post
.PHONY: ${TARGETS}
.PHONY: $(foreach LANG,${LANGUAGES},html-${LANG})
.PHONY: $(foreach LANG,${LANGUAGES},html-nochunks-${LANG})
@@ -368,24 +374,36 @@
${MAKE} omf
${MAKE} kde.desktop
${MAKE} khelp.desktop
- ${RM} -r rpm
mkdir -p rpm/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
mkdir -p rpm/RPMS/{i386,i486,i586,i686,noarch,ppc,x86_64}
cp -f $(DOCBASE)-$(shell version doc).src.tar.gz rpm/SOURCES/
cp -f ${SPECFILE} rpm/SPECS
cp -f *.omf *.desktop rpm/SOURCES
-rpm::
+rpm-common::
if test $(shell get_latest_revision rpm) = 0 ; then \
echo "*** Creating revision log entry for rpm ***" ; \
ROLE=rpm $(MAKE) clog ; \
fi
${RM} *.rpm
- ${MAKE} package-prep
+ if test $(RPMPREP) != "no" ; then ${MAKE} package-prep ; fi
+
+noarch:: rpm-common
+ rpmbuild -bb $(RPMDFLAG) $(RPMFLAGS) rpm/SPECS/$(SPECFILE)
+ if test $(RPMPOST) != "no" ; then $(MAKE) package-post ; fi
+
+srpm:: rpm-common
+ rpmbuild -bs $(RPMDFLAG) $(RPMFLAGS) rpm/SPECS/$(SPECFILE)
+ if test $(RPMPOST) != "no" ; then $(MAKE) package-post ; fi
+
+rpm:: rpm-common
rpmbuild -ba $(RPMDFLAG) $(RPMFLAGS) rpm/SPECS/$(SPECFILE)
- ln rpm/SRPMS/*.rpm rpm/RPMS/noarch/*.rpm .
- ls *.rpm
+ if test $(RPMPOST) != "no" ; then $(MAKE) package-post ; fi
+package-post::
+ $(MAKE) clean # If needed, review materials in rpm/BUILD/
+ find rpm/ -name '*.rpm' -exec ln '{}' . ';'
+ ls *.rpm
showvars::
@echo "VERSION=$(VERSION)"
More information about the Fedora-docs-commits
mailing list