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 /include | |
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 'include')
-rw-r--r-- | include/buildcfg.mk | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/include/buildcfg.mk b/include/buildcfg.mk index 8d53748..1623c95 100644 --- a/include/buildcfg.mk +++ b/include/buildcfg.mk @@ -1,13 +1,12 @@ -#bt_targetfile = $(TARGET_DEVICE_DIR)/$(addprefix bdroid_, $(addsuffix .txt,$(basename $(TARGET_DEVICE)))) -bt_targetfile = $(call my-dir)/$(addprefix bdroid_, $(addsuffix .txt,$(basename $(TARGET_DEVICE)))) -bt_cfgfile = $(call my-dir)/buildcfg.h +intermediates := $(local-intermediates-dir) -bt_build_cfg = $(shell if [ -f $(bt_cfgfile) ] && [ `stat -c %Y $(bt_targetfile)` -lt `stat -c %Y $(bt_cfgfile)` ]; then echo 0; else echo 1; fi) +SRC := $(call my-dir)/$(addprefix bdroid_, $(addsuffix .txt,$(basename $(TARGET_DEVICE)))) +GEN := $(intermediates)/buildcfg.h +TOOL := $(call my-dir)/../tools/gen-buildcfg.sh -ifeq ($(bt_build_cfg),1) -$(info "Creating $(bt_cfgfile) from $(bt_targetfile)") -$(shell echo "#ifndef BUILDCFG_H" > $(bt_cfgfile)) -$(shell echo "#define BUILDCFG_H" >> $(bt_cfgfile)) -$(shell sed -e '/^#/d' -e '/^$$/d' -e '/# Makefile only$$/d' -e 's/^/#define /' -e 's/=/ /' $(bt_targetfile) >> $(bt_cfgfile)) -$(shell echo "#endif" >> $(bt_cfgfile)) -endif +$(GEN): PRIVATE_PATH := $(call my-dir) +$(GEN): PRIVATE_CUSTOM_TOOL = $(TOOL) $< $@ +$(GEN): $(SRC) $(TOOL) + $(transform-generated-source) + +LOCAL_GENERATED_SOURCES += $(GEN) |