diff Makefile.am @ 28534:558ce0b09e0e

Make Makefile.am a bit more portable
author Ethan Blanton <elb@pidgin.im>
date Thu, 03 Sep 2009 16:03:39 +0000
parents cc8f641d2fde
children f7d03842b9c9
line wrap: on
line diff
--- 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".