From fbd9fe855d4dfee0d4a345350b174ebacf6bfbbb Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 9 May 2014 13:34:13 +0000 Subject: [PATCH] Out of tree build. Partial fix for Bug 333628. Patch by Gilles Chanteperdrix . Partial fix. make && make check now works with builddir != srcdir. But make regtest doesn't yet. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13949 --- Makefile.all.am | 2 ++ Makefile.am | 4 ++-- Makefile.tool-tests.am | 1 + Makefile.vex.am | 3 ++- coregrind/Makefile.am | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile.all.am b/Makefile.all.am index d4be31209..96eb8403f 100644 --- a/Makefile.all.am +++ b/Makefile.all.am @@ -117,6 +117,7 @@ AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@ = \ -I$(top_srcdir) \ -I$(top_srcdir)/include \ -I$(top_srcdir)/VEX/pub \ + -I$(top_builddir)/VEX/pub \ -DVGA_@VGCONF_ARCH_PRI@=1 \ -DVGO_@VGCONF_OS@=1 \ -DVGP_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1 \ @@ -126,6 +127,7 @@ AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@ = \ -I$(top_srcdir) \ -I$(top_srcdir)/include \ -I$(top_srcdir)/VEX/pub \ + -I$(top_builddir)/VEX/pub \ -DVGA_@VGCONF_ARCH_SEC@=1 \ -DVGO_@VGCONF_OS@=1 \ -DVGP_@VGCONF_ARCH_SEC@_@VGCONF_OS@=1 \ diff --git a/Makefile.am b/Makefile.am index 2426b5c1f..eae517277 100644 --- a/Makefile.am +++ b/Makefile.am @@ -65,12 +65,12 @@ CLEANFILES = default.supp default.supp: $(DEFAULT_SUPP_FILES) echo "# This is a generated file, composed of the following suppression rules:" > default.supp echo "# " $(DEFAULT_SUPP_FILES) >> default.supp - cat $(DEFAULT_SUPP_FILES) >> default.supp + cat $^ >> default.supp ## Preprend @PERL@ because tests/vg_regtest isn't executable ## Ensure make exits with error if PERL fails or post_regtest_checks fails. regtest: check - gdbserver_tests/make_local_links $(GDB) + $(top_srcdir)/gdbserver_tests/make_local_links $(GDB) if @PERL@ tests/vg_regtest gdbserver_tests $(TOOLS) $(EXP_TOOLS) ; then \ tests/post_regtest_checks $(abs_top_srcdir) gdbserver_tests $(TOOLS) $(EXP_TOOLS); \ else \ diff --git a/Makefile.tool-tests.am b/Makefile.tool-tests.am index 299ba7b38..6521afb4a 100644 --- a/Makefile.tool-tests.am +++ b/Makefile.tool-tests.am @@ -5,6 +5,7 @@ include $(top_srcdir)/Makefile.all.am AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \ -I$(top_srcdir)/coregrind -I$(top_builddir)/include \ -I$(top_srcdir)/VEX/pub \ + -I$(top_builddir)/VEX/pub \ -DVGA_@VGCONF_ARCH_PRI@=1 \ -DVGO_@VGCONF_OS@=1 \ -DVGP_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1 \ diff --git a/Makefile.vex.am b/Makefile.vex.am index 5adbae86f..41690e166 100644 --- a/Makefile.vex.am +++ b/Makefile.vex.am @@ -79,11 +79,12 @@ pub/libvex_guest_offsets.h: auxprogs/genoffsets.c \ pub/libvex_guest_mips32.h \ pub/libvex_guest_mips64.h rm -f auxprogs/genoffsets.s + $(mkdir_p) auxprogs pub $(CC) $(CFLAGS) \ $(LIBVEX_CFLAGS) \ $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \ -O -S -o auxprogs/genoffsets.s \ - auxprogs/genoffsets.c + $(srcdir)/auxprogs/genoffsets.c grep xyzzy auxprogs/genoffsets.s | grep "^#define" \ | sed "s/xyzzy\\$$//g" \ | sed "s/xyzzy#//g" \ diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am index 99f767c4b..c3ba6bb9c 100644 --- a/coregrind/Makefile.am +++ b/coregrind/Makefile.am @@ -640,7 +640,7 @@ if VGCONF_OS_IS_DARWIN BUILT_SOURCES += fixup_macho_loadcmds fixup_macho_loadcmds: fixup_macho_loadcmds.c - $(CC) -g -Wall -o fixup_macho_loadcmds fixup_macho_loadcmds.c + $(CC) -g -Wall -o $@ $< CLEANFILES += fixup_macho_loadcmds -- 2.11.4.GIT