release-notes Makefile,1.1,1.2

Karsten Wade kwade at redhat.com
Mon Oct 24 14:19:38 UTC 2005


Tommy or Paul:

Can you look at this change and give us a better way to do it?  Or am I
missing the existence of this functionality in Makefile.common?

thx - Karsten

On Mon, 2005-10-24 at 10:08 -0400, Karsten Wade wrote:
> Author: kwade
> 
> Update of /cvs/docs/release-notes
> In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17937
> 
> Modified Files:
> 	Makefile 
> Log Message:
> Need to find a way to do this better, and I think it should be in the Makefile.common instead.  However, my method here is obviously sub-par and throws an error, so I'll be punting for help.  The objective is to make certain that the figs/ directory gets copied over to the HTML directories in all languages.  Actually, the figs-/ needs to get copied to foo-/ HTML directory.  This requires some consideration and kung-fu.  It should copy over the language specific figures if they exist, otherwise use the English by default so as to not break the build.
> 
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/docs/release-notes/Makefile,v
> retrieving revision 1.1
> retrieving revision 1.2
> diff -u -r1.1 -r1.2
> --- Makefile	24 Oct 2005 13:13:33 -0000	1.1
> +++ Makefile	24 Oct 2005 14:08:53 -0000	1.2
> @@ -1,90 +1,100 @@
> -LANG	       = en
> -DOCS_SETUP_PATH= ../../docs-common
> -XSLPDF         = $(DOCS_SETUP_PATH)/xsl/main-pdf.xsl
> -XSLHTML        = $(DOCS_SETUP_PATH)/xsl/main-html-nochunks-relnotes.xsl
> -
> -XSLPDFCOMMONS	= ${XSLPDF}
> -XSLHTMLCOMMONS	= ${XSLHTML}
> -
> -XMLCOMMONSPATH=${DOCS_SETUP_PATH}/common
> -XMLCOMMONS=${XMLCOMMONSPATH}/cvs-en.xml                                 \
> -        ${XMLCOMMONSPATH}/draftnotice-en.xml                            \
> -        ${XMLCOMMONSPATH}/fedora-entities-en.ent                        \
> -        ${XMLCOMMONSPATH}/fedora-entities-en.xml                        \
> -        ${XMLCOMMONSPATH}/legacynotice-en.xml                           \
> -        ${XMLCOMMONSPATH}/legalnotice-en.xml                            \
> -        ${XMLCOMMONSPATH}/obsoletenotice-en.xml
> -
> -.SUFFIXES:
> -.SUFFIXES: .html .pdf .xml
> -
> -all:	README-${LANG}.html \
> -	RELEASE-NOTES-${LANG}.html \
> -	RELEASE-NOTES-${LANG}.txt \
> -	README-${LANG}.txt
> -
> -#README-${LANG}.pdf RELEASE-NOTES-${LANG}.pdf 
> -
> -%.pdf:	%.xml
> -	xmlto pdf -x ${XSLPDF} $<
> -
> -%.html:	%.xml
> -	${RM} -r ${@:.html=}
> -	xmlto html -x ${XSLHTML} -o ${@:.html=} $<
> -	mkdir -p ${@:.html=}/stylesheet-images
> -	mkdir -p ${@:.html=}/figs
> -	cp $(DOCS_SETUP_PATH)/stylesheet-images/*.png ${@:.html=}/stylesheet-images
> -	cp ./figs/*.png ${@:.html=}/figs
> -	cp $(DOCS_SETUP_PATH)/css/fedora.css ${@:.html=}
> -	mv ${@:.html=}/${@:.html=.proc} ${@:.html=}/$@ 
> -	ln -sf ${@:.html=}/$@ $@
> -
> -%.txt: %.xml
> -	xmlto txt $<
> -#	mv $@ RELEASE-NOTES-${LANG}
> -
> -# FIXME eula.txt: eula.py
> -# FIXME	python -c "import py_compile; py_compile.compile('eula.py')"
> -
> -# Note: keep "RELEASE-NOTES-en.xml" first, for now.
> -
> -RNFILES=RELEASE-NOTES-en.xml daemons.xml database-servers.xml           \
> -        desktop.xml development-tools.xml feedback.xml file-servers.xml \
> -        file-systems.xml hardware-reqs.xml install-notes.xml intro.xml  \
> -        java-package.xml kernel.xml misc-server.xml multimedia.xml      \
> -        networking.xml overview.xml package-movement.xml                \
> -        package-notes.xml printing.xml project-overview.xml samba.xml   \
> -        security.xml server-tools.xml splash.xml web-servers.xml        \
> -	xorg.xml
> -
> -# README-${LANG}.pdf: README-en.xml
> -# README-${LANG}.html: README-en.xml
> -RELEASE-NOTES-${LANG}.pdf:  ${RNFILES} ${XMLCOMMONS} ${XSLPDFCOMMONS}
> -RELEASE-NOTES-${LANG}.html: ${RNFILES} ${XMLCOMMONS} ${XSLHTMLCOMMONS}
> -RELEASE-NOTES-${LANG}.txt:  ${RNFILES} ${XMLCOMMONS}
> -
> -clean: 
> -	${RM} ChangeLog ChangeLog.xml
> -
> -distclean clobber: clean
> -	${RM} ChangeLog-${LANG}.html ChangeLog.txt
> -	${RM} -r README-${LANG}.pdf README-${LANG}.html README-${LANG}.txt
> -	${RM} -r RELEASE-NOTES-${LANG}.pdf RELEASE-NOTES-${LANG}.html \
> -		RELEASE-NOTES-${LANG} RELEASE-NOTES-${LANG}.txt
> -
> -# If you have the "cvs2cl" package installed, then you can make
> -# fancy HTML ChangeLogs
> -
> -ChangeLogs:
> -	${RM} ChangeLog*
> -	${MAKE} ChangeLog.txt
> -	${MAKE} ChangeLog-${LANG}.html
> -
> -ChangeLog.txt:
> -	LANG=C cvs2cl -f ChangeLog.txt
> -
> -ChangeLog.xml:
> -	LANG=C cvs2cl --xml --xml-encoding UTF-8 -f ChangeLog.xml
> -
> -ChangeLog-${LANG}.html: ChangeLog.xml
> -	xsltproc -o $@ /usr/share/xml/cvs2cl/cl2html.xslt $<
> +###############################################################################
> +# Makefile for RHLP docs project
> +# Created by: Tammy Fox <tfox at redhat.com>
> +# Last edited by: Tommy Reynolds <Tommy.Reynolds at MegaCoder.com>
> +# WARNING: need passivetex 1.24 for pdf generation to work
> +# License: GPL
> +# Copyright 2003 Tammy Fox, Red Hat, Inc.
> +# Copyright 2005 Tommy Reynolds, MegaCoder.com
> +###############################################################################
> +#
> +# Document-specific definitions.
> +#
> +LANGUAGES      	= en
> +DOCBASE        	= RELEASE-NOTES
> +XMLEXTRAFILES-en=daemons.xml database-servers.xml desktop.xml development-tools.xml feedback.xml file-servers.xml file-systems.xml hardware-reqs.xml install-notes.xml intro.xml java-package.xml kernel.xml misc-server.xml multimedia.xml networking.xml overview.xml package-movement.xml package-notes.xml printing.xml project-overview.xml samba.xml security.xml server-tools.xml splash.xml web-servers.xml xorg.xml
> +#
> +######################################################
> +include ../docs-common/Makefile.common
> +######################################################
> +#
> +# If you want to add additional steps to any of the 
> +# targets defined in "Makefile.common", be sure to use
> +# a double-colon in your rule here.  For example, to 
> +# print the message "FINISHED AT LAST" after building 
> +# the HTML document version, uncomment the following 
> +# line:
> +#${DOCBASE}-en/index.html::
> +#	echo FINISHED AT LAST
> +
> +# Need to copy over the figures for this directory.  Should
> +# this be a common action instead?
> +${DOCBASE}-en/index.html::
> +	mkdir -p ${DOCBASE}-${LANGUAGES}/figs
> +	cp figs/* ${DOCBASE}-${LANGUAGES}/figs
> +
> +######################################################
> +# Some packaging specific vars
> +VERSION=$(shell grep BOOKID $(DOCBASE)-en.xml | sed 's/<!ENTITY BOOKID "[^0-9\.]\+//' | sed 's/ .\+//')
> +DATE=${shell grep BOOKID $(DOCBASE)-en.xml | sed 's/.\+(//' | sed 's/).\+//' }
> +NOW=$(shell date +"%a %b %e %Y")
> +SPECIN=../docs-common/packaging/fedora-doc.spec.in.common
> +OMFIN=../docs-common/packaging/fedora-doc.omf.in.common
> +DESKTOPIN=../docs-common/packaging/fedora-doc.desktop.in.common
> +DOCSPEC=$(PWD)/SPECS/$(DOCBASE).spec
> +DOCOMF=$(PWD)/SOURCES/fedora-doc-$(DOCBASE)-C.omf
> +DOCDESKTOP=$(PWD)/SOURCES/fedora-doc-$(DOCBASE).desktop
> +DOCSRCTAR=$(PWD)/SOURCES/$(DOCBASE)-$(VERSION).src.tar.gz
> +TITLE=$(shell ../docs-common/packaging/titlegrab.py $(DOCBASE)-en.xml | sed 's/^ \+//')
> +######################################################
> +# Some RPM flags...
> +######################################################
> +RPMFLAGS=--define "docbase $(DOCBASE)" --define "version $(VERSION)" --define "_topdir $(PWD)"
> +######################################################
> +
> +
> +clean::
> +	rm -rf fedora-doc-$(DOCBASE)*.rpm
> +
> +
> +rpm: clean
> +#
> +# Make RPM-compliant tarball of source XML and other stuff
> +	mkdir $(DOCBASE)-$(VERSION)
> +	find . -maxdepth 1 -type f ! \( -name '*~' -o -name 'Makefile*' \) \
> +		| cpio -pamdv $(DOCBASE)-$(VERSION)
> +	find . -maxdepth 1 -type d ! \( -name '$(DOCBASE)-$(VERSION)' \
> +		-o -name 'CVS' -o -name '*~' -o -name '$(DOCBASE)*' \) \
> +		| cpio -pamdv $(DOCBASE)-$(VERSION)
> +#
> +# Make RPM build tree; don't rely on local user's setup
> +	mkdir -p {BUILD,RPMS/noarch,SOURCES,SPECS,SRPMS}
> +	tar -zcvf $(DOCSRCTAR) $(DOCBASE)-$(VERSION)
> +	rm -rf $(DOCBASE)-$(VERSION)/
> +#
> +# Make rpmlint happy with a changelog entry
> +# FIXME: Maybe more magic would make this stickier; pity
> +#        I'm no magician...
> +	sed 's/\(%changelog\)/\1\n* $(NOW) Fedora Docs Project <fedora-docs-list at redhat.com> - $(VERSION)-1\n- Update to version $(VERSION)\n/' \
> +		$(SPECIN) > $(DOCSPEC)
> +#
> +# Fill in files
> +# FIXME:  Needs to be multiplexed for LANGUAGES (see above)
> +	cp $(OMFIN) $(DOCOMF)
> +	cp $(DESKTOPIN) $(DOCDESKTOP)
> +	sed -i 's/@VERSION@/$(VERSION)/g' $(DOCOMF)
> +	sed -i 's/@DATE@/$(DATE)/g' $(DOCOMF)
> +	sed -i 's/@TITLE@/$(TITLE)/g' $(DOCOMF)
> +	sed -i 's/@DOCBASE@/$(DOCBASE)/g' $(DOCOMF)
> +	sed -i 's/@VERSION@/$(VERSION)/g' $(DOCDESKTOP)
> +	sed -i 's/@DATE@/$(DATE)/g' $(DOCDESKTOP)
> +	sed -i 's/@TITLE@/$(TITLE)/g' $(DOCDESKTOP)
> +	sed -i 's/@DOCBASE@/$(DOCBASE)/g' $(DOCDESKTOP)
> +#
> +# Do the build...
> +#
> +	rpmbuild -bb $(RPMFLAGS) $(DOCSPEC)
> +	mv RPMS/noarch/*.rpm .
> +	rpmbuild --clean --rmsource $(RPMFLAGS) $(DOCSPEC)
> +	rm -rf {BUILD,RPMS,SOURCES,SPECS,SRPMS}
> +	rm -rf $(DOCBASE)-$(VERSION)
> 
> --
> Fedora-docs-commits mailing list
> Fedora-docs-commits at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-docs-commits
-- 
Karsten Wade, RHCE * Sr. Tech Writer * http://people.redhat.com/kwade/
gpg fingerprint:  2680 DBFD D968 3141 0115    5F1B D992 0E06 AD0E 0C41   
                       Red Hat SELinux Guide
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/selinux-guide/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.fedoraproject.org/pipermail/docs/attachments/20051024/0f4c4de5/attachment.bin 


More information about the docs mailing list