Merge the non-Darwin parts of r9140 (install vgpreload .dSYMs), just to keep
the trunk and DARWIN branch in sync.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9141 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/Makefile.install.am b/Makefile.install.am
index 1f02b6e..c797ee7 100644
--- a/Makefile.install.am
+++ b/Makefile.install.am
@@ -1,9 +1,10 @@
 # This is used by coregrind/Makefile.am and Makefile.tool.am for doing
 # "in-place" installs.  It copies $(noinst_PROGRAMS) into $inplacedir.
-all-local:
+# It needs to be depended on by an 'all-local' rule.
+inplace-noinst_PROGRAMS:
 	if [ -n "$(noinst_PROGRAMS)" ] ; then \
-	  for f in $(noinst_PROGRAMS); do \
-	    mkdir -p $(inplacedir); \
+	  mkdir -p $(inplacedir); \
+	  for f in $(noinst_PROGRAMS) ; do \
 	    rm -f $(inplacedir)/$$f; \
 	    ln -f -s ../$(subdir)/$$f $(inplacedir); \
 	  done ; \
@@ -12,10 +13,10 @@
 # This is used by coregrind/Makefile.am and by <tool>/Makefile.am for doing
 # "make install".  It copies $(noinst_PROGRAMS) into $prefix/lib/valgrind/.
 # It needs to be depended on by an 'install-exec-local' rule.
-install-exec-local-programs:
+install-noinst_PROGRAMS:
 	if [ -n "$(noinst_PROGRAMS)" ] ; then \
+	  $(mkinstalldirs) $(DESTDIR)$(valdir); \
 	  for f in $(noinst_PROGRAMS); do \
-	    $(mkinstalldirs) $(DESTDIR)$(valdir); \
 	    $(INSTALL_PROGRAM) $$f $(DESTDIR)$(valdir); \
 	  done ; \
 	fi