ftmemsim-valgrind/Makefile.tool-inplace.am
Julian Seward 2ab03ee95d Makefile.tool-inplace.am: correctly handle tool names with dashes in,
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
2007-11-17 18:35:54 +00:00

15 lines
520 B
Makefile

# For a description of what these magic sed commands do, see comments
# in Makefile.install.am (which has identical magic)
all-local:
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