summaryrefslogtreecommitdiff
path: root/Makefile.tool-inplace.am
blob: 3ad296a166a41067fde1503261504fdeb5393bf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

# 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