######################################################################## # Fedora Documentation Project Per-document Makefile # License: GPL # Copyright 2005,2006 Tommy Reynolds, MegaCoder.com ######################################################################## # # Document-specific definitions. # DOCBASE = homepage PRI_LANG = en_US PKGNAME = ${DOCBASE} define XMLFILES_template XMLFILES-${1}= ${1}/homepage.xml \ ${1}/startpage.xml endef XML2POFLAGS = -e -m xhtml # ######################################################################## 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:: ${XMLFILES-${1}} ${XMLDEPFILES-${1}} cp -u ${1}/startpage.xml ${HOMEPAGEDIR}/index-${1}.html # OLD HOMEPAGE BUILD RULES # 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 -f ${HOMEPAGEDIR}/index-${1}.html rm -rf 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} mkdir -p ${PKGNAME}-${VERSION}/images cp -u startpage-images/*png ${PKGNAME}-${VERSION}/images 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'