docs-common Makefile.common,1.60,1.61

Paul W. Frields (pfrields) fedora-docs-commits at redhat.com
Fri Feb 17 03:36:56 UTC 2006


Author: pfrields

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

Modified Files:
	Makefile.common 
Log Message:
Add "text" alias for "txt" for bad typists and lexihounds.  Also strip
annoying revhistory and index elements from plain text builds.  There
are very few instances where we will be providing txt builds --
e.g. release notes -- so this doesn't seem like a loss.  If it is,
XSLT is cheap.




Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- Makefile.common	17 Feb 2006 00:42:51 -0000	1.60
+++ Makefile.common	17 Feb 2006 03:36:48 -0000	1.61
@@ -84,6 +84,9 @@
 ifeq	"${XMLTOTXTPOSTOPT}" ""
 XMLTOTXTPOSTOPT	=-p '-no-numbering -no-references'
 endif
+ifeq	"${XMLLINTOPT}" ""
+XMLLINTOPT	=--xinclude --postvalid --noent
+endif
 #########################################################################
 
 #########################################################################
@@ -98,6 +101,7 @@
 XSLTPROC=xsltproc
 XMLFORMAT=xmlformat
 XMLFOPTS=-f $(FDPDIR)/docs-common/bin/xmlformat-fdp.conf
+XMLLINT	=xmllint
 XML2PO	=xml2po
 PO2XML	=po2xml
 MSGMERGE=msgmerge
@@ -158,7 +162,7 @@
 
 TARGETS=all clean distclean fdp-info html html-nochunks pdf po showvars \
         tarball rpm rpm-common noarch srpm package-prep package-post	\
-	src-tarball txt
+	src-tarball txt text
 
 # FIXME: add the .PHONY attribute where the actual target is defined
 
@@ -286,11 +290,16 @@
 
 
 define  TXT_template
-.PHONY: txt-${1}
+.PHONY: txt-${1} text-${1}
 
-txt-$(1) ${DOCBASE}-$(1).txt:: ${XMLFILES-${1}} ${1}/fdp-info.xml
-	${XMLTO} ${XMLTOTXTPOSTOPT} txt $(1)/$(DOCBASE).xml
-	mv $(DOCBASE).txt $(DOCBASE)-$(1).txt
+txt-$(1) text-$(1) ${DOCBASE}-$(1).txt:: ${XMLFILES-${1}} ${1}/fdp-info.xml
+	${XMLLINT} ${XMLLINTOPT} $(1)/$(DOCBASE).xml > $(1)/$(DOCBASE).lint.xml
+	${XSLTPROC} $(FDPDIR)/docs-common/packaging/strip-for-txt.xsl \
+		$(1)/$(DOCBASE).lint.xml > $(1)/$(DOCBASE).stripped.xml
+	rm $(1)/$(DOCBASE).lint.xml
+	${XMLTO} ${XMLTOTXTPOSTOPT} txt $(1)/$(DOCBASE).stripped.xml
+	mv $(DOCBASE).stripped.txt $(DOCBASE)-$(1).txt
+	rm $(1)/$(DOCBASE).stripped.xml
 
 distclean::
 	${RM} ${DOCBASE}-${1}.txt
@@ -298,9 +307,9 @@
 
 $(foreach L,${LANGUAGES},$(eval $(call TXT_template,${L})))
 
-.PHONY: txt
+.PHONY: txt text
 
-txt::	$(foreach LANG,${LANGUAGES},txt-$(LANG))
+txt text::	$(foreach LANG,${LANGUAGES},txt-$(LANG))
 #
 #########################################################################
 




More information about the Fedora-docs-commits mailing list