Date: Tuesday, December 19, 2006 @ 18:22:23
  Author: marc
    Path: /cvsroot/carob/carob

Modified: GNUmakefile (1.1 -> 1.2)

Added new targets: checklib, checkstatic, check


-------------+
 GNUmakefile |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)


Index: carob/GNUmakefile
diff -u carob/GNUmakefile:1.1 carob/GNUmakefile:1.2
--- carob/GNUmakefile:1.1       Mon Dec 18 14:01:54 2006
+++ carob/GNUmakefile   Tue Dec 19 18:22:23 2006
@@ -109,7 +109,7 @@
 ${LIB_CAROB_STATIC}: ${OBJS}
        ar ${ARFLAGS} ${LIB_CAROB_STATIC} ${OBJS}       
 
-clean: clean-lib clean-test clean-doc
+clean: clean-lib clean-test clean-doc clean-checks
 clean-lib:
        ${RM} ${SRCDIR}/*.o ${LIB_CAROB_LIB} ${LIB_CAROB_LIB_SHORT} 
${LIB_CAROB_STATIC}
 clean-test:
@@ -121,14 +121,36 @@
 ${DOC_HTML}: ${DOXYFILE}
        ${DOXYGEN} ${DOXYFILE}
 
+
+   ########## CHECKS ##############"
+
+check: checkstatic checklib checkheaders
+
+clean-check:
+       ${RM} checkstatic checklib include/headercheck
+
 # compile each include/*.hpp, isolated
+# TODO: use a GNU make loop instead of a shell script one
 checkheaders:
        cd include ; \
        for h in *.hpp; do ln -sf $$h someheader.cpp; \
        printf "compiling $$h\n"; \
-       ${CXX} -c ${CXXFLAGS} someheader.cpp; done
+       ${CXX} -c ${CXXFLAGS} someheader.cpp -o headercheck; done
+
+# Link a empty executable to our lib
+# Useful to detect unresolved symbols in our lib
+checklib:  ${LIB_CAROB_LIB}
+       - ${CXX} -Iinclude dummymain.cpp $< -o $@
+       ldd $<
+
+STATIC_DEPS     =  -lgmp -lpthread
+
+checkstatic: ${LIB_CAROB_STATIC}
+       - ${CXX} -Iinclude ${STATIC_DEPS} dummymain.cpp $< -o $@
+       ldd $@
 
 
+  ########### DIST ##################
 
 # To create "carob-foo.tar.gz" from carob version tag r12_34,
 # simply type this:

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to