lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] git commit: refs/heads/master - Use cfc logfile as make target
Date Sun, 09 Mar 2014 12:04:43 GMT
Repository: lucy
Updated Branches:
  refs/heads/master bf886c763 -> 8783b9ec2


Use cfc logfile as make target

This makes dependency checks more reliable. Requires the latest
Clownfish version from Git.


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

Branch: refs/heads/master
Commit: 8783b9ec2a5cd25401bff79091133350afec3baa
Parents: bf886c7
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sun Mar 9 13:02:03 2014 +0100
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Sun Mar 9 13:02:03 2014 +0100

----------------------------------------------------------------------
 common/charmonizer.c    | 19 +++++++------------
 common/charmonizer.main | 19 +++++++------------
 2 files changed, 14 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/8783b9ec/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/common/charmonizer.c b/common/charmonizer.c
index eb23236..ceec4cf 100644
--- a/common/charmonizer.c
+++ b/common/charmonizer.c
@@ -7168,6 +7168,8 @@ S_write_makefile(struct chaz_CLIArgs *chaz_args,
 
     char *autogen_inc_dir
         = chaz_Util_join(dir_sep, "autogen", "include", NULL);
+    char *autogen_target
+        = chaz_Util_join(dir_sep, "autogen", "hierarchy.json", NULL);
     char *snowstem_inc_dir
         = chaz_Util_join(dir_sep, snowstem_dir, "include", NULL);
 
@@ -7265,7 +7267,7 @@ S_write_makefile(struct chaz_CLIArgs *chaz_args,
     chaz_MakeFile_add_lemon_exe(makefile, lemon_dir);
     chaz_MakeFile_add_lemon_grammar(makefile, json_parser);
 
-    rule = chaz_MakeFile_add_rule(makefile, "autogen", NULL);
+    rule = chaz_MakeFile_add_rule(makefile, autogen_target, NULL);
     chaz_MakeRule_add_prereq(rule, "$(CLOWNFISH_HEADERS)");
     if (cfish_prefix == NULL) {
         scratch = chaz_Util_join("", "cfc --source=", core_dir,
@@ -7279,27 +7281,19 @@ S_write_makefile(struct chaz_CLIArgs *chaz_args,
                                  " --dest=autogen --header=cfc_header", NULL);
     }
     chaz_MakeRule_add_command(rule, scratch);
-    /*
-     * TODO
-     * - Only touch autogen if cfc succeeds.
-     * - Find a way to touch the autogen directory on Windows.
-     */
-    if (chaz_Make_shell_type() == CHAZ_OS_POSIX) {
-        chaz_MakeRule_add_command(rule, "touch autogen");
-    }
     free(scratch);
 
     /* Needed for parallel builds. */
     scratch = chaz_Util_join(dir_sep, "autogen", "source", "lucy_parcel.c",
                              NULL);
-    rule = chaz_MakeFile_add_rule(makefile, scratch, "autogen");
+    rule = chaz_MakeFile_add_rule(makefile, scratch, autogen_target);
     free(scratch);
     scratch = chaz_Util_join(dir_sep, "autogen", "source", "testlucy_parcel.c",
                              NULL);
-    rule = chaz_MakeFile_add_rule(makefile, scratch, "autogen");
+    rule = chaz_MakeFile_add_rule(makefile, scratch, autogen_target);
     free(scratch);
 
-    rule = chaz_MakeFile_add_rule(makefile, "$(LUCY_OBJS)", "autogen");
+    rule = chaz_MakeFile_add_rule(makefile, "$(LUCY_OBJS)", autogen_target);
     /*
      * The dependency is actually on JsonParser.h, but make doesn't cope
      * well with multiple output files.
@@ -7425,6 +7419,7 @@ S_write_makefile(struct chaz_CLIArgs *chaz_args,
     free(json_parser);
     free(test_lucy_exe);
     free(autogen_inc_dir);
+    free(autogen_target);
     free(snowstem_inc_dir);
     free(cfish_lib);
     free(lib_filename);

http://git-wip-us.apache.org/repos/asf/lucy/blob/8783b9ec/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/common/charmonizer.main b/common/charmonizer.main
index e5e0334..b01d3d6 100644
--- a/common/charmonizer.main
+++ b/common/charmonizer.main
@@ -174,6 +174,8 @@ S_write_makefile(struct chaz_CLIArgs *chaz_args,
 
     char *autogen_inc_dir
         = chaz_Util_join(dir_sep, "autogen", "include", NULL);
+    char *autogen_target
+        = chaz_Util_join(dir_sep, "autogen", "hierarchy.json", NULL);
     char *snowstem_inc_dir
         = chaz_Util_join(dir_sep, snowstem_dir, "include", NULL);
 
@@ -271,7 +273,7 @@ S_write_makefile(struct chaz_CLIArgs *chaz_args,
     chaz_MakeFile_add_lemon_exe(makefile, lemon_dir);
     chaz_MakeFile_add_lemon_grammar(makefile, json_parser);
 
-    rule = chaz_MakeFile_add_rule(makefile, "autogen", NULL);
+    rule = chaz_MakeFile_add_rule(makefile, autogen_target, NULL);
     chaz_MakeRule_add_prereq(rule, "$(CLOWNFISH_HEADERS)");
     if (cfish_prefix == NULL) {
         scratch = chaz_Util_join("", "cfc --source=", core_dir,
@@ -285,27 +287,19 @@ S_write_makefile(struct chaz_CLIArgs *chaz_args,
                                  " --dest=autogen --header=cfc_header", NULL);
     }
     chaz_MakeRule_add_command(rule, scratch);
-    /*
-     * TODO
-     * - Only touch autogen if cfc succeeds.
-     * - Find a way to touch the autogen directory on Windows.
-     */
-    if (chaz_Make_shell_type() == CHAZ_OS_POSIX) {
-        chaz_MakeRule_add_command(rule, "touch autogen");
-    }
     free(scratch);
 
     /* Needed for parallel builds. */
     scratch = chaz_Util_join(dir_sep, "autogen", "source", "lucy_parcel.c",
                              NULL);
-    rule = chaz_MakeFile_add_rule(makefile, scratch, "autogen");
+    rule = chaz_MakeFile_add_rule(makefile, scratch, autogen_target);
     free(scratch);
     scratch = chaz_Util_join(dir_sep, "autogen", "source", "testlucy_parcel.c",
                              NULL);
-    rule = chaz_MakeFile_add_rule(makefile, scratch, "autogen");
+    rule = chaz_MakeFile_add_rule(makefile, scratch, autogen_target);
     free(scratch);
 
-    rule = chaz_MakeFile_add_rule(makefile, "$(LUCY_OBJS)", "autogen");
+    rule = chaz_MakeFile_add_rule(makefile, "$(LUCY_OBJS)", autogen_target);
     /*
      * The dependency is actually on JsonParser.h, but make doesn't cope
      * well with multiple output files.
@@ -431,6 +425,7 @@ S_write_makefile(struct chaz_CLIArgs *chaz_args,
     free(json_parser);
     free(test_lucy_exe);
     free(autogen_inc_dir);
+    free(autogen_target);
     free(snowstem_inc_dir);
     free(cfish_lib);
     free(lib_filename);


Mime
View raw message