|
From: <sv...@va...> - 2009-02-06 07:22:11
|
Author: njn
Date: 2009-02-06 07:22:03 +0000 (Fri, 06 Feb 2009)
New Revision: 9119
Log:
Merged r9118 (make Makefile.install.am less confusing) from the trunk.
Modified:
branches/DARWIN/Makefile.inplace.am
branches/DARWIN/Makefile.install.am
branches/DARWIN/Makefile.tool.am
branches/DARWIN/coregrind/Makefile.am
Modified: branches/DARWIN/Makefile.inplace.am
===================================================================
--- branches/DARWIN/Makefile.inplace.am 2009-02-06 07:12:57 UTC (rev 9118)
+++ branches/DARWIN/Makefile.inplace.am 2009-02-06 07:22:03 UTC (rev 9119)
@@ -1,8 +1,8 @@
# This is used by coregrind/Makefile.am and Makefile.tool.am for doing
# "in-place" installs. It copies $(noinst_PROGRAMS) into $inplacedir, doing
# some magic renaming as it does.
-# For a description of what these magic sed commands do, see comments
-# in Makefile.install.am (which has identical magic)
+# There is similar code in Makefile.install.am (which describes how the
+# magic sed commands work).
all-local:
if [ -n "$(noinst_PROGRAMS)" ] ; then \
Modified: branches/DARWIN/Makefile.install.am
===================================================================
--- branches/DARWIN/Makefile.install.am 2009-02-06 07:12:57 UTC (rev 9118)
+++ branches/DARWIN/Makefile.install.am 2009-02-06 07:22:03 UTC (rev 9119)
@@ -1,6 +1,11 @@
-
-# What the first for loop does: it copies a bunch of files which names
-# of the form wurble-arch-os to $prefix/lib/valgrind/arch-os/wurble.
+# This is used by coregrind/Makefile.am and by <tool>/Makefile.am for doing
+# "make install". It copies $(noinst_PROGRAMS) into $prefix/lib/valgrind/,
+# doing some magic renaming as it does.
+# It needs to be depended on by an 'install-exec-local' rule.
+# There is similar code in Makefile.inplace.am.
+#
+# Details about the renaming: the loop copies a bunch of files with
+# names of the form wurble-arch-os to $prefix/lib/valgrind/arch-os/wurble.
# There is some complexity in the sed mangling because wurble may itself
# contain a dash, which must be ignored. For example we want
# exp-omega-x86-linux
@@ -9,20 +14,8 @@
# and not in
# $prefix/lib/valgrind/omega-x86-linux/exp
# or similarly mutant place.
-#
-# Note there is identical sed magic in Makefile.inplace.am.
-# What the second for loop does: it copies libcoregrind.a and libvex.a
-# into the correct (target-specific) lib dirs at install time.
-# $(noinst_LIBRARIES) will look like this:
-# libcoregrind_x86_linux.a libreplacemalloc_toolpreload_x86_linux.a
-# libcoregrind_amd64_linux.a libreplacemalloc_toolpreload_amd64_linux.a
-# The 'if expr' filters out all but the libcoregrind_ ones.
-# pD and pU are the (arch,os) target pairs separated by a dash (pD) or
-# an underscore (pU) respectively, eg amd64-linux (pD) and amd64_linux (pU).
-# It then copies libcoregrind.a and libvex.a to the right places.
-
-install-exec-local:
+install-exec-local-programs:
if [ -n "$(noinst_PROGRAMS)" ] ; then \
for f in $(noinst_PROGRAMS); do \
name=`echo $$f | sed -e 's/-\([^-]*-[^-.]*\)\(\..*\)\{0,1\}$$/\2/'`; \
@@ -30,15 +23,5 @@
$(mkinstalldirs) $(DESTDIR)$(valdir)/$$plat; \
$(INSTALL_PROGRAM) $$f $(DESTDIR)$(valdir)/$$plat/$$name; \
done ; \
- fi ; \
- if [ -n "$(noinst_LIBRARIES)" ] ; then \
- for f in $(noinst_LIBRARIES) expr_wont_match_me; do \
- if expr match $$f libcoregrind_ > /dev/null ; then \
- pU=`echo $$f | sed -e 's/libcoregrind_//g' -e 's/\.a//g'` ; \
- pD=`echo $$pU | sed -e 's/_/-/g'` ; \
- $(INSTALL_DATA) $$f $(DESTDIR)$(valdir)/$$pD/libcoregrind.a ; \
- $(INSTALL_DATA) @VEX_DIR@/libvex_$$pU.a \
- $(DESTDIR)$(valdir)/$$pD/libvex.a ; \
- fi ; \
- done ; \
fi
+
Modified: branches/DARWIN/Makefile.tool.am
===================================================================
--- branches/DARWIN/Makefile.tool.am 2009-02-06 07:12:57 UTC (rev 9118)
+++ branches/DARWIN/Makefile.tool.am 2009-02-06 07:22:03 UTC (rev 9119)
@@ -203,3 +203,6 @@
LIBREPLACEMALLOC_LDFLAGS_AMD64_DARWIN = \
$(LIBREPLACEMALLOC_AMD64_DARWIN)
+
+
+install-exec-local: install-exec-local-programs
Modified: branches/DARWIN/coregrind/Makefile.am
===================================================================
--- branches/DARWIN/coregrind/Makefile.am 2009-02-06 07:12:57 UTC (rev 9118)
+++ branches/DARWIN/coregrind/Makefile.am 2009-02-06 07:22:03 UTC (rev 9119)
@@ -1,8 +1,7 @@
# Be very careful when renaming any files, targets, whatever, in this
-# Makefile. The install-exec-local target in ../Makefile.install.am
-# does some fragile sed file-name-mangling which is liable to break if
-# the names of noinst_LIBRARIES or noinst_PROGRAMS change 'shape'.
+# Makefile. Various parts of the system rely on these names having
+# particular forms.
include $(top_srcdir)/Makefile.all.am
include $(top_srcdir)/Makefile.flags.am
@@ -42,29 +41,38 @@
noinst_LIBRARIES =
+LIBPLATFORMS =
if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
noinst_LIBRARIES += libcoregrind_x86_linux.a libreplacemalloc_toolpreload_x86_linux.a
+LIBPLATFORMS += x86_linux
endif
if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
noinst_LIBRARIES += libcoregrind_amd64_linux.a libreplacemalloc_toolpreload_amd64_linux.a
+LIBPLATFORMS += amd64_linux
endif
if VGCONF_PLATFORMS_INCLUDE_PPC32_LINUX
noinst_LIBRARIES += libcoregrind_ppc32_linux.a libreplacemalloc_toolpreload_ppc32_linux.a
+LIBPLATFORMS += ppc32_linux
endif
if VGCONF_PLATFORMS_INCLUDE_PPC64_LINUX
noinst_LIBRARIES += libcoregrind_ppc64_linux.a libreplacemalloc_toolpreload_ppc64_linux.a
+LIBPLATFORMS += ppc64_linux
endif
if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
noinst_LIBRARIES += libcoregrind_ppc32_aix5.a libreplacemalloc_toolpreload_ppc32_aix5.a
+LIBPLATFORMS += ppc32_aix5
endif
if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
noinst_LIBRARIES += libcoregrind_ppc64_aix5.a libreplacemalloc_toolpreload_ppc64_aix5.a
+LIBPLATFORMS += ppc64_aix5
endif
if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN
noinst_LIBRARIES += libcoregrind_x86_darwin.a libreplacemalloc_toolpreload_x86_darwin.a
+LIBPLATFORMS += x86_darwin
endif
if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN
noinst_LIBRARIES += libcoregrind_amd64_darwin.a libreplacemalloc_toolpreload_amd64_darwin.a
+LIBPLATFORMS += amd64_darwin
endif
@@ -388,7 +396,6 @@
m_sigframe/sigframe-x86-linux.c \
m_syswrap/syscall-x86-linux.S \
m_syswrap/syswrap-x86-linux.c
-
libcoregrind_x86_linux_a_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX)
libcoregrind_x86_linux_a_CFLAGS = $(AM_CFLAGS_X86_LINUX)
libcoregrind_x86_linux_a_CCASFLAGS = $(AM_CCASFLAGS_X86_LINUX)
@@ -402,7 +409,6 @@
m_sigframe/sigframe-amd64-linux.c \
m_syswrap/syscall-amd64-linux.S \
m_syswrap/syswrap-amd64-linux.c
-
libcoregrind_amd64_linux_a_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX)
libcoregrind_amd64_linux_a_CFLAGS = $(AM_CFLAGS_AMD64_LINUX)
libcoregrind_amd64_linux_a_CCASFLAGS = $(AM_CCASFLAGS_AMD64_LINUX)
@@ -415,7 +421,6 @@
m_sigframe/sigframe-ppc32-linux.c \
m_syswrap/syscall-ppc32-linux.S \
m_syswrap/syswrap-ppc32-linux.c
-
libcoregrind_ppc32_linux_a_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX)
libcoregrind_ppc32_linux_a_CFLAGS = $(AM_CFLAGS_PPC32_LINUX)
libcoregrind_ppc32_linux_a_CCASFLAGS = $(AM_CCASFLAGS_PPC32_LINUX)
@@ -428,7 +433,6 @@
m_sigframe/sigframe-ppc64-linux.c \
m_syswrap/syscall-ppc64-linux.S \
m_syswrap/syswrap-ppc64-linux.c
-
libcoregrind_ppc64_linux_a_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX)
libcoregrind_ppc64_linux_a_CFLAGS = $(AM_CFLAGS_PPC64_LINUX)
libcoregrind_ppc64_linux_a_CCASFLAGS = $(AM_CCASFLAGS_PPC64_LINUX)
@@ -441,7 +445,6 @@
m_sigframe/sigframe-ppc32-aix5.c \
m_syswrap/syscall-ppc32-aix5.S \
m_syswrap/syswrap-ppc32-aix5.c
-
libcoregrind_ppc32_aix5_a_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5)
libcoregrind_ppc32_aix5_a_CFLAGS = $(AM_CFLAGS_PPC32_AIX5)
libcoregrind_ppc32_aix5_a_CCASFLAGS = $(AM_CCASFLAGS_PPC32_AIX5)
@@ -455,7 +458,6 @@
m_sigframe/sigframe-ppc64-aix5.c \
m_syswrap/syscall-ppc64-aix5.S \
m_syswrap/syswrap-ppc64-aix5.c
-
libcoregrind_ppc64_aix5_a_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5)
libcoregrind_ppc64_aix5_a_CFLAGS = $(AM_CFLAGS_PPC64_AIX5)
libcoregrind_ppc64_aix5_a_CCASFLAGS = $(AM_CCASFLAGS_PPC64_AIX5)
@@ -474,7 +476,6 @@
m_mach/mach_traps-x86-darwin.S \
m_start-x86-darwin.S \
m_cpuid-x86-darwin.S
-
libcoregrind_x86_darwin_a_CPPFLAGS = $(AM_CPPFLAGS_X86_DARWIN)
libcoregrind_x86_darwin_a_CFLAGS = $(AM_CFLAGS_X86_DARWIN)
libcoregrind_x86_darwin_a_CCASFLAGS = $(AM_CCASFLAGS_X86_DARWIN)
@@ -491,7 +492,6 @@
m_mach/mach_traps-amd64-darwin.S \
m_start-amd64-darwin.S \
m_cpuid-amd64-darwin.S
-
libcoregrind_amd64_darwin_a_CPPFLAGS = $(AM_CPPFLAGS_AMD64_DARWIN)
libcoregrind_amd64_darwin_a_CFLAGS = $(AM_CFLAGS_AMD64_DARWIN)
libcoregrind_amd64_darwin_a_CCASFLAGS = $(AM_CCASFLAGS_AMD64_DARWIN)
@@ -598,6 +598,22 @@
$(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" clean
rm -f $(mach_srcs) $(mach_server_srcs) $(mach_hdrs)
+# Nb: The loop installs some .a files for possible use by standalone tools
+# into the correct (target-specific) lib dirs at install time.
+# $(LIBPLATFORMS) will look like this:
+# x86_linux amd64_linux
+# pD and pU are the (arch,os) target pairs separated by a dash (pD) or
+# an underscore (pU) respectively, eg amd64-linux (pD) and amd64_linux (pU).
+# It then copies the libraries to the right places.
+install-exec-local: install-exec-local-programs
+ for pU in $(LIBPLATFORMS) ; do \
+ pD=`echo $$pU | sed -e 's/_/-/g'` ; \
+ $(INSTALL_DATA) libcoregrind_$$pU.a $(DESTDIR)$(valdir)/$$pD/libcoregrind.a ; \
+ $(INSTALL_DATA) libreplacemalloc_toolpreload_$$pU.a $(DESTDIR)$(valdir)/$$pD/libreplacemalloc_toolpreload.a ; \
+ $(INSTALL_DATA) @VEX_DIR@/libvex_$$pU.a $(DESTDIR)$(valdir)/$$pD/libvex.a ; \
+ done
+
+
MANUAL_DEPS = $(noinst_HEADERS) $(include_HEADERS)
EXTRA_DIST = \
|