Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Marchi2014-11-20 16:33:05 +0000
committerMarc Khouzam2014-11-24 21:15:15 +0000
commitab31b3bcbb2d516b35ff8de6cb89d6748f3202d8 (patch)
tree6305825857105a0788fc12ba1987c2e4b05fc119
parent15980decb959bf660b98970e2014f25982c6ffe3 (diff)
downloadorg.eclipse.cdt-ab31b3bcbb2d516b35ff8de6cb89d6748f3202d8.tar.gz
org.eclipse.cdt-ab31b3bcbb2d516b35ff8de6cb89d6748f3202d8.tar.xz
org.eclipse.cdt-ab31b3bcbb2d516b35ff8de6cb89d6748f3202d8.zip
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 <simon.marchi@polymtl.ca> Reviewed-on: https://git.eclipse.org/r/36797 Tested-by: Hudson CI Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/data/launch/src/Makefile7
1 files 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

Back to the top