# HG changeset patch # User Ethan Blanton # Date 1251993819 0 # Node ID 558ce0b09e0e1a910431d5e75307b7e88f1e1e3a # Parent 6081a0393d92126a2732834fffe651e571899fb8 Make Makefile.am a bit more portable diff -r 6081a0393d92 -r 558ce0b09e0e Makefile.am --- a/Makefile.am Wed Sep 02 21:45:01 2009 +0000 +++ b/Makefile.am Thu Sep 03 16:03:39 2009 +0000 @@ -100,13 +100,13 @@ || (cd $(srcdir) && mtn --root=. automate get_base_revision_id) 2>/dev/null >$@ \ || rm -f $@ package_revision.h: package_revision_raw.txt - if [ -f $< ]; then \ - sed 's/^\(.\+\)$$/#define REVISION "\1"/' $< > $@; \ + if test -f $<; then \ + echo "#define REVISION \"`cat $<`\"" > $@; \ fi - if [ ! -f $@ -a -f $(srcdir)/$@ ]; then \ + if test ! -f $@ -a -f $(srcdir)/$@; then \ cp $(srcdir)/$@ $@; \ fi - [ -f $@ ] || echo "#define REVISION \"unknown\"" > $@ + test -f $@ || echo "#define REVISION \"unknown\"" > $@ # This is a magic directive copy-and-pasted, then modified, from the # automake 1.9 manual, section 13.4, "Checking the distribution".