Repository: incubator-mynewt-newt
Updated Branches:
  refs/heads/develop 13be521ed -> 6d1c78a93


(MYNEWT-39) Collapse project/compiler yml -> pkg.yml


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/6d1c78a9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/6d1c78a9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/6d1c78a9

Branch: refs/heads/develop
Commit: 6d1c78a932a7da089fd0dc28b5d1c6615ad65a7d
Parents: 13be521
Author: Christopher Collins <ccollins47...@gmail.com>
Authored: Wed Feb 24 17:50:44 2016 -0800
Committer: Christopher Collins <ccollins47...@gmail.com>
Committed: Wed Feb 24 18:16:17 2016 -0800

----------------------------------------------------------------------
 newt/cli/compiler.go |  2 +-
 newt/cli/pkg.go      |  8 ++++++--
 newt/cli/project.go  | 14 +++++++-------
 3 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/6d1c78a9/newt/cli/compiler.go
----------------------------------------------------------------------
diff --git a/newt/cli/compiler.go b/newt/cli/compiler.go
index 31f999d..11555d1 100644
--- a/newt/cli/compiler.go
+++ b/newt/cli/compiler.go
@@ -85,7 +85,7 @@ func NewCompiler(ccPath string, cDef string, tName string, 
includes []string) (
 }
 
 func (c *Compiler) ReadSettings(cDef string) error {
-       v, err := ReadConfig(c.ConfigPath, "compiler")
+       v, err := ReadConfig(c.ConfigPath, "pkg")
        if err != nil {
                return err
        }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/6d1c78a9/newt/cli/pkg.go
----------------------------------------------------------------------
diff --git a/newt/cli/pkg.go b/newt/cli/pkg.go
index d968289..dea653f 100644
--- a/newt/cli/pkg.go
+++ b/newt/cli/pkg.go
@@ -51,19 +51,25 @@ type DependencyRequirement struct {
 type Pkg struct {
        // Base directory of the pkg
        BasePath string
+
        // Name of the pkg
        Name string
+
        // Full Name of the pkg include prefix dir
        FullName string
+
        // Repo this pkg belongs to
        Repo *Repo
+
        // Pkg version
        Version *Version
+
        // Type of pkg
        LinkerScript string
 
        // For BSP pkg, how to download
        DownloadScript string
+
        // For BSP pkg, how to start debugger and attach it to target board
        DebugScript string
 
@@ -73,8 +79,6 @@ type Pkg struct {
        // Has the configuration been loaded for this pkg
        CfgLoaded bool
 
-       // Pkg sources
-       Sources []string
        // Pkg include directories
        Includes []string
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/6d1c78a9/newt/cli/project.go
----------------------------------------------------------------------
diff --git a/newt/cli/project.go b/newt/cli/project.go
index 9213301..0839731 100644
--- a/newt/cli/project.go
+++ b/newt/cli/project.go
@@ -84,24 +84,24 @@ func (p *Project) loadConfig() error {
        log.Printf("[DEBUG] Reading Project configuration for %s in %s",
                p.Name, p.BasePath)
 
-       v, err := ReadConfig(p.BasePath, p.Name)
+       v, err := ReadConfig(p.BasePath, "pkg")
        if err != nil {
                return err
        }
 
        t := p.Target
 
-       p.Pkgs = GetStringSliceIdentities(v, t.Identities, "project.pkgs")
+       p.Pkgs = GetStringSliceIdentities(v, t.Identities, "pkg.deps")
 
-       idents := GetStringSliceIdentities(v, t.Identities, 
"project.identities")
+       idents := GetStringSliceIdentities(v, t.Identities, "pkg.identities")
        for _, ident := range idents {
                t.Identities[ident] = p.Name
        }
-       p.Capabilities = GetStringSliceIdentities(v, t.Identities, 
"project.caps")
+       p.Capabilities = GetStringSliceIdentities(v, t.Identities, "pkg.caps")
 
-       p.Cflags = GetStringIdentities(v, t.Identities, "project.cflags")
-       p.Lflags = GetStringIdentities(v, t.Identities, "project.lflags")
-       p.Aflags = GetStringIdentities(v, t.Identities, "project.aflags")
+       p.Cflags = GetStringIdentities(v, t.Identities, "pkg.cflags")
+       p.Lflags = GetStringIdentities(v, t.Identities, "pkg.lflags")
+       p.Aflags = GetStringIdentities(v, t.Identities, "pkg.aflags")
 
        return nil
 }

Reply via email to