Mercurial > hg > octave-lojdl
changeset 9965:a7e288044ef7
avoid cp -a --update
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 11 Dec 2009 13:30:16 -0500 |
parents | b7bc27413655 |
children | d4dab9605c49 |
files | ChangeLog common.mk scripts/ChangeLog scripts/Makefile.am src/ChangeLog src/Makefile.am |
diffstat | 6 files changed, 24 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-12-11 John W. Eaton <jwe@octave.org> + + * common.mk (cp_update_rule): New macro. + 2009-12-10 John W. Eaton <jwe@octave.org> * mkoctfile.in, mkoctfile.cc.in: If output file is specified and
--- a/common.mk +++ b/common.mk @@ -435,6 +435,13 @@ fi endef +define cp_update_rule +if [ "x$(srcdir)" != "x." ] && [ -f $(srcdir)/$@ ] && [ ! -f $@ ]; then \ + cp $(srcdir)/$@ $@; \ + touch -r $(srcdir)/$@ $@; \ +fi +endef + # Yes, the second sed command near the end is needed, to avoid limits # in command lengths for some versions of sed. UGLY_DEFS is often # quite large, so it makes sense to split this command there.
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-12-11 John W. Eaton <jwe@octave.org> + + * Makefile.am (DOCSTRINGS): Use $(cp_update_rule) instead of + cp -a --update. + 2009-12-09 Rik <octave@nomad.inbox5.com> * Makefile.am: Copy DOCSTRINGS from srcdir to builddir if it does not
--- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -328,8 +328,8 @@ all-local: $(GEN_FCN_FILES) $(PKG_ADD_FILES) DOCSTRINGS -DOCSTRINGS: mkdoc $(FCN_FILES) $(GEN_FCN_FILES) gethelp$(BUILD_EXEEXT) - @cp -a --update $(srcdir)/$@ $@ ; exit 0; +DOCSTRINGS: mkdoc $(FCN_FILES) $(GEN_FCN_FILES) gethelp$(BUILD_EXEEXT) + $(cp_update_rule) $(srcdir)/mkdoc "$(srcdir)" $(FCN_FILES) -- $(GEN_FCN_FILES) > $@-t $(simple_move_if_change_rule)