Repository: lucy
Updated Branches:
  refs/heads/go_bindings_1 [created] b24c5c963


Prep charmonizer for Go bindings.

*   Add a `static` target.
*   Add `--enable-go` switch.
*   Use the C host src dir for now.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/1b065744
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/1b065744
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/1b065744

Branch: refs/heads/go_bindings_1
Commit: 1b065744eb50879bd18ee3cb6823767f5200d9b9
Parents: 2fdf429
Author: Marvin Humphrey <[email protected]>
Authored: Sun Nov 16 16:36:14 2014 -0800
Committer: Marvin Humphrey <[email protected]>
Committed: Sun Nov 16 16:36:14 2014 -0800

----------------------------------------------------------------------
 common/charmonizer.main | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/1b065744/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/common/charmonizer.main b/common/charmonizer.main
index 7a6e66a..1e4b434 100644
--- a/common/charmonizer.main
+++ b/common/charmonizer.main
@@ -112,6 +112,8 @@ int main(int argc, const char **argv) {
     chaz_CLI_register(cli, "clownfish-prefix",
                       "prefix of Clownfish installation",
                       CHAZ_CLI_ARG_OPTIONAL);
+    chaz_CLI_register(cli, "enable-go", "enable Go bindings",
+                      CHAZ_CLI_NO_ARG);
     chaz_CLI_set_usage(cli, "Usage: charmonizer [OPTIONS] [-- [CFLAGS]]");
     if (!chaz_Probe_parse_cli_args(argc, argv, cli)) {
         chaz_Probe_die_usage();
@@ -240,6 +242,9 @@ lucy_MakeFile_new(chaz_CLI *cli) {
     if (chaz_CLI_defined(cli, "enable-perl")) {
         self->host_src_dir = "xs";
     }
+       else if (chaz_CLI_defined(cli, "enable-go")) {
+        self->host_src_dir = "../c/src";
+       }
     else {
         self->host_src_dir = "src";
     }
@@ -424,6 +429,8 @@ lucy_MakeFile_write(lucy_MakeFile *self) {
     chaz_MakeFile_add_rule(self->makefile, "all", scratch);
     free(scratch);
 
+    chaz_MakeFile_add_rule(self->makefile, "static", 
self->static_lib_filename);
+
     chaz_MakeFile_add_lemon_exe(self->makefile, self->lemon_dir);
     chaz_MakeFile_add_lemon_grammar(self->makefile, self->json_parser);
 

Reply via email to