diff options
author | Tommy Reynolds <Tommy.Reynolds@MegaCoder.com> | 2005-10-30 02:36:54 +0000 |
---|---|---|
committer | Tommy Reynolds <Tommy.Reynolds@MegaCoder.com> | 2005-10-30 02:36:54 +0000 |
commit | 9dd78f069eb623d0b3db83f1ac5fd9f02ad4111d (patch) | |
tree | e88f73ca02c093d39ac8fde3ca581e36cfa05afb | |
parent | 4686ed60662db8be0f214becef6782717ae753b4 (diff) | |
download | fedora-doc-utils-9dd78f069eb623d0b3db83f1ac5fd9f02ad4111d.tar.gz fedora-doc-utils-9dd78f069eb623d0b3db83f1ac5fd9f02ad4111d.tar.xz fedora-doc-utils-9dd78f069eb623d0b3db83f1ac5fd9f02ad4111d.zip |
If the document directory has a "figs/" subdirectory, create an "figs/"
subdirectory in the HTML output directory. Copy any ordinary files with
a dot in their names to the newly-created "${DOCBASE}-${LANG}/figs/"
subdirectory.
To be copied, a graphics file must:
1) Have an extention that is NOT ".eps", since HTML doesn't grok EPS files.
2) Have a filename matching "*-${LANG}.*" -- be a graphic for the selected
language.
3) Have a filename that DOES NOT HAVE A DASH at all -- this allows for
"language-independent" graphics.
-rw-r--r-- | Makefile.common | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Makefile.common b/Makefile.common index 9dc61c4..d7b5380 100644 --- a/Makefile.common +++ b/Makefile.common @@ -14,7 +14,8 @@ # ${DOCNAME}.pdf -- Builds PDF version of document # pdf -- See "${DOCNAME}.pdf" ######################################################################### -# PDF generation is still fragile and probably won't work on your document +# PDF generation is still fragile and probably won't work on your document. +# Yet. ######################################################################### # Note: all targets within this Makefile.common must be defined as # double-colon (::) targets so that additional steps can be added by @@ -64,6 +65,11 @@ ${TARGETS}:: # mkdir -p mydoc-en/stylesheet-images # cp ${FDPDIR}/docs-common/stylesheet-images/*.png mydoc-en/stylesheet-images/ # cp ${FDPDIR}/docs-common/css/fedora.css mydoc-en/ +# mkdir -p mydoc-en/figs +# cp -p figs/*-${LANG}.* mydoc-en/figs +# but we do avoid copying EPS files since they are nonsense to the HTML world. +# Also, we create the figs directory only if the document dir has a "figs/". +# I don't think we need to do this for a nochunks output, though. # define HTML_template ${DOCBASE}-$(1)/index.html:: ${DOCBASE}-$(1).xml $$(XMLEXTRAFILES-$(1)) @@ -71,6 +77,13 @@ ${DOCBASE}-$(1)/index.html:: ${DOCBASE}-$(1).xml $$(XMLEXTRAFILES-$(1)) mkdir -p $(DOCBASE)-$(1)/stylesheet-images/ cp ${FDPDIR}/docs-common/stylesheet-images/*.png $(DOCBASE)-$(1)/stylesheet-images cp ${FDPDIR}/docs-common/css/fedora.css $$(DOCBASE)-$(1)/ + [ -d figs ] && ( \ + mkdir -p ${DOCBASE}-$(1)/figs; \ + find figs -type f -iname '*.*' -print | \ + egrep -vi '*.eps' | \ + egrep '(.*-$(1)..*)|([^-]*[.][^-]*)' | \ + while read x; do cp -f $$$${x} ${DOCBASE}-$(1)/figs; done \ + ) && exit 0 endef # html:: $(foreach LANG,${LANGUAGES},$(DOCBASE)-$(LANG)/index.html) |