skip compiling trace modules when tracing is disabled.
authorGengbin Zheng <gzheng@illinois.edu>
Wed, 7 Sep 2011 04:26:43 +0000 (23:26 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Wed, 7 Sep 2011 04:26:43 +0000 (23:26 -0500)
examples/bigsim/Makefile
src/scripts/Makefile
src/scripts/configure
src/scripts/configure.in

index 4bfdf042784f61790e64e5d79740154b86aa8d0f..d281059658b31ccd9e4a6ebca841a80ebcf03ff1 100644 (file)
@@ -1,4 +1,10 @@
-DIRS= emulator sdag tools
+DIRS= emulator tools
+
+BUILD_TRACING=$(shell CHARMINC=../../tmp; if test -f $$CHARMINC/conv-config.sh; then . $$CHARMINC/conv-config.sh; echo $$CMK_TRACE_ENABLED; fi )
+
+ifneq "$(BUILD_TRACING)" "0"
+DIRS += sdag
+endif
 
 all:
        for d in $(DIRS); do \
index 152004270087491b3f44ba9fa76ef056934ec801..ec6d8072154af05ebf0c6a61d84a538ef7c2ca73 100644 (file)
@@ -347,11 +347,18 @@ dirs+sources:
 # 
 ###############################################################################
 CLBLIBS=$(L)/libldb-rand.o $(L)/libldb-spray.o   $(L)/libldb-workstealing.o  $(L)/libldb-neighbor.o $(L)/libldb-none.o $(L)/libldb-test.o $(L)/libldb-bluegene.o
-TRACELIBS=$(L)/libtrace-projections.a  $(L)/libtrace-summary.a   $(L)/libtrace-utilization.a \
-         $(L)/libtrace-simple.a \
-          $(L)/libtrace-counter.a $(L)/libtrace-bluegene.a \
-         $(L)/libtrace-projector.a $(L)/libtrace-all.a $(L)/libtrace-converse.a \
-          $(L)/libtracef_f.a $(L)/libtrace-memory.a
+
+TRACELIBS = $(L)/libtrace-converse.a $(L)/libtracef_f.a 
+
+BUILD_TRACING=$(shell CHARMINC=.; if test -f ./conv-config.sh; then . ./conv-config.sh; echo $$CMK_TRACE_ENABLED; fi )
+
+ifneq "$(BUILD_TRACING)" "0"
+TRACELIBS += $(L)/libtrace-projections.a  $(L)/libtrace-summary.a  \
+             $(L)/libtrace-utilization.a  $(L)/libtrace-simple.a \
+             $(L)/libtrace-counter.a $(L)/libtrace-bluegene.a \
+            $(L)/libtrace-projector.a $(L)/libtrace-all.a  \
+             $(L)/libtrace-memory.a
+endif
 
 MEMLIBS=$(L)/libmemory-default.o $(L)/libmemory-os.o $(L)/libmemory-gnu.o \
           $(L)/libmemory-gnuold.o $(L)/libmemory-verbose.o     \
@@ -361,7 +368,7 @@ MEMLIBS=$(L)/libmemory-default.o $(L)/libmemory-os.o $(L)/libmemory-gnu.o \
          $(L)/libmemory-os-leak.o $(L)/libmemory-os-paranoid.o \
           $(L)/libmemory-os-lock.o $(L)/libmemory-os-wrapper.o
 
-BUILD_CHARMDEBUG=$(shell CHARMINC=.; if test -x ./conv-config.sh; then . ./conv-config.sh; echo $$CMK_CHARMDEBUG; fi )
+BUILD_CHARMDEBUG=$(shell CHARMINC=.; if test -f ./conv-config.sh; then . ./conv-config.sh; echo $$CMK_CHARMDEBUG; fi )
 
 ifneq "$(BUILD_CHARMDEBUG)" "0"
 MEMLIBS += $(L)/libmemory-charmdebug.o $(L)/libmemory-charmdebug-mmap.o \
index 7baf8192c68eee97c86cd93ef1176d86b0d2398f..f8b1d7b304073eb9ea3cdef538c5891dd67a85ca 100755 (executable)
@@ -1788,12 +1788,14 @@ cat >>confdefs.h <<_ACEOF
 #define CMK_TRACE_ENABLED 0
 _ACEOF
 
+  add_flag CMK_TRACE_ENABLED=0
 else
 
 cat >>confdefs.h <<_ACEOF
 #define CMK_TRACE_ENABLED 1
 _ACEOF
 
+  add_flag CMK_TRACE_ENABLED=1
 fi
 
 # Check whether --enable-charmdebug was given.
index 00a4a086cd752cf70e7fb9d78a5c3817e077d276..35024518eb21884f764bbc4250942a80f60bc7c7 100644 (file)
@@ -88,8 +88,10 @@ if test "$enable_tracing" = "no"
 then
   Echo "Charm tracing is disabled"
   AC_DEFINE_UNQUOTED(CMK_TRACE_ENABLED, 0, [disable tracing])
+  add_flag CMK_TRACE_ENABLED=0
 else
   AC_DEFINE_UNQUOTED(CMK_TRACE_ENABLED, 1, [enable tracing])
+  add_flag CMK_TRACE_ENABLED=1
 fi
 
 AC_ARG_ENABLE([charmdebug],