diff options
author | Colin Cross <ccross@android.com> | 2014-01-24 23:17:21 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2014-01-27 14:45:44 -0800 |
commit | d826264621a2c3d27228b395bc36edf5510bcc49 (patch) | |
tree | 2a34d5b309dc375e831c5ddceb9e557ed93ac192 /core/build-system.html | |
parent | d0378b3f2dbb5a5ff0cf0517354606f3f808d790 (diff) | |
download | build-d826264621a2c3d27228b395bc36edf5510bcc49.zip build-d826264621a2c3d27228b395bc36edf5510bcc49.tar.gz build-d826264621a2c3d27228b395bc36edf5510bcc49.tar.bz2 |
add new gen/ directory for generated sources
Allow modules to generate source into $OUT/gen, which will then
be copied into $OUT/obj and $OUT/obj_$(TARGET_2ND_ARCH) as
necessary. This allows a single build rule invocation that includes
generated source to build for the first and second architectures.
Modules will need to change calls to local-intermediates-dir into
local-generated-sources-dir.
Change-Id: I62504bad9454b3d9fde7b84ab9f0a487a2ecf0bf
Diffstat (limited to 'core/build-system.html')
-rw-r--r-- | core/build-system.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/build-system.html b/core/build-system.html index 182580c..caade58 100644 --- a/core/build-system.html +++ b/core/build-system.html @@ -409,8 +409,8 @@ a couple of examples. <code>$@</code> is the make built-in variable for need to change.</p> <p>You need to put this after you have declared <code>LOCAL_PATH</code> and -<code>LOCAL_MODULE</code>, because the <code>$(local-intermediates-dir)</code> -and <code>$(local-host-intermediates-dir)</code> macros use these variables +<code>LOCAL_MODULE</code>, because the <code>$(local-generated-sources-dir)</code> +and <code>$(local-host-generated-sources-dir)</code> macros use these variables to determine where to put the files. <h5>Example 1</h5> @@ -419,7 +419,7 @@ chartables.c, which doesn't depend on anything. And is built by the tool built to $(HOST_OUT_EXECUTABLES)/dftables. Note on the second to last line that a dependency is created on the tool.</p> <pre> -intermediates:= $(local-intermediates-dir) +intermediates:= $(local-generated-sources-dir) GEN := $(intermediates)/<font color=red>chartables.c</font> $(GEN): PRIVATE_CUSTOM_TOOL = <font color=red>$(HOST_OUT_EXECUTABLES)/dftables $@</font> $(GEN): <font color=red>$(HOST_OUT_EXECUTABLES)/dftables</font> @@ -433,7 +433,7 @@ a file. Pretend that it does something useful. Note how we use a target-specific variable called PRIVATE_INPUT_FILE to store the name of the input file.</p> <pre> -intermediates:= $(local-intermediates-dir) +intermediates:= $(local-generated-sources-dir) GEN := $(intermediates)/<font color=red>file.c</font> $(GEN): PRIVATE_INPUT_FILE := $(LOCAL_PATH)/<font color=red>input.file</font> $(GEN): PRIVATE_CUSTOM_TOOL = <font color=red>cat $(PRIVATE_INPUT_FILE) > $@</font> @@ -447,7 +447,7 @@ LOCAL_GENERATED_SOURCES += $(GEN) name, and use the same tool, you can combine them. (here the *.lut.h files are the generated ones, and the *.cpp files are the input files)</p> <pre> -intermediates:= $(local-intermediates-dir) +intermediates:= $(local-generated-sources-dir) GEN := $(addprefix $(intermediates)<font color=red>/kjs/, \ array_object.lut.h \ bool_object.lut.h \</font> |