diff options
author | Tommy Reynolds <Tommy.Reynolds@MegaCoder.com> | 2006-02-03 17:57:19 +0000 |
---|---|---|
committer | Tommy Reynolds <Tommy.Reynolds@MegaCoder.com> | 2006-02-03 17:57:19 +0000 |
commit | c4666a80dcff9d8625e9630e29a28819100f9e80 (patch) | |
tree | 6038725bab301c4ef65a59834120b7a451896c5e /Makefile.common | |
parent | 0e0899afeb87dd8040b6b2c9ac4787b5ee24cf71 (diff) | |
download | fedora-doc-utils-c4666a80dcff9d8625e9630e29a28819100f9e80.tar.gz fedora-doc-utils-c4666a80dcff9d8625e9630e29a28819100f9e80.tar.xz fedora-doc-utils-c4666a80dcff9d8625e9630e29a28819100f9e80.zip |
1) XML files are now expected to be in an "${LANG}/" subdirectory.
Diffstat (limited to 'Makefile.common')
-rw-r--r-- | Makefile.common | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/Makefile.common b/Makefile.common index f145690..c2a486b 100644 --- a/Makefile.common +++ b/Makefile.common @@ -55,7 +55,7 @@ ifeq "${DRAFT}" "" 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 @@ RPMFLAGS=--define "docbase $(DOCBASE)" \ --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 @@ ${TARGETS}:: # 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 @@ html:: $(foreach LANG,${LANGUAGES},html-${LANG}) ######################################################################### # 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 @@ $(foreach LANG,${LANGUAGES},$(eval $(call HTMLTAR_template,${LANG}))) # 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 @@ pdf:: $(foreach LANG,${LANGUAGES},pdf-$(LANG).pdf) # 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 @@ ${DOCBASE}-$(1)-distclean:: ${DOCBASE}-$(1)-clean ${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 @@ distclean:: $(foreach LANG,${LANGUAGES},${DOCBASE}-${LANG}-distclean) ######################################################################### # 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 @@ diff:: # "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 @@ distclean:: ${RM} *.desktop ${RM} *.spec ${RM} *.src.tar.gz - ${RM} *.po spec:: ${SPECFILE} |