]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Makefile.tool-inplace.am: correctly handle tool names with dashes in,
authorJulian Seward <jseward@acm.org>
Sat, 17 Nov 2007 18:35:54 +0000 (18:35 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 17 Nov 2007 18:35:54 +0000 (18:35 +0000)
using same changes to magic sed scripts as were recently applied to
Makefile.install.am.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7174

Makefile.install.am
Makefile.tool-inplace.am

index 8870758d39e11758647f6ca143cefb020e8df8fd..cde1a548b133a108b89001ef52808e31c81e47b5 100644 (file)
@@ -9,6 +9,8 @@
 # and not in
 #    $prefix/lib/valgrind/omega-x86-linux/exp
 # or similarly mutant place.
+#
+# Note there is identical sed magic in Makefile.tool-inplace.am.
 
 # What the second for loop does: it copies libcoregrind.a and libvex.a
 # into the correct (target-specific) lib dirs at install time.
index 203b6cc76be3275472644ecd7879586bacae22c9..3ad296a166a41067fde1503261504fdeb5393bf6 100644 (file)
@@ -1,8 +1,14 @@
+
+# For a description of what these magic sed commands do, see comments
+# in Makefile.install.am (which has identical magic)
+
 all-local:
-       for f in $(noinst_PROGRAMS); do \
-         p=`echo $$f | sed -e 's/^[^-]*-//' -e 's/\..*$$//'`; \
-         n=`echo $$f | sed -e 's/-[^-]\{1,\}-[^-.]\{1,\}//'`; \
-         mkdir -p $(inplacedir)/$$p; \
-         rm -f $(inplacedir)/$$p/$$n; \
-         ln -f -s ../../$(subdir)/$$f $(inplacedir)/$$p/$$n; \
-       done
+       if [ -n "$(noinst_PROGRAMS)" ] ; then \
+         for f in $(noinst_PROGRAMS); do \
+           name=`echo $$f | sed -e 's/-\([^-]*-[^-.]*\)\(\..*\)\?$$/\2/'`; \
+           plat=`echo $$f | sed -e 's/^.*-\([^-]*-[^-.]*\)\(\..*\)\?$$/\1/'`; \
+           mkdir -p $(inplacedir)/$$plat; \
+           rm -f $(inplacedir)/$$plat/$$name; \
+           ln -f -s ../../$(subdir)/$$f $(inplacedir)/$$plat/$$name; \
+         done ; \
+       fi