######################################################################## # Fedora Documentation Project Per-document Makefile # License: GPL # Copyright 2005,2006 Tommy Reynolds, MegaCoder.com ######################################################################## # # Document-specific definitions. # DOCBASE = RELEASE-NOTES PRI_LANG = en_US # Special legalnotice for this document: LEGALNOTICEBASE =legalnotice-relnotes # Special basename for packaging: PKGNAME =fedora-release-notes # Special PKGRPMFLAGS to keep Rawhide happy for f13 PKGRPMFLAGS =--define "_topdir ${PWD}" --define "_specdir ${PWD}" --define "_sourcedir ${PWD}" --define "_srcrpmdir ${PWD}" --define "_rpmdir ${PWD}" # Use a special POTBASE to keep that filename equivalent to the module # while still allowing ALL-CAPS filename generation. POTBASE =release-notes ######################################################################## # List each XML file of your document in the template below. Append the # path to each file to the "XMLFILES-${1}" string. Use a backslash if you # need additional lines. Here, we have one extra file "en/para.xml"; that # gets written as "${1}/para.xml" because later, make(1) will need to compute # the necesssary filenames. Oh, do NOT include "fdp-info.xml" because that's # a generated file and we already know about that one... define XMLFILES_template XMLFILES-${1}= ${1}/ArchSpecific.xml \ ${1}/BackwardsCompatibility.xml \ ${1}/Colophon.xml \ ${1}/DatabaseServers.xml \ ${1}/Desktop.xml \ ${1}/Devel.xml \ ${1}/Entertainment.xml \ ${1}/Feedback.xml \ ${1}/FileSystems.xml \ ${1}/I18n.xml \ ${1}/Installer.xml \ ${1}/Java.xml \ ${1}/Kernel.xml \ ${1}/Legacy.xml \ ${1}/Live.xml \ ${1}/MailServers.xml \ ${1}/Multimedia.xml \ ${1}/OverView.xml \ ${1}/PackageChanges.xml \ ${1}/PackageNotes.xml \ ${1}/ProjectOverview.xml \ ${1}/RELEASE-NOTES.xml \ ${1}/Security.xml \ ${1}/Virtualization.xml \ ${1}/WebServers.xml \ ${1}/Welcome.xml \ ${1}/Xorg.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 ######################################################################## ######### # # These rules are for use in packaging the release notes for an ISO # spin. To do so, just run "make release-pkg" and out pops a shiny # tarball named "${PKGNAME}-.tar.gz where is the FC # release (5.91, 6, etc.). # ######### define PKGHTML_NOCHUNKS_template .PHONY: pkghtml-nochunks-${1} pkghtml-nochunks-${1}:: ${PKGNAME}-${VERSION}/${DOCBASE}-${1}.html $(eval PKGFILES-${1}+=${PKGNAME}-${VERSION}/${DOCBASE}-${1}.html) ${PKGNAME}-${VERSION}/${DOCBASE}-${1}.html:: ${DOCBASE}-${1}.html mkdir -p ${PKGNAME}-${VERSION} cp ${DOCBASE}-${1}.html $$@ endef $(foreach L,${LANGUAGES},$(eval $(call PKGHTML_NOCHUNKS_template,${L}))) define PKGXML_template .PHONY: pkgxml-${1} pkgxml-${1}:: ${PKGNAME}-${VERSION}/ghelp/${1}/${DOCBASE}.xml $(eval PKGFILES-${1}+=${PKGNAME}-${VERSION}/ghelp/${1}/${DOCBASE}.xml) ${PKGNAME}-${VERSION}/ghelp/${1}/${DOCBASE}.xml:: ${XMLFILES-${1}} \ ${XMLDEPFILES-${1}} mkdir -p ${PKGNAME}-${VERSION}/ghelp/${1} ${XMLLINT} ${XMLLINTOPT} ${1}/${DOCBASE}.xml > $$@ endef $(foreach L,${LANGUAGES},$(eval $(call PKGXML_template,${L}))) define PKGTXT_template .PHONY: pkgtxt-${1} pkgtxt-${1}:: ${PKGNAME}-${VERSION}/${DOCBASE}-${1}.txt $(eval PKGFILES-${1}+=${PKGNAME}-${VERSION}/${DOCBASE}-${1}.txt) ${PKGNAME}-${VERSION}/${DOCBASE}-${1}.txt:: ${DOCBASE}-${1}.txt mkdir -p ${PKGNAME}-${VERSION} cp ${DOCBASE}-${1}.txt $$@ endef $(foreach L,${LANGUAGES},$(eval $(call PKGTXT_template,${L}))) define PKG_template .PHONY: release-pkg-${1} release-pkg-${1}:: ${PKGFILES-${1}} showvars:: @echo "PKGFILES-${1}=${PKGFILES-${1}}" endef $(foreach L,${LANGUAGES},$(eval $(call PKG_template,${L}))) # This could be combined with OMFVAR_template later... define PKGOMFVAR_template $(foreach F,${OMFINFILES},$(eval PKGOMFFILES-${1}+=$(patsubst \ %.omf.in,$(if $(findstring ${PRI_LANG},${1}),%-C.omf,%-${1}.omf), \ ${F}))) showvars-debug:: @echo "PKGOMFFILES-${1}=\"${PKGOMFFILES-${1}}\"" endef $(foreach L,${LANGUAGES},$(eval $(call PKGOMFVAR_template,${L}))) define PKGOMF_DOC_template .PHONY: pkgomf-${1}-${2} ifeq "${2}" "${PRI_LANG}" pkgomf-${1}-${2}:: ${PKGNAME}-${VERSION}/${1}-C.omf ${PKGNAME}-${VERSION}/${1}-C.omf:: ${2}/${1}.omf mkdir -p ${PKGNAME}-${VERSION} cp ${2}/${1}.omf $$@ else pkgomf-${1}-${2}:: ${PKGNAME}-${VERSION}/${1}-${2}.omf ${PKGNAME}-${VERSION}/${1}-${2}.omf:: ${2}/${1}.omf mkdir -p ${PKGNAME}-${VERSION} cp ${2}/${1}.omf $$@ endif endef $(foreach L,${LANGUAGES}, \ $(foreach F,$(patsubst %.omf.in,%,${OMFINFILES}), \ $(eval $(call PKGOMF_DOC_template,${F},${L})))) define PKGOMF_template .PHONY: pkgomf-${1} pkgomf-${1}:: $(foreach F,${PKGOMFFILES-${1}},${PKGNAME}-${VERSION}/${F}) $(eval PKGFILES-${1}+=$(foreach F,${PKGOMFFILES-${1}},${PKGNAME}-${VERSION}/${F})) endef $(foreach L,${LANGUAGES},$(eval $(call PKGOMF_template,${L}))) .PHONY: release-pkg release-pkg:: ${PKGNAME}-${VERSION}.tar.gz ${PKGNAME}-${VERSION}.tar.gz:: $(foreach L,${LANGUAGES},${PKGFILES-${L}}) cp -a --parents css/*css fedora.css img/*png stylesheet-images/*png ${PKGNAME}-${VERSION} cp -a README-Accessibility ${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' # To build the SRPM, you must build "make release-pkg" in the following # modules and copy the resulting tarball to this module: # about-fedora/ # homepage/ # readme/ # readme-burning-isos/ # Make sure that each external module's Makefile defines VERSION the # same as in this module's specfile. # THE FOLLOWING IS A NASTY HACK TO MAKE LIFE EASIER FOR REL-ENG. FDPCVSROOT=:pserver:anonymous@cvs.fedoraproject.org:/cvs/docs homepage-${VERSION}.tar.gz:: test -d homepage && (cd homepage ; cvs up) || \ cvs -d ${FDPCVSROOT} co homepage-devel-dir (cd homepage ; make release-pkg) cp -u homepage/$@ . clean:: rm -f homepage-${VERSION}.tar.gz distclean:: rm -rf homepage about-fedora-${VERSION}.tar.gz:: test -d about-fedora && (cd about-fedora ; cvs up) || \ cvs -d ${FDPCVSROOT} co about-fedora-devel-dir (cd about-fedora ; make release-pkg) cp -u about-fedora/$@ . clean:: rm -f about-fedora-${VERSION}.tar.gz distclean:: rm -rf about-fedora README-${VERSION}.tar.gz:: test -d readme && (cd readme ; cvs up) || \ cvs -d ${FDPCVSROOT} co readme-devel-dir (cd readme ; make release-pkg) cp -u readme/$@ . clean:: rm -f README-${VERSION}.tar.gz distclean:: rm -rf readme README-BURNING-ISOS-${VERSION}.tar.gz:: test -d readme-burning-isos && (cd readme-burning-isos ; cvs up) || \ cvs -d ${FDPCVSROOT} co readme-burning-isos-devel-dir (cd readme-burning-isos ; make release-pkg) cp -u readme-burning-isos/$@ . clean:: rm -f README-BURNING-ISOS-${VERSION}.tar.gz distclean:: rm -rf readme-burning-isos .PHONY: release-srpm release-srpm:: ${PKGNAME}-${VERSION}-${RELEASE}.src.rpm ${PKGNAME}-${VERSION}-${RELEASE}.src.rpm:: ${SPECFILE} \ ${PKGNAME}-${VERSION}.tar.gz \ homepage-${VERSION}.tar.gz \ about-fedora-${VERSION}.tar.gz \ README-${VERSION}.tar.gz \ README-BURNING-ISOS-${VERSION}.tar.gz rpmbuild -bs ${PKGRPMFLAGS} ${SPECFILE} clean:: ${RM} -rf ${PKGNAME}-${VERSION}-${RELEASE}.src.rpm help:: @printf ${TFMT} 'release-srpm' 'Make a SRPM suitable for import to Core'