summaryrefslogtreecommitdiffstats
path: root/Makefile.common
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.common')
-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)"