pidgin: e831c6c5: Make Makefile.am a bit more portable

elb at pidgin.im elb at pidgin.im
Thu Sep 3 12:11:37 EDT 2009


-----------------------------------------------------------------
Revision: e831c6c52971a4a144a47c3affa19788d05d58d4
Ancestor: 124b451b2dce1a3b202a2aedf849b620ca2c64ab
Author: elb at pidgin.im
Date: 2009-09-03T16:03:39
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e831c6c52971a4a144a47c3affa19788d05d58d4

Modified files:
        Makefile.am

ChangeLog: 

Make Makefile.am a bit more portable

-------------- next part --------------
============================================================
--- Makefile.am	849fe83695f879eb3456176d86b672eab8ac74e8
+++ Makefile.am	60f105e810dddea67785d1cdf286e427771ab53a
@@ -100,13 +100,13 @@ package_revision.h: package_revision_raw
 	|| (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".


More information about the Commits mailing list