You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2014/11/30 06:09:02 UTC

[05/20] lucy-clownfish git commit: Separate executable from common test objects.

Separate executable from common test objects.


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

Branch: refs/heads/go_bindings_2
Commit: f013755b6008750e03ed60a4de8b022a5fedeb64
Parents: 95c7e8a
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Sat Nov 29 12:29:27 2014 -0800
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Sat Nov 29 14:07:54 2014 -0800

----------------------------------------------------------------------
 compiler/common/charmonizer.main | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f013755b/compiler/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/compiler/common/charmonizer.main b/compiler/common/charmonizer.main
index 9111e2f..5df4536 100644
--- a/compiler/common/charmonizer.main
+++ b/compiler/common/charmonizer.main
@@ -26,6 +26,7 @@
 typedef struct SourceFileContext {
     chaz_MakeVar *common_objs;
     chaz_MakeVar *test_cfc_objs;
+    chaz_MakeVar *common_test_objs;
 } SourceFileContext;
 
 static void
@@ -181,6 +182,7 @@ S_write_makefile(struct chaz_CLI *cli) {
 
     sfc.common_objs   = chaz_MakeFile_add_var(makefile, "COMMON_OBJS", NULL);
     sfc.test_cfc_objs = chaz_MakeFile_add_var(makefile, "TEST_CFC_OBJS", NULL);
+    sfc.common_test_objs = chaz_MakeFile_add_var(makefile, "COMMON_TEST_OBJS", NULL);
 
     chaz_Make_list_files(src_dir, "c", S_source_file_callback, &sfc);
 
@@ -221,7 +223,8 @@ S_write_makefile(struct chaz_CLI *cli) {
     chaz_MakeFile_add_exe(makefile, cfc_exe, "$(COMMON_OBJS) $(CFC_OBJS)",
                           link_flags);
     chaz_MakeFile_add_exe(makefile, test_cfc_exe,
-                          "$(COMMON_OBJS) $(TEST_CFC_OBJS)", link_flags);
+                          "$(COMMON_OBJS) $(COMMON_TEST_OBJS) $(TEST_CFC_OBJS)",
+                          link_flags);
     chaz_CFlags_destroy(link_flags);
 
     rule = chaz_MakeFile_add_rule(makefile, "test", test_cfc_exe);
@@ -251,6 +254,7 @@ S_write_makefile(struct chaz_CLI *cli) {
     clean_rule = chaz_MakeFile_clean_rule(makefile);
 
     chaz_MakeRule_add_rm_command(clean_rule, "$(COMMON_OBJS)");
+    chaz_MakeRule_add_rm_command(clean_rule, "$(COMMON_TEST_OBJS)");
     chaz_MakeRule_add_rm_command(clean_rule, "$(CFC_OBJS)");
     chaz_MakeRule_add_rm_command(clean_rule, "$(TEST_CFC_OBJS)");
 
@@ -293,7 +297,7 @@ S_source_file_callback(const char *dir, char *file, void *context) {
 
     obj_file = chaz_Util_join("", dir, dir_sep, file, obj_ext, NULL);
     if (strlen(file) >= 7 && memcmp(file, "CFCTest", 7) == 0) {
-        chaz_MakeVar_append(sfc->test_cfc_objs, obj_file);
+        chaz_MakeVar_append(sfc->common_test_objs, obj_file);
     }
     else {
         chaz_MakeVar_append(sfc->common_objs, obj_file);