Allows specific features for agl-devel 93/9393/3
authorJosé Bollo <jose.bollo@iot.bzh>
Mon, 15 May 2017 13:52:25 +0000 (15:52 +0200)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Fri, 19 May 2017 10:39:24 +0000 (10:39 +0000)
Having features allowed only during developement
of AGL is a plus. This commit allows to add tests
within recipes to check if the current build is
AGL developement. If not the build is for production.
By default, extra feature must be off.

This commits doesn't add

  CPPFLAGS += "-DAGL_DEVEL"

to improve build time and cache space of yocto.

However, it is a good practice, when needed, to
use the tag AGL_DEVEL in C/C++ codes specific to
AGL and thus to include the line

  CPPFLAGS_append_agl-devel = " -DAGL_DEVEL"

in recipes specific to AGL.

AGL-Bug: SPEC-594

Change-Id: Ie967a4317886ee78304999f36de5db9de22568a7
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/9393
Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Reviewed-by: Stéphane Desneux <stephane.desneux@iot.bzh>
Reviewed-by: Changhyeok Bae <changhyeok.bae@lge.com>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
meta-agl/conf/include/agl-devel.inc
templates/feature/agl-devel/agl-devel.md [new file with mode: 0644]

index f4cba69..9610fd8 100644 (file)
@@ -7,3 +7,7 @@ IMAGE_INSTALL_append = " \
 # disable install of debug files in SDK
 # initial value: SDKIMAGE_FEATURES="dev-pkgs dbg-pkgs staticdev-pkgs"
 SDKIMAGE_FEATURES="dev-pkgs"
+
+# allows insertion of code or items specific to developement
+OVERRIDES .= ":agl-devel"
+DISTRO_FEATURES_append = " agl-devel"
diff --git a/templates/feature/agl-devel/agl-devel.md b/templates/feature/agl-devel/agl-devel.md
new file mode 100644 (file)
index 0000000..85a2b91
--- /dev/null
@@ -0,0 +1,40 @@
+The features of agl-devel
+=========================
+
+Activation of the agl-devel features turns on
+features needed for developping and debugging
+agl distribution.
+
+This includes:
+
+  - adding to images some useful packages
+
+  - adding to images the package group 'packagegroup-agl-devel'
+
+  - definition of a contionnal the tag 'agl-devel'
+    for conditionnal building
+
+  - definition of the distro feature 'agl-devel'
+
+  - adds packages for development in SDK
+
+
+How to use agl-devel in conditionnal builds ?
+---------------------------------------------
+
+The following example shows how to activate C/C++ code
+specific to agl-devel:
+
+       CPPFLAGS_append_agl-devel = " -DAGL_DEVEL"
+
+Using this, any code enclosed in
+
+       #ifdef AGL_DEVEL
+       ...my code specific to agl-devel...
+       #endif
+
+will normaly be effective only if agl-devel is set on.
+
+At this time, it is recommended to use AGL_DEVEL as tag
+within C/C++ code.
+