* Makefile.am (version.h): Fix issues when built out of tree.
authorRaja R Harinath <harinath@hurrynot.org>
Sun, 26 Jul 2009 06:47:19 +0000 (06:47 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Sun, 26 Jul 2009 06:47:19 +0000 (06:47 -0000)
Remove some redundant 'grep's piped through 'sed's.

svn path=/trunk/mono/; revision=138684

mono/mini/ChangeLog
mono/mini/Makefile.am

index 0c652ce49ac53b8948d5e8da98a7f59ddc117701..010c8bb54f54f51bb811ce3618ce060311edcdf5 100644 (file)
@@ -1,3 +1,7 @@
+2009-07-26  Raja R Harinath  <harinath@hurrynot.org>
+
+       * Makefile.am (version.h): Fix issues when built out of tree.
+       Remove some redundant 'grep's piped through 'sed's.
 
 Fri Jul 24 17:28:37 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
 
index 0f88d8fb5ec24282d565d779290302a043a912f3..756863eb2302cab5b5723a135a05fd0d951bea56 100644 (file)
@@ -582,13 +582,13 @@ EXTRA_DIST = $(common_BURGSRC) cprop.c TestDriver.cs ldscript ldscript.mono \
        $(posix_sources)
 
 version.h: Makefile
-       if test -d $(top_srcdir)/.git/svn; then svn_info="echo \"`git log --no-color --first-parent --pretty=format:%b|grep -m1 git-svn-id|sed -e 's,git-svn-id: \(.*\)@\(.*\) .*,URL: \1 Revision: \2,'`"; fi; \
+       if test -d $(top_srcdir)/.git/svn; then svn_info="git log --no-color --first-parent -n1 --grep=git-svn-id: --pretty=format:%b | sed -e 's,git-svn-id: \(.*\)@\(.*\) .*,URL: \1 Revision: \2,'"; fi; \
        if test -d $(srcdir)/.svn; then svn_info='svn info'; fi; \
        if test -n "$$svn_info"; then \
                (cd $(top_srcdir); \
                        LANG=C; export LANG; \
-                       branch=`$$svn_info | grep URL | sed -e 's,.*source/\(.*\)/mono.*,/\1/mono,'`; \
-                       version=`$$svn_info | grep Revision | sed 's/.*: //'`; \
+                       branch=`eval $$svn_info | sed -n -e '/URL/ s,.*source/\(.*\)/mono.*,/\1/mono,p'`; \
+                       version=`eval $$svn_info | sed -n -e '/Revision/ s/.*: //p'`; \
                        echo "#define FULL_VERSION \"$$branch r$$version\""; \
                ); \
        else \