docs-common Makefile.common,1.171,1.172

Paul W. Frields (pfrields) fedora-docs-commits at redhat.com
Fri Sep 7 17:23:20 UTC 2007


Author: pfrields

Update of /cvs/docs/docs-common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25962

Modified Files:
	Makefile.common 
Log Message:
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



Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -r1.171 -r1.172
--- Makefile.common	7 Sep 2007 17:05:17 -0000	1.171
+++ Makefile.common	7 Sep 2007 17:23:18 -0000	1.172
@@ -81,75 +81,44 @@
 	/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 @@
 
 #########################################################################
 ifndef RPMFLAGS
-RPMFLAGS:=--define "docbase $(DOCBASE)" 				\
+RPMFLAGS?=--define "docbase $(DOCBASE)" 				\
 	 --define "_topdir $(PWD)/rpm" 					\
 	 --define "_srpmdir ${PWD}"					\
 	 --define "_rpmdir ${PWD}"					\
@@ -183,9 +152,8 @@
 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




More information about the docs-commits mailing list