docs-common Makefile.common,1.31,1.32
Tommy Reynolds (jtr)
fedora-docs-commits at redhat.com
Tue Jan 17 02:14:56 UTC 2006
Author: jtr
Update of /cvs/docs/docs-common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22941
Modified Files:
Makefile.common
Log Message:
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.
Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- Makefile.common 16 Jan 2006 20:05:43 -0000 1.31
+++ Makefile.common 17 Jan 2006 02:14:49 -0000 1.32
@@ -64,6 +64,10 @@
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 @@
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 @@
$(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 @@
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 @@
# 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)
#
#########################################################################
More information about the Fedora-docs-commits
mailing list