docs-common Makefile.common,1.38,1.39

Tommy Reynolds (jtr) fedora-docs-commits at redhat.com
Fri Feb 3 17:57:27 UTC 2006


Author: jtr

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

Modified Files:
	Makefile.common 
Log Message:
1) XML files are now expected to be in an "${LANG}/" subdirectory.



Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- Makefile.common	3 Feb 2006 15:52:52 -0000	1.38
+++ Makefile.common	3 Feb 2006 17:57:19 -0000	1.39
@@ -55,7 +55,7 @@
 DRAFT	= yes
 endif
 ifeq	"${RPMINFO}" ""
-RPMINFO		= ${PWD}/rpm-info.xml
+RPMINFO		= ${PWD}/${LANG}/rpm-info-${LANG}.xml
 endif
 #########################################################################
 # Define a macro to locate xmlto(1) so we can choose a specific version
@@ -87,16 +87,10 @@
 	 --define "fdpdir $(FDPDIR)"
 
 SPECFILE=fedora-doc-$(DOCBASE).spec
-ifeq	(${RPMDEBUG},1)
+
+ifeq	"${RPMDEBUG}" "1"
 RPMDFLAG	= -vv
 endif
-RPMJUNK	=								\
-	 --define "_sourcedir $(PWD)" 					\
-	 --define "_rpmdir $(PWD)" 					\
-	 --define "_srcrpmdir $(PWD)" 					\
-	 --define "_specdir $(PWD)" 					\
-	 --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
-	FIXME
 #########################################################################
 # Set a provisional ${LANG} value.  We'll dynamically change this as 
 # needed.  The "en" value is used because that is the original language
@@ -130,8 +124,8 @@
 # but we do avoid copying EPS files since they are nonsense to the HTML world.
 #
 define	HTML_template
-html-$(1) ${DOCBASE}-$(1)/index.html:: ${DOCBASE}-$(1).xml $$(XMLEXTRAFILES-$(1)) fdp-info-$(1).xml
-	LANG=$(1).UTF-8 ${XMLTO} html -x $(XSLHTML) -o $(DOCBASE)-$(1) $(DOCBASE)-$(1).xml
+html-$(1) ${DOCBASE}-$(1)/index.html:: $(1)/${DOCBASE}-$(1).xml $$(XMLEXTRAFILES-$(1)) $(1)/fdp-info-$(1).xml
+	LANG=$(1).UTF-8 ${XMLTO} html -x $(XSLHTML) -o $(DOCBASE)-$(1) $(1)/$(DOCBASE)-$(1).xml
 	mkdir -p $(DOCBASE)-$(1)/stylesheet-images/
 	cp ${FDPDIR}/docs-common/stylesheet-images/*.png $(DOCBASE)-$(1)/stylesheet-images
 	cp ${HTMLCSS} $(DOCBASE)-$(1)/fedora.css
@@ -150,8 +144,8 @@
 #########################################################################
 # For each language in ${LANGUAGES}, generate a single HTML file
 define	HTMLNOCHUNK_template
-html-nochunks-$(1) ${DOCBASE}-$(1).html::	${DOCBASE}-$(1).xml $$(XMLEXTRAFILES-$(1)) fdp-info-$(1).xml
-	${XMLTO} html-nochunks -x $(XSLHTMLNOCHUNKS) $(DOCBASE)-$(1).xml
+html-nochunks-$(1) ${DOCBASE}-$(1).html::	$(1)/${DOCBASE}-$(1).xml $$(XMLEXTRAFILES-$(1)) $(1)/fdp-info-$(1).xml
+	${XMLTO} html-nochunks -x $(XSLHTMLNOCHUNKS) $(1)/$(DOCBASE)-$(1).xml
 	mkdir -p stylesheet-images/
 	cp ${FDPDIR}/docs-common/stylesheet-images/*.png stylesheet-images/
 	cp ${HTMLCSS} fedora.css
@@ -181,8 +175,8 @@
 # For each language in ${LANGUAGES}, generate an Adobe Portable Document
 # Format (PDF) file.
 define	PDF_template
-pdf-$(1) ${DOCBASE}-$(1).pdf:: ${DOCBASE}-$(1).xml $$(XMLEXTRAFILES-$(1))
-	${XMLTO} pdf -x $(XSLPDF) $(DOCBASE)-$(1).xml
+pdf-$(1) ${DOCBASE}-$(1).pdf:: $(1)/${DOCBASE}-$(1).xml $$(XMLEXTRAFILES-$(1))
+	${XMLTO} pdf -x $(XSLPDF) $(1)/$(DOCBASE)-$(1).xml
 endef
 #
 $(foreach LANG,${LANGUAGES},$(eval $(call PDF_template,${LANG})))
@@ -194,7 +188,7 @@
 # For each language in ${LANGUAGES}, clean up!
 define	CLEAN_template
 ${DOCBASE}-$(1)-clean::
-	${RM} fdp-info-$(1).xml
+	${RM} $(1)/fdp-info-$(1).xml
 endef
 #
 $(foreach LANG,${LANGUAGES},$(eval $(call CLEAN_template,${LANG})))
@@ -211,6 +205,7 @@
 	${RM} *-$(1).omf
 	${RM} *-$(1).desktop
 	${RM} fedora.css watermark-${LANG}.png watermark.png
+	${RM} $(1)/*.po
 endef
 #
 $(foreach LANG,${LANGUAGES},$(eval $(call DISTCLEAN_template,${LANG})))
@@ -219,13 +214,14 @@
 #########################################################################
 # Target "po" produces ".po" files from the manifested XML files for
 # the current language.
-POFILES	=${DOCBASE}-${LANG}.po ${XMLEXTRAFILES-${LANG}:.xml=.po}
+POFILES	=${LANG}/${DOCBASE}-${LANG}.po ${XMLEXTRAFILES-${LANG}:.xml=.po}
 po::	${POFILES}
 #########################################################################
 #
 showvars::
 	@echo "DOCBASE=\"$(DOCBASE)\""
 	@echo "LANGUAGES=\"$(LANGUAGES)\""
+	@echo "POFILES=\"${POFILES}\""
 #
 #########################################################################
 # Show differences between two file revisions. To use this tool:
@@ -246,14 +242,14 @@
 # "rpm-info.xml" file whenever that file changes.
 #
 define fdp-info_template
-fdp-info-$(1).xml::	$(RPMINFO)
+$(1)/fdp-info-$(1).xml::	$(RPMINFO)
 	${XSLTPROC} --stringparam lang $(1)				\
 		--stringparam doctype $(shell				\
-			doctype $(DOCBASE)-$(1).xml			\
+			doctype $(1)/$(DOCBASE)-$(1).xml		\
 		) ${FDPDIR}/docs-common/packaging/bookinfo.xsl 		\
 		$(RPMINFO) 					| 	\
-	$(XMLFORMAT) $(XMLFOPTS) > fdp-info-$(1).xml.tmp	&&	\
-		move-if-change fdp-info-$(1).xml.tmp fdp-info-$(1).xml
+	$(XMLFORMAT) $(XMLFOPTS) > $(1)/fdp-info-$(1).xml.tmp	&&	\
+	move-if-change $(1)/fdp-info-$(1).xml.tmp $(1)/fdp-info-$(1).xml
 endef
 #
 $(foreach LANG,${LANGUAGES},$(eval $(call fdp-info_template,${LANG})))
@@ -294,7 +290,6 @@
 	${RM} *.desktop
 	${RM} *.spec
 	${RM} *.src.tar.gz
-	${RM} *.po
 
 spec::	${SPECFILE}
 




More information about the Fedora-docs-commits mailing list