sewardj | 5533424 | 2005-11-09 14:04:27 +0000 | [diff] [blame] | 1 | |
| 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 | |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 12 | install-exec-local: |
tom | 8609d39 | 2005-12-19 12:48:03 +0000 | [diff] [blame] | 13 | if [ -n "$(noinst_PROGRAMS)" ] ; then \ |
| 14 | for f in $(noinst_PROGRAMS); do \ |
| 15 | p=`echo $$f | sed -e 's/^[^-]*-//' -e 's/\..*$$//'`; \ |
| 16 | n=`echo $$f | sed -e 's/-[^-]\{1,\}-[^-.]\{1,\}//'`; \ |
| 17 | $(mkinstalldirs) $(DESTDIR)$(valdir)/$$p; \ |
| 18 | $(INSTALL_PROGRAM) $$f $(DESTDIR)$(valdir)/$$p/$$n; \ |
| 19 | done ; \ |
| 20 | fi ; \ |
| 21 | if [ -n "$(noinst_LIBRARIES)" ] ; then \ |
| 22 | for f in $(noinst_LIBRARIES); do \ |
| 23 | if expr match $$f libcoregrind_ > /dev/null ; then \ |
| 24 | pU=`echo $$f | sed -e 's/libcoregrind_//g' -e 's/\.a//g'` ; \ |
| 25 | pD=`echo $$pU | sed -e 's/_/-/g'` ; \ |
| 26 | $(INSTALL_DATA) $$f $(DESTDIR)$(valdir)/$$pD/libcoregrind.a ; \ |
| 27 | $(INSTALL_DATA) @VEX_DIR@/libvex_$$pU.a $(DESTDIR)$(valdir)/$$pD/libvex.a ; \ |
| 28 | fi ; \ |
| 29 | done ; \ |
| 30 | fi |