charmxi: add -count-tokens command line option
[charm.git] / src / scripts / charmc
index 630e0370c37589286d369b1b4b90b9acc3c13fa9..c87ddc56f4b350bcdd72ddfa2818fd09e22e69bb 100755 (executable)
@@ -79,6 +79,7 @@ USE_RELIABLE_CC=""
 USE_FASTEST_CC=""
 PROG_EXT=""
 GENDEPENDS="no"
+COUNTTOKENS="no"
 
 COPY_CHARMRUN=true
 USE_BUILD_OPTIONS=0
@@ -632,10 +633,15 @@ do
                OPTS="$OPTS $arg"
                ;;
        "-M")
+        PREPROCESS="no"
                SKIPLINK="yes"
                OPTS="$OPTS $arg"
                GENDEPENDS="yes"
                ;;
+    "-count-tokens")
+               OPTS="$OPTS $arg"
+        COUNTTOKENS="yes"
+        ;;
        "-default-to-aout")
                if [ "$EXPLICIT_OBJECT $EXPLICIT_COMPILATION" = "no no" ]
                then
@@ -1048,6 +1054,11 @@ then
     CMK_XIOPTS="$CMK_XIOPTS -M"
 fi
 
+if [ "$COUNTTOKENS" = "yes" ]
+then
+    CMK_XIOPTS="$CMK_XIOPTS -count-tokens"
+fi
+
 if test "$CMK_WITH_TAU" = "true"
 then
   echo "include $TAU_MAKEFILE" > _make.tau.tmp