Date: Thursday, May 3, 2007 @ 17:32:44
Author: marc
Path: /cvsroot/carob/carob
Modified: GNUmakefile (1.42 -> 1.43)
checkheaders target is now timestamp sensitive (re-check only when
needed). Running "make check" is finally as long as running it once.
-------------+
GNUmakefile | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
Index: carob/GNUmakefile
diff -u carob/GNUmakefile:1.42 carob/GNUmakefile:1.43
--- carob/GNUmakefile:1.42 Thu May 3 16:10:25 2007
+++ carob/GNUmakefile Thu May 3 17:32:44 2007
@@ -60,10 +60,15 @@
SRCS := $(wildcard ${SRCDIR}/*.cpp)
OBJS := ${SRCS:.cpp=.o}
-# sort only to remove ${VERSIONHPP} duplicated sometimes
-HPPS = $(sort ${VERSIONHPP} $(wildcard ${INCDIR}/*.hpp) $(wildcard
${INCDIR}/*.h))
+REALLYHPPS := $(wildcard ${INCDIR}/*.hpp)
+# Throw a few more headers. Use "sort" to remove ${VERSIONHPP} duplicated in
some cases
+HPPS := $(sort ${VERSIONHPP} ${REALLYHPPS} $(wildcard ${INCDIR}/*.h))
LINKEDHPPS := ${HPPS:${INCDIR}/%=${INCLUDELINK}/%}
+# for checkheaders (checking only "classes" .hpp, not .h)
+FAKECPPS := ${REALLYHPPS:${INCDIR}/%.hpp=${INCLUDELINK}/%.cpp}
+FAKEOBJS := ${FAKECPPS:%.cpp=%.o}
+
# _GLIBCXX_GTHREAD_USE_WEAK
@@ -161,12 +166,10 @@
$(MAKE) -C test $@
# compile each include/*.hpp, isolated
-# TODO: use a GNU make loop instead of a shell script one
-checkheaders:
- for h in include/*.hpp; do ln -sf $$h someheader.cpp; \
- printf "compiling $$h\n"; \
- $(MAKE) someheader.o || break; $(RM) someheader.o; done
+checkheaders: ${LINKEDHPPS} ${FAKEOBJS}
+${FAKECPPS}: ${INCLUDELINK}/%.cpp: ${INCLUDELINK}/%.hpp
+ ${LN} $*.hpp $@
########### DIST ##################
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits