|
From: <sv...@va...> - 2009-04-24 03:55:51
|
Author: njn Date: 2009-04-24 04:55:44 +0100 (Fri, 24 Apr 2009) New Revision: 9596 Log: Cleaned up the build system a bit -- factored out some duplicated dSYM-handling code. Renamed Makefile.install.am as Makefile.core-tool.am accordingly. Also add AM_CFLAGS into the CFLAGS of some tests that should have had it. That fixes two of the four tests broken by r9586. Also made "make clean" delete the .in_place directory, which it probably should have always done, but didn't prior to now. Added: branches/DARWIN/Makefile.core-tool.am Removed: branches/DARWIN/Makefile.install.am Modified: branches/DARWIN/Makefile.am branches/DARWIN/Makefile.tool.am branches/DARWIN/coregrind/Makefile.am branches/DARWIN/none/tests/Makefile.am branches/DARWIN/none/tests/ppc32/Makefile.am branches/DARWIN/none/tests/ppc64/Makefile.am branches/DARWIN/none/tests/x86/Makefile.am Modified: branches/DARWIN/Makefile.am =================================================================== --- branches/DARWIN/Makefile.am 2009-04-23 20:07:23 UTC (rev 9595) +++ branches/DARWIN/Makefile.am 2009-04-24 03:55:44 UTC (rev 9596) @@ -110,10 +110,8 @@ rm -f $(inplacedir)/default.supp ln -s ../default.supp $(inplacedir) -distclean-local: - rm -rf $(inplacedir) clean-local: - rm -rf .in_place/*.dSYM + rm -rf $(inplacedir) # These list the bits of vex we need to install Copied: branches/DARWIN/Makefile.core-tool.am (from rev 9595, branches/DARWIN/Makefile.install.am) =================================================================== --- branches/DARWIN/Makefile.core-tool.am (rev 0) +++ branches/DARWIN/Makefile.core-tool.am 2009-04-24 03:55:44 UTC (rev 9596) @@ -0,0 +1,65 @@ +# This file contains things shared by coregrind/Makefile.am and tool +# Makefile.am files. + +# See Makefile.tool-tests.am for an explanation of dSYMs. +build-noinst_DSYMS: + for f in $(noinst_DSYMS); do \ + if [ ! -e $$f.dSYM -o $$f -nt $$f.dSYM ] ; then \ + echo "dsymutil $$f"; \ + dsymutil $$f; \ + fi; \ + done + +# This is used by coregrind/Makefile.am and Makefile.tool.am for doing +# "in-place" installs. It copies $(noinst_PROGRAMS) into $inplacedir. +# It needs to be depended on by an 'all-local' rule. +inplace-noinst_PROGRAMS: + if [ -n "$(noinst_PROGRAMS)" ] ; then \ + mkdir -p $(inplacedir); \ + for f in $(noinst_PROGRAMS) ; do \ + rm -f $(inplacedir)/$$f; \ + ln -f -s ../$(subdir)/$$f $(inplacedir); \ + done ; \ + fi + +# Similar to inplace-noinst_PROGRAMS +inplace-noinst_DSYMS: build-noinst_DSYMS + if [ -n "$(noinst_DSYMS)" ] ; then \ + mkdir -p $(inplacedir); \ + for f in $(noinst_DSYMS); do \ + rm -f $(inplacedir)/$$f.dSYM; \ + ln -f -s ../$(subdir)/$$f.dSYM $(inplacedir); \ + done ; \ + fi + +# This is used by coregrind/Makefile.am and by <tool>/Makefile.am for doing +# "make install". It copies $(noinst_PROGRAMS) into $prefix/lib/valgrind/. +# It needs to be depended on by an 'install-exec-local' rule. +install-noinst_PROGRAMS: + if [ -n "$(noinst_PROGRAMS)" ] ; then \ + $(mkinstalldirs) $(DESTDIR)$(valdir); \ + for f in $(noinst_PROGRAMS); do \ + $(INSTALL_PROGRAM) $$f $(DESTDIR)$(valdir); \ + done ; \ + fi + +# Similar to install-noinst_PROGRAMS. +# Nb: we don't use $(INSTALL_PROGRAM) here because it doesn't work with +# directories. XXX: not sure whether the resulting permissions will be +# correct when using 'cp -R'... +install-noinst_DSYMS: build-noinst_DSYMS + if [ -n "$(noinst_DSYMS)" ] ; then \ + $(mkinstalldirs) $(DESTDIR)$(valdir); \ + for f in $(noinst_DSYMS); do \ + cp -R $$f.dSYM $(DESTDIR)$(valdir); \ + done ; \ + fi + +# This needs to be depended on by a 'clean-local' rule. +clean-noinst_DSYMS: + for f in $(noinst_DSYMS); do \ + rm -rf $$f.dSYM; \ + done + + + Deleted: branches/DARWIN/Makefile.install.am =================================================================== --- branches/DARWIN/Makefile.install.am 2009-04-23 20:07:23 UTC (rev 9595) +++ branches/DARWIN/Makefile.install.am 2009-04-24 03:55:44 UTC (rev 9596) @@ -1,23 +0,0 @@ -# This is used by coregrind/Makefile.am and Makefile.tool.am for doing -# "in-place" installs. It copies $(noinst_PROGRAMS) into $inplacedir. -# It needs to be depended on by an 'all-local' rule. -inplace-noinst_PROGRAMS: - if [ -n "$(noinst_PROGRAMS)" ] ; then \ - mkdir -p $(inplacedir); \ - for f in $(noinst_PROGRAMS) ; do \ - rm -f $(inplacedir)/$$f; \ - ln -f -s ../$(subdir)/$$f $(inplacedir); \ - done ; \ - fi - -# This is used by coregrind/Makefile.am and by <tool>/Makefile.am for doing -# "make install". It copies $(noinst_PROGRAMS) into $prefix/lib/valgrind/. -# It needs to be depended on by an 'install-exec-local' rule. -install-noinst_PROGRAMS: - if [ -n "$(noinst_PROGRAMS)" ] ; then \ - $(mkinstalldirs) $(DESTDIR)$(valdir); \ - for f in $(noinst_PROGRAMS); do \ - $(INSTALL_PROGRAM) $$f $(DESTDIR)$(valdir); \ - done ; \ - fi - Modified: branches/DARWIN/Makefile.tool.am =================================================================== --- branches/DARWIN/Makefile.tool.am 2009-04-23 20:07:23 UTC (rev 9595) +++ branches/DARWIN/Makefile.tool.am 2009-04-24 03:55:44 UTC (rev 9596) @@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.all.am include $(top_srcdir)/Makefile.flags.am -include $(top_srcdir)/Makefile.install.am +include $(top_srcdir)/Makefile.core-tool.am LIBREPLACEMALLOC_X86_LINUX = \ @@ -204,41 +204,10 @@ $(LIBREPLACEMALLOC_AMD64_DARWIN) -# See Makefile.tool-tests.am for an explanation of dSYMs. -build-noinst_DSYMS: - for f in $(noinst_DSYMS); do \ - if [ ! -e $$f.dSYM -o $$f -nt $$f.dSYM ] ; then \ - echo "dsymutil $$f"; \ - dsymutil $$f; \ - fi; \ - done -inplace-noinst_DSYMS: build-noinst_DSYMS - if [ -n "$(noinst_DSYMS)" ] ; then \ - mkdir -p $(inplacedir); \ - for f in $(noinst_DSYMS); do \ - rm -f $(inplacedir)/$$f.dSYM; \ - ln -f -s ../$(subdir)/$$f.dSYM $(inplacedir); \ - done ; \ - fi - -# Nb: we don't use $(INSTALL_PROGRAM) here because it doesn't work with -# directories. XXX: not sure whether the resulting permissions will be -# correct when using 'cp -R'... -install-noinst_DSYMS: build-noinst_DSYMS - if [ -n "$(noinst_DSYMS)" ] ; then \ - $(mkinstalldirs) $(DESTDIR)$(valdir); \ - for f in $(noinst_DSYMS); do \ - cp -R $$f.dSYM $(DESTDIR)$(valdir); \ - done ; \ - fi - all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS -clean-local: - for f in $(noinst_DSYMS); do \ - rm -rf $$f.dSYM; \ - done +clean-local: clean-noinst_DSYMS install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS Modified: branches/DARWIN/coregrind/Makefile.am =================================================================== --- branches/DARWIN/coregrind/Makefile.am 2009-04-23 20:07:23 UTC (rev 9595) +++ branches/DARWIN/coregrind/Makefile.am 2009-04-24 03:55:44 UTC (rev 9596) @@ -5,7 +5,7 @@ include $(top_srcdir)/Makefile.all.am include $(top_srcdir)/Makefile.flags.am -include $(top_srcdir)/Makefile.install.am +include $(top_srcdir)/Makefile.core-tool.am AM_CPPFLAGS_CORE_COMMON = \ -I$(top_srcdir)/coregrind \ @@ -40,9 +40,9 @@ noinst_PROGRAMS = +noinst_DSYMS = pkglib_LIBRARIES = LIBVEX = -DSYMUTIL_ME_TOO = if VGCONF_PLATFORMS_INCLUDE_X86_LINUX noinst_PROGRAMS += vgpreload_core-x86-linux.so @@ -82,16 +82,16 @@ if VGCONF_PLATFORMS_INCLUDE_X86_DARWIN noinst_PROGRAMS += vgpreload_core-x86-darwin.so +noinst_DSYMS += vgpreload_core-x86-darwin.so pkglib_LIBRARIES += libcoregrind-x86-darwin.a libreplacemalloc_toolpreload-x86-darwin.a LIBVEX += libvex-x86-darwin.a -DSYMUTIL_ME_TOO += vgpreload_core-x86-darwin.so endif if VGCONF_PLATFORMS_INCLUDE_AMD64_DARWIN noinst_PROGRAMS += vgpreload_core-amd64-darwin.so +noinst_DSYMS += vgpreload_core-amd64-darwin.so pkglib_LIBRARIES += libcoregrind-amd64-darwin.a libreplacemalloc_toolpreload-amd64-darwin.a LIBVEX += libvex-amd64-darwin.a -DSYMUTIL_ME_TOO += vgpreload_core-amd64-darwin.so endif @@ -586,20 +586,15 @@ vgpreload_core_amd64_darwin_so_CFLAGS = $(AM_CFLAGS_AMD64_DARWIN) $(AM_CFLAGS_PIC) vgpreload_core_amd64_darwin_so_LDFLAGS = $(PRELOAD_LDFLAGS_AMD64_DARWIN) -all-local: inplace-noinst_PROGRAMS - for f in $(DSYMUTIL_ME_TOO); do \ - echo "dsymutil $$f"; \ - dsymutil $$f; \ - done +all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS -clean-local: +clean-local: clean-noinst_DSYMS $(MAKE) -C @VEX_DIR@ CC="$(CC)" AR="$(AR)" clean rm -f $(mach_srcs) $(mach_server_srcs) $(mach_hdrs) - rm -rf vgpreload_core-*.dSYM # Nb: The loop installs the libvex library for possible use by standalone # tools. -install-exec-local: install-noinst_PROGRAMS +install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS for v in $(LIBVEX) ; do \ $(INSTALL_DATA) @VEX_DIR@/$$v $(DESTDIR)$(valdir) ; \ done Modified: branches/DARWIN/none/tests/Makefile.am =================================================================== --- branches/DARWIN/none/tests/Makefile.am 2009-04-23 20:07:23 UTC (rev 9595) +++ branches/DARWIN/none/tests/Makefile.am 2009-04-24 03:55:44 UTC (rev 9596) @@ -187,7 +187,7 @@ floored_LDADD = -lm manythreads_LDADD = -lpthread if VGCONF_OS_IS_DARWIN - nestedfns_CFLAGS = -fnested-functions + nestedfns_CFLAGS = $(AM_CFLAGS) -fnested-functions else mq_LDADD = -lrt endif Modified: branches/DARWIN/none/tests/ppc32/Makefile.am =================================================================== --- branches/DARWIN/none/tests/ppc32/Makefile.am 2009-04-23 20:07:23 UTC (rev 9595) +++ branches/DARWIN/none/tests/ppc32/Makefile.am 2009-04-24 03:55:44 UTC (rev 9596) @@ -33,6 +33,6 @@ AM_CXXFLAGS += @FLAG_M32@ AM_CCASFLAGS = @FLAG_M32@ -jm_insns_CFLAGS = -Winline -Wall -O -g -mregnames -maltivec @FLAG_M32@ -testVMX_CFLAGS = -O -g -Wall -maltivec -mabi=altivec -DALTIVEC \ +jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames -maltivec @FLAG_M32@ +testVMX_CFLAGS = $(AM_CFLAGS) -O -g -Wall -maltivec -mabi=altivec -DALTIVEC \ -DGCC_COMPILER @FLAG_M32@ Modified: branches/DARWIN/none/tests/ppc64/Makefile.am =================================================================== --- branches/DARWIN/none/tests/ppc64/Makefile.am 2009-04-23 20:07:23 UTC (rev 9595) +++ branches/DARWIN/none/tests/ppc64/Makefile.am 2009-04-24 03:55:44 UTC (rev 9596) @@ -20,4 +20,4 @@ AM_CXXFLAGS += @FLAG_M64@ AM_CCASFLAGS = @FLAG_M64@ -jm_insns_CFLAGS = -Winline -Wall -O -g -mregnames -maltivec @FLAG_M64@ +jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames -maltivec @FLAG_M64@ Modified: branches/DARWIN/none/tests/x86/Makefile.am =================================================================== --- branches/DARWIN/none/tests/x86/Makefile.am 2009-04-23 20:07:23 UTC (rev 9595) +++ branches/DARWIN/none/tests/x86/Makefile.am 2009-04-24 03:55:44 UTC (rev 9596) @@ -108,7 +108,7 @@ cpuid_SOURCES = cpuid_c.c cpuid_s.s # fpu_lazy_eflags must use these flags -- the bug only occurred with them. -fpu_lazy_eflags_CFLAGS = @FLAG_M32@ -O2 -march=pentiumpro +fpu_lazy_eflags_CFLAGS = $(AM_CFLAGS) -O2 -march=pentiumpro fxtract_LDADD = -lm insn_basic_SOURCES = insn_basic.def insn_basic_LDADD = -lm |