summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2006-02-09 00:27:39 +0000
committerPaul W. Frields <stickster@gmail.com>2006-02-09 00:27:39 +0000
commitcd24b0d270a58f139fb7c0b1614d3e2065b4c448 (patch)
tree66aed464ac88be08b54ce2aca4a1d33e30110198
parentd8686b6b748fa9a1ad2bdb069e201e62008efd08 (diff)
downloadfedora-doc-utils-cd24b0d270a58f139fb7c0b1614d3e2065b4c448.tar.gz
fedora-doc-utils-cd24b0d270a58f139fb7c0b1614d3e2065b4c448.tar.xz
fedora-doc-utils-cd24b0d270a58f139fb7c0b1614d3e2065b4c448.zip
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...
-rw-r--r--Makefile.common30
1 files changed, 24 insertions, 6 deletions
diff --git a/Makefile.common b/Makefile.common
index 8a91c77..2dae705 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -62,6 +62,12 @@ ifeq "${RPMINFO}" ""
# 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 @@ LANG =en
# 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 @@ package-prep::
${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)"