From ab31b3bcbb2d516b35ff8de6cb89d6748f3202d8 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 20 Nov 2014 11:33:05 -0500 Subject: [PATCH] debug tests: Trigger rebuild when any header file changes We could go more complicated and only rebuild those source files that are affected by the changes in the header files, but I think this is a good compromise. Change-Id: I508e8ca0176408c68a16e09c51f005446aace099 Signed-off-by: Simon Marchi Reviewed-on: https://git.eclipse.org/r/36797 Tested-by: Hudson CI Reviewed-by: Marc Khouzam Tested-by: Marc Khouzam --- .../org.eclipse.cdt.tests.dsf.gdb/data/launch/src/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/Makefile b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/Makefile index a54528f6acd..4e3bcb25774 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/Makefile +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/Makefile @@ -2,6 +2,9 @@ BINDIR = ../bin SRC_C = $(wildcard *.c) SRC_CXX = $(wildcard *.cc) +# We rebuild everything whenever one of the headers change +HEADERS = $(wildcard *.h) + # Use .exe extension so that files are named the same way in Linux and Windows. BINS = $(patsubst %.c,$(BINDIR)/%.exe,$(SRC_C)) $(patsubst %.cc,$(BINDIR)/%.exe,$(SRC_CXX)) COREFILE = $(BINDIR)/core @@ -23,10 +26,10 @@ all: $(BINS) $(COREFILE) $(BINDIR): $(MKDIR) $@ -$(BINDIR)/%.exe: %.c | $(BINDIR) +$(BINDIR)/%.exe: %.c $(HEADERS) | $(BINDIR) $(CC) $(CFLAGS) -o $@ $< -$(BINDIR)/%.exe: %.cc | $(BINDIR) +$(BINDIR)/%.exe: %.cc $(HEADERS) | $(BINDIR) $(CXX) $(CXXFLAGS) -o $@ $< # Generate a core file that is needed for post-morted core-file tests