]> oss.titaniummirror.com Git - tinyos-utils.git/commitdiff
tos-maketags: support for VARIANT and SENSORBOARD master
authorR. Steve McKown <rsmckown@gmail.com>
Wed, 26 Dec 2012 17:18:38 +0000 (10:18 -0700)
committerR. Steve McKown <rsmckown@gmail.com>
Wed, 26 Dec 2012 17:18:38 +0000 (10:18 -0700)
VARIANT and SENSORBOARD variables may be used by a TinyOS application
build for selective compile.

tos-maketags

index 1ee9653484c06402c1cb9e8368f02aaee8c4e6d2..5256e74b455f397c755250f365408aa5f662e1af 100755 (executable)
@@ -3,7 +3,10 @@
 # Build ctags for a TinyOS application.  The application must compile cleanly,
 # as output from the build is used to determine what source files to process.
 #
-# usage: maketags <platform>
+# usage: [VARIANT=<variant>] [SENSORBOARD=<sensorboard>] tos-maketags <platform>
+#
+# One of VARIANT or SENSORBOARD might be used by a TinyOS application for code
+# selection during conditional compile.
 #
 # R. Steve McKown <rsmckown@gmail.com>
 
@@ -20,7 +23,7 @@ if [ -z "$1" ]; then
 fi
 
 appc=build/$1/app.c
-CFLAGS=-v make "$1" >ctags.tmpm 2>&1
+CFLAGS=-v VARIANT=$VARIANT SENSORBOARD=$SENSORBOARD make "$1" >ctags.tmpm 2>&1
 [ $? -ne 0 -o ! -f $appc ] && echo "$0: can't compile $1" >&2 && exit 1
 grep "preprocessing" < ctags.tmpm | sed -e 's|^preprocessing ||' > ctags.tmp1
 grep "^# [0-9]* " $appc | awk -F\" '{ print $2 }' | sort -u > ctags.tmp2