This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git
The following commit(s) were added to refs/heads/master by this push:
new afc7adf builder: Add package names to the environment variables
afc7adf is described below
commit afc7adf179442b92709e95bdbad82d033bccd8e2
Author: Casper Meijn <[email protected]>
AuthorDate: Fri Oct 30 14:17:33 2020 +0100
builder: Add package names to the environment variables
---
newt/builder/buildutil.go | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/newt/builder/buildutil.go b/newt/builder/buildutil.go
index 7bc83f6..599cec3 100644
--- a/newt/builder/buildutil.go
+++ b/newt/builder/buildutil.go
@@ -321,5 +321,12 @@ func (b *Builder) EnvVars(imageSlot int)
(map[string]string, error) {
env["MYNEWT_INCLUDE_PATH"] = strings.Join(b.compilerInfo.Includes, ":")
env["MYNEWT_CFLAGS"] = strings.Join(b.compilerInfo.Cflags, " ")
+ pkgNames := []string{}
+ for _, p := range b.PkgMap {
+ pkgNames = append(pkgNames, p.rpkg.Lpkg.FullName())
+ }
+ sort.Strings(pkgNames)
+ env["MYNEWT_PACKAGES"] = strings.Join(pkgNames, ":")
+
return env, nil
}