Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
build
Commits
3d484752
Commit
3d484752
authored
9 years ago
by
Keun Soo Yim
Browse files
Options
Download
Email Patches
Plain Diff
build rule change for VTS (vendor test suite)'s metadata files
Change-Id: I76b81529a97b672e08632703d2f6a2777ee8811e
parent
b5658074
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
3 deletions
+81
-3
core/binary.mk
core/binary.mk
+33
-1
core/clear_vars.mk
core/clear_vars.mk
+2
-0
core/config.mk
core/config.mk
+1
-0
core/definitions.mk
core/definitions.mk
+43
-0
envsetup.sh
envsetup.sh
+2
-2
No files found.
core/binary.mk
View file @
3d484752
...
@@ -790,6 +790,38 @@ my_generated_sources += $(aidl_gen_cpp)
...
@@ -790,6 +790,38 @@ my_generated_sources += $(aidl_gen_cpp)
endif
# $(aidl_src) non-empty
endif
# $(aidl_src) non-empty
###########################################################
## Compile the .vts files to .cc (or .c) and then to .o
###########################################################
vts_src
:=
$(
strip
$(
filter
%.vts,
$(my_src_files)
))
vts_gen_cpp
:=
ifneq
($(vts_src),)
# Use the intermediates directory to avoid writing our own .cpp -> .o rules.
vts_gen_cpp_root
:=
$(intermediates)
/vts-generated/src
vts_gen_include_root
:=
$(intermediates)
/vts-generated/include
# Multi-architecture builds have distinct intermediates directories.
# Thus we'll actually generate source for each architecture.
$(foreach
s,$(vts_src),\
$(eval
$(call
define-vts-cpp-rule,$(s),$(vts_gen_cpp_root),vts_gen_cpp)))
$(foreach
cpp,$(vts_gen_cpp),
\
$(call
include-depfile,$(addsuffix
.vts.P,$(basename
$(cpp))),$(cpp)))
$(call
track-src-file-gen,$(vts_src),$(vts_gen_cpp))
$(vts_gen_cpp)
:
PRIVATE_MODULE := $(LOCAL_MODULE)
$(vts_gen_cpp)
:
PRIVATE_HEADER_OUTPUT_DIR := $(vts_gen_include_root)
$(vts_gen_cpp)
:
PRIVATE_VTS_FLAGS := $(addprefix -I
,
$(LOCAL_VTS_INCLUDES))
# Add generated headers to include paths.
my_c_includes
+=
$(vts_gen_include_root)
my_export_c_include_dirs
+=
$(vts_gen_include_root)
# Pick up the generated C++ files later for transformation to .o files.
my_generated_sources
+=
$(vts_gen_cpp)
endif
# $(vts_src) non-empty
###########################################################
###########################################################
## YACC: Compile .y/.yy files to .c/.cpp and then to .o.
## YACC: Compile .y/.yy files to .c/.cpp and then to .o.
###########################################################
###########################################################
...
@@ -1392,7 +1424,7 @@ $(export_includes): PRIVATE_EXPORT_C_INCLUDE_DIRS := $(my_export_c_include_dirs)
...
@@ -1392,7 +1424,7 @@ $(export_includes): PRIVATE_EXPORT_C_INCLUDE_DIRS := $(my_export_c_include_dirs)
# Similarly, the generated DBus headers need to exist before we export their location.
# Similarly, the generated DBus headers need to exist before we export their location.
# People are not going to consume the aidl generated cpp file, but the cpp file is
# People are not going to consume the aidl generated cpp file, but the cpp file is
# generated after the headers, so this is a convenient way to ensure the headers exist.
# generated after the headers, so this is a convenient way to ensure the headers exist.
$(export_includes)
:
$(LOCAL_MODULE_MAKEFILE_DEP) $(proto_generated_headers) $(dbus_generated_headers) $(aidl_gen_cpp)
$(export_includes)
:
$(LOCAL_MODULE_MAKEFILE_DEP) $(proto_generated_headers) $(dbus_generated_headers) $(aidl_gen_cpp)
$(vts_gen_cpp)
@
echo
Export includes file:
$<
--
$@
@
echo
Export includes file:
$<
--
$@
$(hide)
mkdir
-p
$(
dir
$@
)
&&
rm
-f
$@
.tmp
$(hide)
mkdir
-p
$(
dir
$@
)
&&
rm
-f
$@
.tmp
ifdef
my_export_c_include_dirs
ifdef
my_export_c_include_dirs
...
...
This diff is collapsed.
Click to expand it.
core/clear_vars.mk
View file @
3d484752
...
@@ -105,6 +105,7 @@ LOCAL_APK_LIBRARIES:=
...
@@ -105,6 +105,7 @@ LOCAL_APK_LIBRARIES:=
LOCAL_RES_LIBRARIES
:=
LOCAL_RES_LIBRARIES
:=
LOCAL_MANIFEST_INSTRUMENTATION_FOR
:=
LOCAL_MANIFEST_INSTRUMENTATION_FOR
:=
LOCAL_AIDL_INCLUDES
:=
LOCAL_AIDL_INCLUDES
:=
LOCAL_VTS_INCLUDES
:=
LOCAL_JARJAR_RULES
:=
LOCAL_JARJAR_RULES
:=
LOCAL_ADDITIONAL_JAVA_DIR
:=
LOCAL_ADDITIONAL_JAVA_DIR
:=
LOCAL_ALLOW_UNDEFINED_SYMBOLS
:=
LOCAL_ALLOW_UNDEFINED_SYMBOLS
:=
...
@@ -142,6 +143,7 @@ LOCAL_DEX_PREOPT_FLAGS:=
...
@@ -142,6 +143,7 @@ LOCAL_DEX_PREOPT_FLAGS:=
LOCAL_PROTOC_OPTIMIZE_TYPE
:=
# lite
(
default
)
,micro,nano,full,nanopb-c,nanopb-c-enable_malloc
LOCAL_PROTOC_OPTIMIZE_TYPE
:=
# lite
(
default
)
,micro,nano,full,nanopb-c,nanopb-c-enable_malloc
LOCAL_PROTOC_FLAGS
:=
LOCAL_PROTOC_FLAGS
:=
LOCAL_PROTO_JAVA_OUTPUT_PARAMS
:=
LOCAL_PROTO_JAVA_OUTPUT_PARAMS
:=
LOCAL_VTSC_FLAGS
:=
LOCAL_NO_CRT
:=
LOCAL_NO_CRT
:=
LOCAL_NO_LIBGCC
:=
LOCAL_NO_LIBGCC
:=
LOCAL_PROPRIETARY_MODULE
:=
LOCAL_PROPRIETARY_MODULE
:=
...
...
This diff is collapsed.
Click to expand it.
core/config.mk
View file @
3d484752
...
@@ -519,6 +519,7 @@ else
...
@@ -519,6 +519,7 @@ else
BREAKPAD_GENERATE_SYMBOLS
:=
false
BREAKPAD_GENERATE_SYMBOLS
:=
false
endif
endif
PROTOC
:=
$(HOST_OUT_EXECUTABLES)
/aprotoc
$(HOST_EXECUTABLE_SUFFIX)
PROTOC
:=
$(HOST_OUT_EXECUTABLES)
/aprotoc
$(HOST_EXECUTABLE_SUFFIX)
VTSC
:=
$(HOST_OUT_EXECUTABLES)
/vtsc
$(HOST_EXECUTABLE_SUFFIX)
DBUS_GENERATOR
:=
$(HOST_OUT_EXECUTABLES)
/dbus-binding-generator
DBUS_GENERATOR
:=
$(HOST_OUT_EXECUTABLES)
/dbus-binding-generator
MKBOOTFS
:=
$(HOST_OUT_EXECUTABLES)
/mkbootfs
$(HOST_EXECUTABLE_SUFFIX)
MKBOOTFS
:=
$(HOST_OUT_EXECUTABLES)
/mkbootfs
$(HOST_EXECUTABLE_SUFFIX)
MINIGZIP
:=
$(HOST_OUT_EXECUTABLES)
/minigzip
$(HOST_EXECUTABLE_SUFFIX)
MINIGZIP
:=
$(HOST_OUT_EXECUTABLES)
/minigzip
$(HOST_EXECUTABLE_SUFFIX)
...
...
This diff is collapsed.
Click to expand it.
core/definitions.mk
View file @
3d484752
...
@@ -319,6 +319,24 @@ define all-subdir-Iaidl-files
...
@@ -319,6 +319,24 @@ define all-subdir-Iaidl-files
$(call
all-Iaidl-files-under,.)
$(call
all-Iaidl-files-under,.)
endef
endef
###########################################################
## Find all files named "*.vts" under the named directories,
## which must be relative to $(LOCAL_PATH). The returned list
## is relative to $(LOCAL_PATH).
###########################################################
define
all-vts-files-under
$(call
all-named-files-under,*.vts,$(1))
endef
###########################################################
## Find all of the "*.vts" files under $(LOCAL_PATH).
###########################################################
define
all-subdir-vts-files
$(call
all-vts-files-under,.)
endef
###########################################################
###########################################################
## Find all of the logtags files under the named directories.
## Find all of the logtags files under the named directories.
## Meant to be used like:
## Meant to be used like:
...
@@ -1086,6 +1104,31 @@ $$(define-aidl-cpp-rule-src) : $(LOCAL_PATH)/$(1) $(AIDL_CPP)
...
@@ -1086,6 +1104,31 @@ $$(define-aidl-cpp-rule-src) : $(LOCAL_PATH)/$(1) $(AIDL_CPP)
$(3)
+=
$$
(
define-aidl-cpp-rule-src
)
$(3)
+=
$$
(
define-aidl-cpp-rule-src
)
endef
endef
###########################################################
## Commands for running vts
###########################################################
define
transform-vts-to-cpp
@mkdir
-p
$(dir
$@)
@mkdir
-p
$(PRIVATE_HEADER_OUTPUT_DIR)
@echo "Generating C++ from VTS
:
$(PRIVATE_MODULE) <= $<"
$(hide)
$(VTSC)
-d$(basename
$@).vts.P
$(PRIVATE_VTS_FLAGS)
\
$<
$(PRIVATE_HEADER_OUTPUT_DIR)
$@
endef
## Given a .vts file path generate the rule to compile it a .cpp file.
# $(1): a .vts source file
# $(2): a directory to place the generated .cpp files in
# $(3): name of a variable to add the path to the generated source file to
#
# You must call this with $(eval).
define
define-vts-cpp-rule
define-vts-cpp-rule-src
:=
$(
patsubst
%.vts,%
$(LOCAL_CPP_EXTENSION)
,
$(
subst
../,dotdot/,
$(
addprefix
$(2)
/,
$(1)
)))
$$(define-vts-cpp-rule-src)
:
$(LOCAL_PATH)/$(1) $(VTSC)
$$
(
transform-vts-to-cpp
)
$(3)
+=
$$
(
define-vts-cpp-rule-src
)
endef
###########################################################
###########################################################
## Commands for running java-event-log-tags.py
## Commands for running java-event-log-tags.py
###########################################################
###########################################################
...
...
This diff is collapsed.
Click to expand it.
envsetup.sh
View file @
3d484752
...
@@ -1132,7 +1132,7 @@ case `uname -s` in
...
@@ -1132,7 +1132,7 @@ case `uname -s` in
Darwin
)
Darwin
)
function
sgrep
()
function
sgrep
()
{
{
find
-E
.
-name
.repo
-prune
-o
-name
.git
-prune
-o
-type
f
-iregex
'.*\.(c|h|cc|cpp|S|java|xml|sh|mk|aidl)'
\
find
-E
.
-name
.repo
-prune
-o
-name
.git
-prune
-o
-type
f
-iregex
'.*\.(c|h|cc|cpp|S|java|xml|sh|mk|aidl
|vts
)'
\
-exec
grep
--color
-n
"
$@
"
{}
+
-exec
grep
--color
-n
"
$@
"
{}
+
}
}
...
@@ -1140,7 +1140,7 @@ case `uname -s` in
...
@@ -1140,7 +1140,7 @@ case `uname -s` in
*
)
*
)
function
sgrep
()
function
sgrep
()
{
{
find
.
-name
.repo
-prune
-o
-name
.git
-prune
-o
-type
f
-iregex
'.*\.\(c\|h\|cc\|cpp\|S\|java\|xml\|sh\|mk\|aidl\)'
\
find
.
-name
.repo
-prune
-o
-name
.git
-prune
-o
-type
f
-iregex
'.*\.\(c\|h\|cc\|cpp\|S\|java\|xml\|sh\|mk\|aidl\
|vts\
)'
\
-exec
grep
--color
-n
"
$@
"
{}
+
-exec
grep
--color
-n
"
$@
"
{}
+
}
}
;;
;;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment