summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2007-09-07 17:23:18 +0000
committerPaul W. Frields <stickster@gmail.com>2007-09-07 17:23:18 +0000
commitfbaae3bcb69d773e1498037bbc1c2b54fac64d5e (patch)
tree391677d87a74d68d4a87212828ad31af229d53e8
parentf01ae9987f4d8c63e79aa5e29f8a8df32b5d9d77 (diff)
downloadfedora-doc-utils-fbaae3bcb69d773e1498037bbc1c2b54fac64d5e.tar.gz
fedora-doc-utils-fbaae3bcb69d773e1498037bbc1c2b54fac64d5e.tar.xz
fedora-doc-utils-fbaae3bcb69d773e1498037bbc1c2b54fac64d5e.zip
Shorten the preamble considerably by using the exact equivalent
conditional assignment. In other words, ifeq "${FOO}" "" FOO = bar endif is exactly equivalent to FOO ?= bar
-rw-r--r--Makefile.common96
1 files changed, 32 insertions, 64 deletions
diff --git a/Makefile.common b/Makefile.common
index 9bb9a18..842555e 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -81,75 +81,44 @@ for d in $(PWD)/docs-common $(PWD)/../docs-common $(PWD)/../../docs-common \
/usr/share/fedora/doc/docs-common ; do \
if [ -f $$d/Makefile.common ] ; then (cd "$$d" && /bin/pwd); break; fi; done
endef
-FDPCOMMONDIR := $(shell $(find-common-dir))
+FDPCOMMONDIR := $(shell $(find-common-dir))
# FDPDIR may no longer be required.
-ifeq "${FDPDIR}" ""
-FDPDIR = ${FDPCOMMONDIR}/..
-endif
-ifeq "${FDPBIN}" ""
-FDPBIN = ${FDPCOMMONDIR}/bin
-endif
-ifeq "${XSLPDF}" ""
-XSLPDF = ${FDPCOMMONDIR}/xsl/main-pdf.xsl
-endif
-ifeq "${XSLHTML}" ""
-XSLHTML = ${FDPCOMMONDIR}/xsl/main-html.xsl
-endif
-ifeq "${XSLHTMLNOCHUNKS}" ""
-XSLHTMLNOCHUNKS = ${FDPCOMMONDIR}/xsl/main-html-nochunks.xsl
-endif
-ifeq "${HTMLCSS}" ""
-HTMLCSS = ${FDPCOMMONDIR}/css/fedora-draft.css
-endif
-ifeq "${DRAFT}" ""
-#DRAFT = no
-DRAFT = yes
-endif
-ifeq "${PRI_LANG}" ""
-PRI_LANG= en
-endif
-ifeq "${POTBASE}" ""
-POTBASE=${DOCBASE}
-endif
-ifeq "${RPMINFO}" ""
-RPMINFO = rpm-info.xml
-endif
-ifeq "${RPMPREP}" ""
-RPMPREP=yes
-endif
-ifeq "${RPMPOST}" ""
-RPMPOST=yes
-endif
-ifeq "${XMLTOTXTPOSTOPT}" ""
-XMLTOTXTPOSTOPT =-p '-I iso-8859-15 -O UTF-8'
-endif
-ifeq "${XMLLINTOPT}" ""
-XMLLINTOPT =--xinclude --postvalid --noent
-endif
-ifeq "${LEGALNOTICEBASE}" ""
-LEGALNOTICEBASE =legalnotice-opl
-endif
+FDPDIR ?= ${FDPCOMMONDIR}/..
+FDPBIN ?= ${FDPCOMMONDIR}/bin
+XSLPDF ?= ${FDPCOMMONDIR}/xsl/main-pdf.xsl
+XSLHTML ?= ${FDPCOMMONDIR}/xsl/main-html.xsl
+XSLHTMLNOCHUNKS ?= ${FDPCOMMONDIR}/xsl/main-html-nochunks.xsl
+HTMLCSS ?= ${FDPCOMMONDIR}/css/fedora-draft.css
+DRAFT ?= yes
+PRI_LANG ?= en
+POTBASE ?= ${DOCBASE}
+RPMINFO ?= rpm-info.xml
+RPMPREP ?= yes
+RPMPOST ?= yes
+XMLTOTXTPOSTOPT ?= -p '-I iso-8859-15 -O UTF-8'
+XMLLINTOPT ?= --xinclude --postvalid --noent
+LEGALNOTICEBASE ?= legalnotice-opl
#########################################################################
#########################################################################
# Use macros to locate our commonly-used programs
-XMLTO =xmlto
-XSLTPROC=xsltproc
-XSLTPROCOPTS=--path ${FDPCOMMONDIR}/common/entities:${FDPCOMMONDIR}/packaging
-XMLFORMAT=xmlformat
-XMLFOPTS=-f $(FDPCOMMONDIR)/bin/xmlformat-fdp.conf
-XMLLINT =xmllint
-XML2PO =xml2po
+XMLTO ?= xmlto
+XSLTPROC ?= xsltproc
+XSLTPROCOPTS ?= --path ${FDPCOMMONDIR}/common/entities:${FDPCOMMONDIR}/packaging
+XMLFORMAT ?= xmlformat
+XMLFOPTS ?= -f $(FDPCOMMONDIR)/bin/xmlformat-fdp.conf
+XMLLINT ?= xmllint
+XML2PO ?= xml2po
# NEVER CHANGE ${XML2POFLAGS} TO "-k", EVER. THAT WOULD BE STUPID.
-XML2POFLAGS=-e
-MSGMERGE=msgmerge
-MSGFMT =msgfmt
-LN =ln
-MEINPROC=meinproc
+XML2POFLAGS ?= -e
+MSGMERGE ?= msgmerge
+MSGFMT ?= msgfmt
+LN ?= ln
+MEINPROC ?= meinproc
#########################################################################
#########################################################################
-FDP_ENTITIES=fdp-entities.ent
+FDP_ENTITIES ?= fdp-entities.ent
#########################################################################
#########################################################################
@@ -174,7 +143,7 @@ SHELL =${FDPBIN}/fdpsh
#########################################################################
ifndef RPMFLAGS
-RPMFLAGS:=--define "docbase $(DOCBASE)" \
+RPMFLAGS?=--define "docbase $(DOCBASE)" \
--define "_topdir $(PWD)/rpm" \
--define "_srpmdir ${PWD}" \
--define "_rpmdir ${PWD}" \
@@ -183,9 +152,8 @@ RPMFLAGS:=--define "docbase $(DOCBASE)" \
endif
# Do not use specspo by default in case we want to use summary or desc
-ifeq "${RPMI18N}" ""
-RPMFLAGS :=${RPMFLAGS} --i18ndomains %{nil}
-endif
+RPMI18N ?= --i18ndomains %{nil}
+RPMFLAGS := ${RPMFLAGS} ${RPMI18N}
ifneq "${RPMDEBUG}" ""
RPMDFLAG = -vv