diff options
author | Andre Eisenbach <andre@broadcom.com> | 2012-04-11 13:36:27 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-07-14 11:19:16 -0700 |
commit | 87564f3972ffbb4106682f7b6e88110fbe76004f (patch) | |
tree | a3d51e612f4f352502567c704cfd65729ecd1828 /tools | |
parent | 15ccfa97c678c45b05cc226d51287fb59a4f8b29 (diff) | |
download | external_bluetooth_bluedroid-87564f3972ffbb4106682f7b6e88110fbe76004f.zip external_bluetooth_bluedroid-87564f3972ffbb4106682f7b6e88110fbe76004f.tar.gz external_bluetooth_bluedroid-87564f3972ffbb4106682f7b6e88110fbe76004f.tar.bz2 |
Move build configuration files to output directory
Build configuration files (buildcfg.h and vnd_buildcfg.h) are now
automatically generated on demand in the intermediate output
directories for each platform.
In addition, buth buildcfg.h and vnd_buildcfg.h files are
now generated using a common script.
Change-Id: I3580701f32f1993750588d15bd529c6ee337031b
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/gen-buildcfg.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/gen-buildcfg.sh b/tools/gen-buildcfg.sh new file mode 100755 index 0000000..a09cb20 --- /dev/null +++ b/tools/gen-buildcfg.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +if [[ "" == "$2" ]] +then + echo "Usage: $0 <in-file> <out-file>" + exit 1 +fi + +if [ ! -f "$1" ] +then + echo "Error: Can't find input file $1..." + exit 2 +fi + +DATE=`/usr/bin/env date` +BASE=`basename $2` +BASE=`echo ${BASE} | tr "[:lower:]" "[:upper:]"` +BASE=`echo ${BASE} | sed -e "s/\\./_/"` +PROTECT="_${BASE}" + +echo "/* Auto-generated from $1 on ${DATE} */" > $2 +echo "#ifndef ${PROTECT}" >> $2 +echo "#define ${PROTECT}" >> $2 +sed -e '/^#/d' -e '/^$$/d' -e '/# Makefile only$$/d' -e 's/^/#define /' -e 's/=/ /' $1 >> $2 +echo "#endif" >> $2 + |