Repository: lucy-clownfish Updated Branches: refs/heads/master 5646bf057 -> d0babb78c
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/b0042957 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/b0042957 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/b0042957 Branch: refs/heads/master Commit: b004295717ac976df0fa59b739651dfd19208f3b Parents: 5646bf0 Author: Marvin Humphrey <[email protected]> Authored: Sat Nov 29 12:29:27 2014 -0800 Committer: Marvin Humphrey <[email protected]> Committed: Mon Mar 2 18:28:29 2015 -0800 ---------------------------------------------------------------------- compiler/common/charmonizer.main | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/b0042957/compiler/common/charmonizer.main ---------------------------------------------------------------------- diff --git a/compiler/common/charmonizer.main b/compiler/common/charmonizer.main index 74ff7b6..9174d72 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 @@ -198,6 +199,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); chaz_Make_list_files(cmark_dir, "c", S_source_file_callback, &sfc); @@ -239,7 +241,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); @@ -269,6 +272,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)"); @@ -311,7 +315,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);
