blob: 38d7fff7892d6a02b2d2bca553dd699a6bfe2914 [file] [log] [blame]
sewardj55334242005-11-09 14:04:27 +00001
2# What the second for loop does: it copies libcoregrind.a and libvex.a
3# into the correct (target-specific) lib dirs at install time.
4# $(noinst_LIBRARIES) will look like this:
5# libcoregrind_x86_linux.a libreplacemalloc_toolpreload_x86_linux.a
6# libcoregrind_amd64_linux.a libreplacemalloc_toolpreload_amd64_linux.a
7# The 'if expr' filters out all but the libcoregrind_ ones.
8# pD and pU are the (arch,os) target pairs separated by a dash (pD) or
9# an underscore (pU) respectively, eg amd64-linux (pD) and amd64_linux (pU).
10# It then copies libcoregrind.a and libvex.a to the right places.
11
tomfb7bcde2005-11-07 15:24:38 +000012install-exec-local:
13 for f in $(noinst_PROGRAMS); do \
14 p=`echo $$f | sed -e 's/^[^-]*-//' -e 's/\..*$$//'`; \
15 n=`echo $$f | sed -e 's/-[^-]\{1,\}-[^-.]\{1,\}//'`; \
16 $(mkinstalldirs) $(DESTDIR)$(valdir)/$$p; \
17 $(INSTALL_PROGRAM) $$f $(DESTDIR)$(valdir)/$$p/$$n; \
sewardj55334242005-11-09 14:04:27 +000018 done ; \
19 for f in $(noinst_LIBRARIES); do \
20 if expr match $$f libcoregrind_ > /dev/null ; then \
21 pU=`echo $$f | sed -e 's/libcoregrind_//g' -e 's/\.a//g'` ; \
22 pD=`echo $$pU | sed -e 's/_/-/g'` ; \
tom3cdcb8c2005-11-10 11:11:39 +000023 $(INSTALL_DATA) $$f $(DESTDIR)$(valdir)/$$pD/libcoregrind.a ; \
24 $(INSTALL_DATA) @VEX_DIR@/libvex_$$pU.a $(DESTDIR)$(valdir)/$$pD/libvex.a ; \
sewardj55334242005-11-09 14:04:27 +000025 fi ; \
tomfb7bcde2005-11-07 15:24:38 +000026 done