Move gen-buildcfg.sh into libbt so there isn't project cross-reference

Also make a bunch of file not executable

Change-Id: Id6d4fd5354c859121290b94b023c3a4aea263c17
This commit is contained in:
Zach Johnson
2015-02-27 14:08:41 -08:00
committed by Andre Eisenbach
parent 09a38efcfe
commit 5919915749
8 changed files with 26 additions and 1 deletions

25
gen-buildcfg.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/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

0
include/bt_vendor_brcm.h Executable file → Normal file
View File

0
include/vnd_grouper.txt Executable file → Normal file
View File

0
include/vnd_hammerhead.txt Executable file → Normal file
View File

0
include/vnd_stingray.txt Executable file → Normal file
View File

0
include/vnd_tilapia.txt Executable file → Normal file
View File

0
include/vnd_wingray.txt Executable file → Normal file
View File

View File

@@ -6,7 +6,7 @@ ifeq (,$(wildcard $(SRC)))
SRC := $(call my-dir)/include/vnd_generic.txt
endif
GEN := $(generated_sources)/vnd_buildcfg.h
TOOL := $(TOP_DIR)external/bluetooth/bluedroid/tools/gen-buildcfg.sh
TOOL := $(LOCAL_PATH)/gen-buildcfg.sh
$(GEN): PRIVATE_PATH := $(call my-dir)
$(GEN): PRIVATE_CUSTOM_TOOL = $(TOOL) $< $@