docs-common Makefile.common,1.144,1.145

Paul W. Frields (pfrields) fedora-docs-commits at redhat.com
Mon Mar 12 00:08:37 UTC 2007


Author: pfrields

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

Modified Files:
	Makefile.common 
Log Message:
Use new rule to locate docs-common and rely on this for most building, instead of a possibly nonexistent FDPDIR.  This should make a module inclusion or a full repository checkout equally workable.


Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -r1.144 -r1.145
--- Makefile.common	18 Feb 2007 20:04:04 -0000	1.144
+++ Makefile.common	12 Mar 2007 00:08:35 -0000	1.145
@@ -76,23 +76,30 @@
 #########################################################################
 # Supply default values for the boilerplate files _unless_ the user has
 # provided their own values.
+define find-common-dir
+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 echo "$$d"; break; fi; done
+endef
+FDPCOMMONDIR := $(shell $(find-common-dir))
+# FDPDIR may no longer be required.
 ifeq	"${FDPDIR}" ""
-FDPDIR	         = $(PWD)/..
+FDPDIR	         = ${FDPCOMMONDIR}/..
 endif
 ifeq	"${FDPBIN}" ""
-FDPBIN	         = ${FDPDIR}/docs-common/bin
+FDPBIN	         = ${FDPCOMMONDIR}/bin
 endif
 ifeq	"${XSLPDF}" ""
-XSLPDF		= ${FDPDIR}/docs-common/xsl/main-pdf.xsl
+XSLPDF		= ${FDPCOMMONDIR}/xsl/main-pdf.xsl
 endif
 ifeq	"${XSLHTML}" ""
-XSLHTML        	= ${FDPDIR}/docs-common/xsl/main-html.xsl
+XSLHTML        	= ${FDPCOMMONDIR}/xsl/main-html.xsl
 endif
 ifeq	"${XSLHTMLNOCHUNKS}" ""
-XSLHTMLNOCHUNKS	= ${FDPDIR}/docs-common/xsl/main-html-nochunks.xsl
+XSLHTMLNOCHUNKS	= ${FDPCOMMONDIR}/xsl/main-html-nochunks.xsl
 endif
 ifeq	"${HTMLCSS}" ""
-HTMLCSS		= ${FDPDIR}/docs-common/css/fedora-draft.css
+HTMLCSS		= ${FDPCOMMONDIR}/css/fedora-draft.css
 endif
 ifeq	"${DRAFT}" ""
 #DRAFT	= no
@@ -126,7 +133,7 @@
 XMLTO	=xmlto
 XSLTPROC=xsltproc
 XMLFORMAT=xmlformat
-XMLFOPTS=-f $(FDPDIR)/docs-common/bin/xmlformat-fdp.conf
+XMLFOPTS=-f $(FDPCOMMONDIR)/bin/xmlformat-fdp.conf
 XMLLINT	=xmllint
 XML2PO	=xml2po
 XML2POFLAGS=-e
@@ -148,7 +155,7 @@
 
 %.ent:	%.xml
 	${XSLTPROC} -o $@ --stringparam FDPCOMMONDIR "NONE" \
-		${FDPDIR}/docs-common/common/entities/entities.xsl $<
+		${FDPCOMMONDIR}/common/entities/entities.xsl $<
 #########################################################################
 
 #########################################################################
@@ -364,7 +371,7 @@
 ${PRI_LANG}/${PKGNAME}.omf.in:: ${PRI_LANG}/${RPMINFO}
 	${XSLTPROC} --stringparam lang ${PRI_LANG}		\
 		--stringparam docbase ${PKGNAME}		\
-		${FDPDIR}/docs-common/packaging/omf-in.xsl 	\
+		${FDPCOMMONDIR}/packaging/omf-in.xsl 	\
 		$< > $@
 endif
 endif
@@ -595,11 +602,11 @@
 # mydoc-en/index.html:: mydoc-en.xml ${XMLEXTRAFILES}-en
 #  LANG=en.UTF-8 ${XMLTO} html -x $(XSLHTML) -o mydoc-en mydoc-en.xml
 #  mkdir -p mydoc-en/stylesheet-images
-#  cp ${FDPDIR}/docs-common/stylesheet-images/*.png mydoc-en/stylesheet-images/
+#  cp ${FDPCOMMONDIR}/stylesheet-images/*.png mydoc-en/stylesheet-images/
 #  cp ${HTMLCSS} mydoc-en/fedora.css
 #  cp ${HTMLCSSEXTRA} mydoc-en/watermark.png
-#  cp ${FDPDIR}/docs-common/images/watermark.png mydoc-en/
-#  ${FDPDIR}/docs-common/bin/copy-figs -f '*.png' figs mydoc-en/
+#  cp ${FDPCOMMONDIR}/images/watermark.png mydoc-en/
+#  ${FDPCOMMONDIR}/bin/copy-figs -f '*.png' figs mydoc-en/
 # but we do avoid copying EPS files since they are nonsense to the HTML world.
 #
 define	HTML_template
@@ -608,10 +615,10 @@
 ${DOCBASE}-$(1)/index.html::  ${XMLFILES-${1}} ${XMLDEPFILES-${1}}
 	LANG=$(1).UTF-8 ${XMLTO} html -x $(XSLHTML) -o $(DOCBASE)-$(1) $(1)/$(DOCBASE).xml
 	mkdir -p $(DOCBASE)-$(1)/stylesheet-images/
-	cp ${FDPDIR}/docs-common/stylesheet-images/*.png $(DOCBASE)-$(1)/stylesheet-images
+	cp ${FDPCOMMONDIR}/stylesheet-images/*.png $(DOCBASE)-$(1)/stylesheet-images
 	cp ${HTMLCSS} $(DOCBASE)-$(1)/fedora.css
 ifneq	"${DRAFT}" "no"
-	cp ${FDPDIR}/docs-common/images/watermark-$(1).png 		\
+	cp ${FDPCOMMONDIR}/images/watermark-$(1).png 		\
 		$(DOCBASE)-$(1)/watermark.png
 endif
 	[ ! -d figs ] || copy-figs -v -f '*.png' 			\
@@ -644,10 +651,10 @@
 	LANG=${1}.UTF-8 ${XMLTO} html-nochunks -x $(XSLHTMLNOCHUNKS) $(1)/$(DOCBASE).xml
 	mv $(DOCBASE).html $(DOCBASE)-$(1).html
 	mkdir -p stylesheet-images/
-	cp ${FDPDIR}/docs-common/stylesheet-images/*.png stylesheet-images/
+	cp ${FDPCOMMONDIR}/stylesheet-images/*.png stylesheet-images/
 	cp ${HTMLCSS} fedora.css
 ifneq	"${DRAFT}" "no"
-	cp ${FDPDIR}/docs-common/images/watermark-$(1).png watermark.png
+	cp ${FDPCOMMONDIR}/images/watermark-$(1).png watermark.png
 endif
 
 distclean::
@@ -700,7 +707,7 @@
 fo-${1}:: ${1}/${DOCBASE}.fo
 ${1}/${DOCBASE}.fo:: ${XMLFILES-${1}} ${XMLDEPFILES-${1}}
 	LANG=${1}.UTF-8 xsltproc --xinclude 			\
-	     --stringparam FDPDIR  ${FDPDIR}			\
+	     --stringparam FDPCOMMONDIR ${FDPCOMMONDIR}		\
 	     --stringparam IMGROOT ${PWD}			\
 	     --stringparam RENDEREDBY fop-0.20.5		\
 	     ${XSLPDF} ${1}/${DOCBASE}.xml | ${XMLLINT} --format -o $$@ -
@@ -750,7 +757,7 @@
 
 ${DOCBASE}-$(1).txt:: ${XMLFILES-${1}} ${XMLDEPFILES-${1}}
 	${XMLLINT} ${XMLLINTOPT} $(1)/$(DOCBASE).xml > $(1)/$(DOCBASE).lint.xml
-	${XSLTPROC} $(FDPDIR)/docs-common/packaging/strip-for-txt.xsl \
+	${XSLTPROC} $(FDPCOMMONDIR)/packaging/strip-for-txt.xsl \
 		$(1)/$(DOCBASE).lint.xml > $(1)/$(DOCBASE).stripped.xml
 	rm $(1)/$(DOCBASE).lint.xml
 	LANG=$(1).UTF-8 ${XMLTO} ${XMLTOTXTPOSTOPT} txt $(1)/$(DOCBASE).stripped.xml
@@ -846,11 +853,11 @@
 $(1)/fdp-info.xml::	${1}/$(RPMINFO)
 	mkdir -p ${1}
 	LANG=$(1).UTF-8 ${XSLTPROC} --stringparam lang $(1)		\
-		--stringparam fdpdir $(FDPDIR)				\
+		--stringparam fdpcommondir $(FDPCOMMONDIR)		\
 		--stringparam doctype $(shell				\
 			doctype ${PRI_LANG}/$(DOCBASE).xml)		\
 		--stringparam legalbase ${LEGALNOTICEBASE}		\
-		${FDPDIR}/docs-common/packaging/bookinfo.xsl 		\
+		${FDPCOMMONDIR}/packaging/bookinfo.xsl 		\
 		${1}/$(RPMINFO) 				| 	\
 	$(XMLFORMAT) $(XMLFOPTS) >$$@
 
@@ -971,7 +978,7 @@
 
 fedora-doc-${DOCBASE}-gnome.desktop:: ${RPMINFO}
 	$(XSLTPROC) --stringparam docbase "${DOCBASE}"			\
-		${FDPDIR}/docs-common/packaging/gnome-desktop.xsl	\
+		${FDPCOMMONDIR}/packaging/gnome-desktop.xsl	\
 		${RPMINFO} >$@.tmp && move-if-change $@.tmp $@
 
 help::
@@ -984,7 +991,7 @@
 
 fedora-doc-${DOCBASE}-kde.desktop:: ${RPMINFO}
 	$(XSLTPROC) --stringparam docbase "${DOCBASE}"			\
-		${FDPDIR}/docs-common/packaging/kde-desktop.xsl 	\
+		${FDPCOMMONDIR}/packaging/kde-desktop.xsl 	\
 		${RPMINFO} >$@.tmp && move-if-change $@.tmp $@
 
 help::
@@ -997,16 +1004,16 @@
 
 fedora-doc-${DOCBASE}-khelp.desktop:: ${RPMINFO}
 	$(XSLTPROC) --stringparam docbase "${DOCBASE}"			\
-		${FDPDIR}/docs-common/packaging/khelpcenter-plugin.xsl 	\
+		${FDPCOMMONDIR}/packaging/khelpcenter-plugin.xsl 	\
 		${RPMINFO} >$@.tmp && move-if-change $@.tmp $@
 
 
 define	FDP_ENTITIES_template
-${1}/$${FDP_ENTITIES}:: ${FDPDIR}/docs-common/common/entities/entities-${1}.xml
+${1}/$${FDP_ENTITIES}:: ${FDPCOMMONDIR}/common/entities/entities-${1}.xml
 	mkdir -p ${1}
-	xsltproc --stringparam FDPCOMMONDIR "${FDPDIR}/docs-common/common" \
-		$${FDPDIR}/docs-common/common/entities/entities.xsl \
-		$${FDPDIR}/docs-common/common/entities/entities-${1}.xml \
+	xsltproc --stringparam FDPCOMMONDIR "${FDPCOMMONDIR}/common" \
+		$${FDPCOMMONDIR}/common/entities/entities.xsl \
+		$${FDPCOMMONDIR}/common/entities/entities-${1}.xml \
 		>$$@.tmp && move-if-change $$@.tmp $$@
 
 clean::




More information about the Fedora-docs-commits mailing list