Repository: lucy Updated Branches: refs/heads/master 45c870ba2 -> cd34d6b8d
Adapt build.go for autogen changes. Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/bab3e458 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/bab3e458 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/bab3e458 Branch: refs/heads/master Commit: bab3e4581abb76a806c81b7e35b27a9e023f8be5 Parents: 9330b14 Author: Marvin Humphrey <[email protected]> Authored: Thu Apr 9 20:18:14 2015 -0700 Committer: Marvin Humphrey <[email protected]> Committed: Sat May 2 06:59:38 2015 -0700 ---------------------------------------------------------------------- go/build.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/bab3e458/go/build.go ---------------------------------------------------------------------- diff --git a/go/build.go b/go/build.go index 6f1607e..96ac2e5 100644 --- a/go/build.go +++ b/go/build.go @@ -37,6 +37,7 @@ var buildDir string var hostSrcDir string var buildGO string var configGO string +var cfbindGO string var installedLibPath string func init() { @@ -44,6 +45,7 @@ func init() { buildDir = path.Dir(buildGO) hostSrcDir = path.Join(buildDir, "../c/src") configGO = path.Join(buildDir, "lucy", "config.go") + cfbindGO = path.Join(buildDir, "lucy", "cfbind.go") var err error installedLibPath, err = cfc.InstalledLibPath(packageName) if err != nil { @@ -117,13 +119,17 @@ func runCFC() { hierarchy := cfc.NewHierarchy("autogen") hierarchy.AddSourceDir("../core") hierarchy.Build() - autogenHeader := "Auto-generated by build.go." + autogenHeader := "Auto-generated by build.go.\n" coreBinding := cfc.NewBindCore(hierarchy, autogenHeader, "") modified := coreBinding.WriteAllModified(false) if modified { - cBinding := cfc.NewBindC(hierarchy, autogenHeader, "") - cBinding.WriteCallbacks() - cBinding.WriteHostDefs() + cfc.RegisterParcelPackage("Clownfish", cfPackageName) + goBinding := cfc.NewBindGo(hierarchy) + goBinding.SetHeader(autogenHeader) + goBinding.SetSuppressInit(true) + parcel := cfc.FetchParcel("Lucy") + packageDir := path.Join(buildDir, "lucy") + goBinding.WriteBindings(parcel, packageDir) hierarchy.WriteLog() } } @@ -208,7 +214,7 @@ func clean() { if _, err := os.Stat("Makefile"); !os.IsNotExist(err) { runCommand("make", "clean") } - files := []string{charmonizerEXE, "charmony.h", "Makefile", configGO} + files := []string{charmonizerEXE, "charmony.h", "Makefile", configGO, cfbindGO} for _, file := range files { err := os.Remove(file) if err == nil {
