summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-10-15 17:07:23 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-10-15 23:13:24 -0700
commit55534dc5b1874813249f17efe042294b01b8bd27 (patch)
treee95b824a033eb64999a0ba2fe8d2d8be7c3be772 /Makefile.in
parent58e4ec577f3168eba282e9ad36257e9bee0702f2 (diff)
downloadtmwa-55534dc5b1874813249f17efe042294b01b8bd27.tar.gz
tmwa-55534dc5b1874813249f17efe042294b01b8bd27.tar.bz2
tmwa-55534dc5b1874813249f17efe042294b01b8bd27.tar.xz
tmwa-55534dc5b1874813249f17efe042294b01b8bd27.zip
Remove the need for empty source files to check headers
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
index 3f98706..ae609ee 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -196,6 +196,7 @@ PIES := $(shell cd ${SRC_DIR}; find src/ -name '*.py')
PIES := $(filter-out src/main-gdb-%.py,${PIES})
SOURCES := ${REAL_SOURCES}
HEADERS := ${REAL_HEADERS}
+CHECK_HEADERS := $(patsubst src/%.hpp,obj/%.hpp.check,$(filter %.hpp,${REAL_HEADERS}))
PATTERN_ROOTS := $(patsubst src/%.cpp,%,${SOURCES})
PATTERN_MAINS := $(patsubst %/main,%,$(filter %/main,${PATTERN_ROOTS}))
PATTERN_LIBS := $(patsubst %/lib,%,$(filter %/lib,${PATTERN_ROOTS}))
@@ -427,6 +428,10 @@ obj/%.pdc.o: src/%.cpp
obj/%.pic.o: src/%.cpp
$(MKDIR_FIRST)
$c ${CXX} ${CPPFLAGS} ${CXXFLAGS} -fPIC -c -o $@ $<
+obj/%.hpp.check: src/%.hpp
+ $(MKDIR_FIRST)
+ echo '#include "$<"' | ${CXX} ${CPPFLAGS} ${CXXFLAGS} -x c++ -fsyntax-only -
+ touch $@
bin/%-gdb.py: src/main-gdb-head.py src/main-gdb-tail.py
$(MKDIR_FIRST)
@@ -474,9 +479,11 @@ obj/run-test-debug-debug.stamp:
endif
test: $(patsubst bin/%,obj/run-%.stamp,${TEST_BINARIES})
+test: test-headers
obj/run-%.stamp: bin/%
${TESTER} $< ${TEST_ARGS}
touch $@
+test-headers: ${CHECK_HEADERS}
install := install
install_exe := ${install}