summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Johnson <zachoverflow@google.com>2015-02-27 14:08:41 -0800
committerAndre Eisenbach <eisenbach@google.com>2015-03-16 11:32:42 -0700
commit5919915749ec4d5f9cb642a391f2e9aee12b055b (patch)
tree5734bd7ff8f00fd754ef30bc17f37797d49b68df
parent09a38efcfe66d8d9e317d80748c0a3856b739754 (diff)
downloadandroid_hardware_broadcom_libbt-5919915749ec4d5f9cb642a391f2e9aee12b055b.tar.gz
android_hardware_broadcom_libbt-5919915749ec4d5f9cb642a391f2e9aee12b055b.tar.bz2
android_hardware_broadcom_libbt-5919915749ec4d5f9cb642a391f2e9aee12b055b.zip
Move gen-buildcfg.sh into libbt so there isn't project cross-reference
Also make a bunch of file not executable Change-Id: Id6d4fd5354c859121290b94b023c3a4aea263c17
-rwxr-xr-xgen-buildcfg.sh25
-rw-r--r--[-rwxr-xr-x]include/bt_vendor_brcm.h0
-rw-r--r--[-rwxr-xr-x]include/vnd_grouper.txt0
-rw-r--r--[-rwxr-xr-x]include/vnd_hammerhead.txt0
-rw-r--r--[-rwxr-xr-x]include/vnd_stingray.txt0
-rw-r--r--[-rwxr-xr-x]include/vnd_tilapia.txt0
-rw-r--r--[-rwxr-xr-x]include/vnd_wingray.txt0
-rw-r--r--vnd_buildcfg.mk2
8 files changed, 26 insertions, 1 deletions
diff --git a/gen-buildcfg.sh b/gen-buildcfg.sh
new file mode 100755
index 0000000..40c01f4
--- /dev/null
+++ b/gen-buildcfg.sh
@@ -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
diff --git a/include/bt_vendor_brcm.h b/include/bt_vendor_brcm.h
index 86254ff..86254ff 100755..100644
--- a/include/bt_vendor_brcm.h
+++ b/include/bt_vendor_brcm.h
diff --git a/include/vnd_grouper.txt b/include/vnd_grouper.txt
index 3e4d71c..3e4d71c 100755..100644
--- a/include/vnd_grouper.txt
+++ b/include/vnd_grouper.txt
diff --git a/include/vnd_hammerhead.txt b/include/vnd_hammerhead.txt
index 20013e9..20013e9 100755..100644
--- a/include/vnd_hammerhead.txt
+++ b/include/vnd_hammerhead.txt
diff --git a/include/vnd_stingray.txt b/include/vnd_stingray.txt
index f5eb1d0..f5eb1d0 100755..100644
--- a/include/vnd_stingray.txt
+++ b/include/vnd_stingray.txt
diff --git a/include/vnd_tilapia.txt b/include/vnd_tilapia.txt
index 3e4d71c..3e4d71c 100755..100644
--- a/include/vnd_tilapia.txt
+++ b/include/vnd_tilapia.txt
diff --git a/include/vnd_wingray.txt b/include/vnd_wingray.txt
index f5eb1d0..f5eb1d0 100755..100644
--- a/include/vnd_wingray.txt
+++ b/include/vnd_wingray.txt
diff --git a/vnd_buildcfg.mk b/vnd_buildcfg.mk
index ad61a4c..42349ba 100644
--- a/vnd_buildcfg.mk
+++ b/vnd_buildcfg.mk
@@ -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) $< $@