homepage/F-7 Makefile,NONE,1.1

Paul W. Frields (pfrields) fedora-docs-commits at redhat.com
Sat Sep 29 21:28:54 UTC 2007


Author: pfrields

Update of /cvs/docs/homepage/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19084

Added Files:
	Makefile 
Log Message:
Build F-7 branch belatedly.  I am using a sticky date of 2007-05-31 (F-7 release) to make the branch.  There may be some updates that are out of sync with later translations.  I am not sure how to handle that yet, but will figure it out.


--- NEW FILE Makefile ---
########################################################################
# Fedora Documentation Project Per-document Makefile
# License: GPL
# Copyright 2005,2006 Tommy Reynolds, MegaCoder.com
########################################################################
#
# Document-specific definitions.
#
DOCBASE        	= homepage
PRI_LANG	= en_US
OTHERS		= ca el es fi fr it ja nl pa pl pt_BR pt sr sv uk zh_CN # bn_IN cs de gu hr ml ms nb ru zh_TW
PKGNAME		= ${DOCBASE}

# Set this locally
VERSION		= 7.0.0

define XMLFILES_template
XMLFILES-${1}=	${1}/homepage.xml
endef

#
########################################################################
define find-makefile-common 
for d in docs-common ../docs-common ../../docs-common; do \
if [ -f $$d/Makefile.common ]; then echo "$$d/Makefile.common"; break; fi; done 
endef 
include $(shell $(find-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
########################################################################


define HACK_HTML_template
.PHONY: homepage-${1}
$(eval HOMEPAGEDIR=homepage)
$(eval HTMLEXTRAFILES-${1}=${HOMEPAGEDIR}/index-${1}.html)
$(eval HOMEPAGE_CSS=${HOMEPAGEDIR}/homepage.css)
$(eval HOMEPAGE_XSL=${HOMEPAGEDIR}/homepage.xsl)

homepage-${1}:: ${HOMEPAGEDIR}/index-${1}.html

${HOMEPAGEDIR}/index-${1}.html:: ${1}/homepage.xml ${XMLDEPFILES-${1}}
# Can we get away with just the above?  Let's see...
	LANG=$(1).UTF-8 ${XMLTO} html -x $(XSLHTML) -m ${HOMEPAGE_XSL} $(1)/homepage.xml
	move-if-change index.html ${HOMEPAGEDIR}/index-${1}.html
	mkdir -p stylesheet-images/
	cp ${FDPCOMMONDIR}/stylesheet-images/*.png stylesheet-images

clean::
	rm -rf ${HOMEPAGEDIR}/index-${1}.html stylesheet-images/

endef
$(foreach L,${LANGUAGES},$(eval $(call HACK_HTML_template,${L})))


define PKGHTML_HOMEPAGE_template
.PHONY: pkghtml-homepage-${1}
pkghtml-homepage-${1}:: ${PKGNAME}-${VERSION}/${HOMEPAGEDIR}/index-${1}.html
$(eval PKGFILES-${1}+=${PKGNAME}-${VERSION}/${HOMEPAGEDIR}/index-${1}.html)
${PKGNAME}-${VERSION}/${HOMEPAGEDIR}/index-${1}.html:: ${HOMEPAGEDIR}/index-${1}.html
	mkdir -p ${PKGNAME}-${VERSION}/${HOMEPAGEDIR}
	cp ${HOMEPAGEDIR}/index-${1}.html $$@
endef

$(foreach L,${LANGUAGES},$(eval $(call PKGHTML_HOMEPAGE_template,${L})))



.PHONY: release-pkg
release-pkg:: ${PKGNAME}-${VERSION}.tar.gz
${PKGNAME}-${VERSION}.tar.gz:: $(foreach L,${LANGUAGES},${PKGFILES-${L}})
	cp -a --parents ${HOMEPAGE_CSS} img/*png stylesheet-images/*png ${PKGNAME}-${VERSION}
	tar czf ${PKGNAME}-${VERSION}.tar.gz ${PKGNAME}-${VERSION}

clean::
	${RM} -rf ${PKGNAME}-${VERSION}.tar.gz
	${RM} -rf ${PKGNAME}-${VERSION}

help::
	@printf ${TFMT} 'release-pkg' 'Make a tarball suitable for import to Core'




More information about the Fedora-docs-commits mailing list