summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-01-17 02:14:49 +0000
committerTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2006-01-17 02:14:49 +0000
commitb63ba9738a528e3b8da3a56b2e7db5d38bddff3c (patch)
tree95cbc52a263470ea5dabdc70dd13d44c4e742f0b
parent907e18c71717f6a1c968e166582f5d4bc55d317a (diff)
downloadfedora-doc-utils-b63ba9738a528e3b8da3a56b2e7db5d38bddff3c.tar.gz
fedora-doc-utils-b63ba9738a528e3b8da3a56b2e7db5d38bddff3c.tar.xz
fedora-doc-utils-b63ba9738a528e3b8da3a56b2e7db5d38bddff3c.zip
Select "fdpsh" as the shell used by make(1). This lets us avoid
ugly "${FDPBIN}/foo" in preference to a lovely, lonely, "foo". Also, replace unconditional mv(1) commands with "move-if-change" to help avoid needlessly touching a file, thus triggering a useless rebuild. Don't know if this happens here, but its a best practices thing.
-rw-r--r--Makefile.common17
1 files changed, 11 insertions, 6 deletions
diff --git a/Makefile.common b/Makefile.common
index e5993d3..4ce1664 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -64,6 +64,10 @@ XSLTPROC=xsltproc
XMLFORMAT=$(FDPDIR)/docs-common/bin/xmlformat
XMLFOPTS=-f $(FDPDIR)/docs-common/bin/xmlformat-fdp.conf
#########################################################################
+# Use our very own "docs-common/bin/fdpsh" as the command interpreter
+# This automatically has ${FDPBIN} as first in the ${PATH}
+SHELL =${FDPBIN}/fdpsh
+#########################################################################
# PUT NO TARGETS BEFORE THIS ONE, not even in your base Makefile
# In a properly-constructed Makefile, this will be the default target
@@ -97,7 +101,7 @@ html-$(1) ${DOCBASE}-$(1)/index.html:: ${DOCBASE}-$(1).xml $$(XMLEXTRAFILES-$(1)
cp ${HTMLCSS} $(DOCBASE)-$(1)/fedora.css
[ -z "${HTMLCSSEXTRA}" ] || \
cp ${HTMLCSSEXTRA} $(DOCBASE)-$(1)/watermark.png
- [ ! -d figs ] || ${FDPBIN}/copy-figs -v -f '*.png' \
+ [ ! -d figs ] || copy-figs -v -f '*.png' \
-l ${LANG} figs $(DOCBASE)-$(1)
endef
#
@@ -159,6 +163,7 @@ endef
$(foreach LANG,${LANGUAGES},$(eval $(call CLEAN_template,${LANG})))
#
clean:: $(foreach LANG,${LANGUAGES},${DOCBASE}-${LANG}-clean)
+ ${RM} *.tmp
#########################################################################
define DISTCLEAN_template
${DOCBASE}-$(1)-distclean:: ${DOCBASE}-$(1)-clean
@@ -188,7 +193,7 @@ NEW =define-me-new.xml
DIFFS =-u
diff::
- ${FDPBIN}/xmldiff ${DIFFS} ${OLD} ${NEW}
+ xmldiff ${DIFFS} ${OLD} ${NEW}
#
#########################################################################
# The "fdp-info-${LANG}.xml" file contains the <articleinfo> or
@@ -214,16 +219,16 @@ fdp-info:: $(foreach LANG,${LANGUAGES},fdp-info-$(LANG).xml)
# Make a new changelog entry for an existing rpm-info.xml file.
clog:: $(RPMINFO)
- @${FDPBIN}/fdpsh -c insert-changelog $(RPMINFO).clog
- mv -b $(RPMINFO).clog $(RPMINFO)
+ insert-changelog $(RPMINFO).tmp && \
+ move-if-change $(RPMINFO).tmp $(RPMINFO)
#
#########################################################################
# Make a new colophon entry for an existing rpm-info.xml file.
colophon:: $(RPMINFO)
- @${FDPBIN}/fdpsh -c insert-colophon $(RPMINFO).worker
- mv -b $(RPMINFO).worker $(RPMINFO)
+ insert-colophon $(RPMINFO).tmp && \
+ move-if-change $(RPMINFO).tmp $(RPMINFO)
#
#########################################################################