You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2019/10/10 17:15:05 UTC

[mynewt-newt] 01/08: rename: post_build --> post_link

This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git

commit 39005b80a6a034244061898c1b610dd7e4e34a36
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Fri Oct 4 13:45:34 2019 -0700

    rename: post_build --> post_link
---
 newt/builder/cmake.go       |  2 +-
 newt/builder/extcmd.go      |  6 +++---
 newt/builder/targetbuild.go |  2 +-
 newt/pkg/localpackage.go    |  4 ++--
 newt/resolve/resolve.go     | 12 ++++++------
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/newt/builder/cmake.go b/newt/builder/cmake.go
index 031b628..a96ce23 100644
--- a/newt/builder/cmake.go
+++ b/newt/builder/cmake.go
@@ -314,7 +314,7 @@ func (t *TargetBuilder) CMakeTargetBuilderWrite(w io.Writer, targetCompiler *too
 
 	if len(t.res.PreBuildCmdCfg.StageFuncs) > 0 ||
 		len(t.res.PreLinkCmdCfg.StageFuncs) > 0 ||
-		len(t.res.PostBuildCmdCfg.StageFuncs) > 0 {
+		len(t.res.PostLinkCmdCfg.StageFuncs) > 0 {
 
 		util.OneTimeWarning(
 			"custom commands not included in cmake output (unsupported)")
diff --git a/newt/builder/extcmd.go b/newt/builder/extcmd.go
index 624a025..b8e7746 100644
--- a/newt/builder/extcmd.go
+++ b/newt/builder/extcmd.go
@@ -200,10 +200,10 @@ func (t *TargetBuilder) execPreLinkCmds(workDir string) error {
 	return nil
 }
 
-// execPostBuildCmds runs the target's set of post-build user commands.  It is
+// execPostLinkCmds runs the target's set of post-build user commands.  It is
 // an error if any command fails (exits with a nonzero status).
-func (t *TargetBuilder) execPostBuildCmds(workDir string) error {
-	for _, sf := range t.res.PostBuildCmdCfg.StageFuncs {
+func (t *TargetBuilder) execPostLinkCmds(workDir string) error {
+	for _, sf := range t.res.PostLinkCmdCfg.StageFuncs {
 		if err := t.execExtCmds(sf, "", "", workDir); err != nil {
 			return err
 		}
diff --git a/newt/builder/targetbuild.go b/newt/builder/targetbuild.go
index c5145a1..ba9728b 100644
--- a/newt/builder/targetbuild.go
+++ b/newt/builder/targetbuild.go
@@ -550,7 +550,7 @@ func (t *TargetBuilder) Build() error {
 	}
 
 	// Execute the set of post-build user scripts.
-	if err := t.execPostBuildCmds(workDir); err != nil {
+	if err := t.execPostLinkCmds(workDir); err != nil {
 		return err
 	}
 
diff --git a/newt/pkg/localpackage.go b/newt/pkg/localpackage.go
index d1f0088..bd48455 100644
--- a/newt/pkg/localpackage.go
+++ b/newt/pkg/localpackage.go
@@ -389,10 +389,10 @@ func (pkg *LocalPackage) PreLinkCmds(
 	return pkg.PkgY.GetValStringMapString("pkg.pre_link_cmds", settings)
 }
 
-func (pkg *LocalPackage) PostBuildCmds(
+func (pkg *LocalPackage) PostLinkCmds(
 	settings map[string]string) map[string]string {
 
-	return pkg.PkgY.GetValStringMapString("pkg.post_build_cmds", settings)
+	return pkg.PkgY.GetValStringMapString("pkg.post_link_cmds", settings)
 }
 
 func (pkg *LocalPackage) InjectedSettings() map[string]string {
diff --git a/newt/resolve/resolve.go b/newt/resolve/resolve.go
index 0cb6c98..11495ef 100644
--- a/newt/resolve/resolve.go
+++ b/newt/resolve/resolve.go
@@ -70,7 +70,7 @@ type Resolver struct {
 	sysdownCfg       sysdown.SysdownCfg
 	preBuildCmdCfg   extcmd.ExtCmdCfg
 	preLinkCmdCfg    extcmd.ExtCmdCfg
-	postBuildCmdCfg  extcmd.ExtCmdCfg
+	postLinkCmdCfg   extcmd.ExtCmdCfg
 
 	// [api-name][api-supplier]
 	apiConflicts map[string]map[*ResolvePackage]struct{}
@@ -125,7 +125,7 @@ type Resolution struct {
 	SysdownCfg      sysdown.SysdownCfg
 	PreBuildCmdCfg  extcmd.ExtCmdCfg
 	PreLinkCmdCfg   extcmd.ExtCmdCfg
-	PostBuildCmdCfg extcmd.ExtCmdCfg
+	PostLinkCmdCfg  extcmd.ExtCmdCfg
 	ApiMap          map[string]*ResolvePackage
 	UnsatisfiedApis map[string][]*ResolvePackage
 	ApiConflicts    []ApiConflict
@@ -1004,10 +1004,10 @@ func (r *Resolver) resolveDepsAndCfg() error {
 			settings map[string]string) map[string]string {
 			return lpkg.PreLinkCmds(settings)
 		})
-	r.postBuildCmdCfg = extcmd.Read("post_build_cmds", lpkgs, &r.cfg,
+	r.postLinkCmdCfg = extcmd.Read("post_link_cmds", lpkgs, &r.cfg,
 		func(lpkg *pkg.LocalPackage,
 			settings map[string]string) map[string]string {
-			return lpkg.PostBuildCmds(settings)
+			return lpkg.PostLinkCmds(settings)
 		})
 
 	// Log the final syscfg.
@@ -1110,7 +1110,7 @@ func ResolveFull(
 	res.SysdownCfg = r.sysdownCfg
 	res.PreBuildCmdCfg = r.preBuildCmdCfg
 	res.PreLinkCmdCfg = r.preLinkCmdCfg
-	res.PostBuildCmdCfg = r.postBuildCmdCfg
+	res.PostLinkCmdCfg = r.postLinkCmdCfg
 
 	// Determine which package satisfies each API and which APIs are
 	// unsatisfied.
@@ -1231,7 +1231,7 @@ func (res *Resolution) ErrorText() string {
 	str += res.SysdownCfg.ErrorText()
 	str += res.PreBuildCmdCfg.ErrorText()
 	str += res.PreLinkCmdCfg.ErrorText()
-	str += res.PostBuildCmdCfg.ErrorText()
+	str += res.PostLinkCmdCfg.ErrorText()
 
 	str = strings.TrimSpace(str)
 	if str != "" {