Regenerate charmonizer.c
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/ddf40422 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/ddf40422 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/ddf40422 Branch: refs/heads/chaz-cflags Commit: ddf40422181cbb500e8cc5e4e78cd065ced8a22e Parents: ed2c056 Author: Nick Wellnhofer <[email protected]> Authored: Wed Apr 3 22:37:39 2013 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Wed Apr 3 22:37:39 2013 +0200 ---------------------------------------------------------------------- clownfish/compiler/common/charmonizer.c | 40 +++++++------- clownfish/runtime/common/charmonizer.c | 40 +++++++------- common/charmonizer.c | 71 ++++++++++++------------- 3 files changed, 74 insertions(+), 77 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/ddf40422/clownfish/compiler/common/charmonizer.c ---------------------------------------------------------------------- diff --git a/clownfish/compiler/common/charmonizer.c b/clownfish/compiler/common/charmonizer.c index d7c412e..5beadea 100644 --- a/clownfish/compiler/common/charmonizer.c +++ b/clownfish/compiler/common/charmonizer.c @@ -494,24 +494,24 @@ chaz_MakeFile_add_dir_to_cleanup(chaz_MakeFile *makefile, const char *dir); * * @param makefile The makefile. * @param exe The name of the executable. - * @param objects The list of object files. - * @param library_flags Additional link flags for libraries. + * @param sources The list of source files. + * @param link_flags Additional link flags. */ chaz_MakeRule* chaz_MakeFile_add_exe(chaz_MakeFile *makefile, const char *exe, - const char *objects, chaz_CFlags *library_flags); + const char *sources, chaz_CFlags *link_flags); /** Add a rule to link a shared library. The shared library will also be added * to the list of files to clean. * * @param makefile The makefile. * @param shared_lib The name of the shared library. - * @param objects The list of object files. - * @param library_flags Additional link flags for libraries. + * @param sources The list of source files. + * @param link_flags Additional link flags. */ chaz_MakeRule* chaz_MakeFile_add_shared_lib(chaz_MakeFile *makefile, const char *shared_lib, - const char *objects, chaz_CFlags *library_flags); + const char *sources, chaz_CFlags *link_flags); /** Write the makefile to a file named 'Makefile' in the current directory. * @@ -3023,24 +3023,24 @@ chaz_MakeFile_add_dir_to_cleanup(chaz_MakeFile *makefile, const char *dir) { chaz_MakeRule* chaz_MakeFile_add_exe(chaz_MakeFile *makefile, const char *exe, - const char *objects, chaz_CFlags *library_flags) { + const char *sources, chaz_CFlags *link_flags) { int cflags_style = chaz_CC_get_cflags_style(); chaz_CFlags *local_flags = chaz_CFlags_new(cflags_style); const char *link = chaz_CC_link_command(); - const char *library_flags_string = ""; + const char *link_flags_string = ""; const char *local_flags_string; chaz_MakeRule *rule; char *command; - rule = chaz_MakeFile_add_rule(makefile, exe, objects); + rule = chaz_MakeFile_add_rule(makefile, exe, sources); - if (library_flags) { - library_flags_string = chaz_CFlags_get_string(library_flags); + if (link_flags) { + link_flags_string = chaz_CFlags_get_string(link_flags); } chaz_CFlags_set_link_output(local_flags, exe); local_flags_string = chaz_CFlags_get_string(local_flags); - command = chaz_Util_join(" ", link, local_flags_string, objects, - library_flags_string, NULL); + command = chaz_Util_join(" ", link, sources, link_flags_string, + local_flags_string, NULL); chaz_MakeRule_add_command(rule, command); chaz_MakeFile_add_to_cleanup(makefile, exe); @@ -3052,25 +3052,25 @@ chaz_MakeFile_add_exe(chaz_MakeFile *makefile, const char *exe, chaz_MakeRule* chaz_MakeFile_add_shared_lib(chaz_MakeFile *makefile, const char *shared_lib, - const char *objects, chaz_CFlags *library_flags) { + const char *sources, chaz_CFlags *link_flags) { int cflags_style = chaz_CC_get_cflags_style(); chaz_CFlags *local_flags = chaz_CFlags_new(cflags_style); const char *link = chaz_CC_link_command(); - const char *library_flags_string = ""; + const char *link_flags_string = ""; const char *local_flags_string; chaz_MakeRule *rule; char *command; - rule = chaz_MakeFile_add_rule(makefile, shared_lib, objects); + rule = chaz_MakeFile_add_rule(makefile, shared_lib, sources); - if (library_flags) { - library_flags_string = chaz_CFlags_get_string(library_flags); + if (link_flags) { + link_flags_string = chaz_CFlags_get_string(link_flags); } chaz_CFlags_link_shared_library(local_flags); chaz_CFlags_set_link_output(local_flags, shared_lib); local_flags_string = chaz_CFlags_get_string(local_flags); - command = chaz_Util_join(" ", link, local_flags_string, objects, - library_flags_string, NULL); + command = chaz_Util_join(" ", link, sources, link_flags_string, + local_flags_string, NULL); chaz_MakeRule_add_command(rule, command); chaz_MakeFile_add_to_cleanup(makefile, shared_lib); http://git-wip-us.apache.org/repos/asf/lucy/blob/ddf40422/clownfish/runtime/common/charmonizer.c ---------------------------------------------------------------------- diff --git a/clownfish/runtime/common/charmonizer.c b/clownfish/runtime/common/charmonizer.c index 6cf33ce..891475b 100644 --- a/clownfish/runtime/common/charmonizer.c +++ b/clownfish/runtime/common/charmonizer.c @@ -494,24 +494,24 @@ chaz_MakeFile_add_dir_to_cleanup(chaz_MakeFile *makefile, const char *dir); * * @param makefile The makefile. * @param exe The name of the executable. - * @param objects The list of object files. - * @param library_flags Additional link flags for libraries. + * @param sources The list of source files. + * @param link_flags Additional link flags. */ chaz_MakeRule* chaz_MakeFile_add_exe(chaz_MakeFile *makefile, const char *exe, - const char *objects, chaz_CFlags *library_flags); + const char *sources, chaz_CFlags *link_flags); /** Add a rule to link a shared library. The shared library will also be added * to the list of files to clean. * * @param makefile The makefile. * @param shared_lib The name of the shared library. - * @param objects The list of object files. - * @param library_flags Additional link flags for libraries. + * @param sources The list of source files. + * @param link_flags Additional link flags. */ chaz_MakeRule* chaz_MakeFile_add_shared_lib(chaz_MakeFile *makefile, const char *shared_lib, - const char *objects, chaz_CFlags *library_flags); + const char *sources, chaz_CFlags *link_flags); /** Write the makefile to a file named 'Makefile' in the current directory. * @@ -3328,24 +3328,24 @@ chaz_MakeFile_add_dir_to_cleanup(chaz_MakeFile *makefile, const char *dir) { chaz_MakeRule* chaz_MakeFile_add_exe(chaz_MakeFile *makefile, const char *exe, - const char *objects, chaz_CFlags *library_flags) { + const char *sources, chaz_CFlags *link_flags) { int cflags_style = chaz_CC_get_cflags_style(); chaz_CFlags *local_flags = chaz_CFlags_new(cflags_style); const char *link = chaz_CC_link_command(); - const char *library_flags_string = ""; + const char *link_flags_string = ""; const char *local_flags_string; chaz_MakeRule *rule; char *command; - rule = chaz_MakeFile_add_rule(makefile, exe, objects); + rule = chaz_MakeFile_add_rule(makefile, exe, sources); - if (library_flags) { - library_flags_string = chaz_CFlags_get_string(library_flags); + if (link_flags) { + link_flags_string = chaz_CFlags_get_string(link_flags); } chaz_CFlags_set_link_output(local_flags, exe); local_flags_string = chaz_CFlags_get_string(local_flags); - command = chaz_Util_join(" ", link, local_flags_string, objects, - library_flags_string, NULL); + command = chaz_Util_join(" ", link, sources, link_flags_string, + local_flags_string, NULL); chaz_MakeRule_add_command(rule, command); chaz_MakeFile_add_to_cleanup(makefile, exe); @@ -3357,25 +3357,25 @@ chaz_MakeFile_add_exe(chaz_MakeFile *makefile, const char *exe, chaz_MakeRule* chaz_MakeFile_add_shared_lib(chaz_MakeFile *makefile, const char *shared_lib, - const char *objects, chaz_CFlags *library_flags) { + const char *sources, chaz_CFlags *link_flags) { int cflags_style = chaz_CC_get_cflags_style(); chaz_CFlags *local_flags = chaz_CFlags_new(cflags_style); const char *link = chaz_CC_link_command(); - const char *library_flags_string = ""; + const char *link_flags_string = ""; const char *local_flags_string; chaz_MakeRule *rule; char *command; - rule = chaz_MakeFile_add_rule(makefile, shared_lib, objects); + rule = chaz_MakeFile_add_rule(makefile, shared_lib, sources); - if (library_flags) { - library_flags_string = chaz_CFlags_get_string(library_flags); + if (link_flags) { + link_flags_string = chaz_CFlags_get_string(link_flags); } chaz_CFlags_link_shared_library(local_flags); chaz_CFlags_set_link_output(local_flags, shared_lib); local_flags_string = chaz_CFlags_get_string(local_flags); - command = chaz_Util_join(" ", link, local_flags_string, objects, - library_flags_string, NULL); + command = chaz_Util_join(" ", link, sources, link_flags_string, + local_flags_string, NULL); chaz_MakeRule_add_command(rule, command); chaz_MakeFile_add_to_cleanup(makefile, shared_lib); http://git-wip-us.apache.org/repos/asf/lucy/blob/ddf40422/common/charmonizer.c ---------------------------------------------------------------------- diff --git a/common/charmonizer.c b/common/charmonizer.c index d9ff1ff..7cb93a3 100644 --- a/common/charmonizer.c +++ b/common/charmonizer.c @@ -494,24 +494,24 @@ chaz_MakeFile_add_dir_to_cleanup(chaz_MakeFile *makefile, const char *dir); * * @param makefile The makefile. * @param exe The name of the executable. - * @param objects The list of object files. - * @param library_flags Additional link flags for libraries. + * @param sources The list of source files. + * @param link_flags Additional link flags. */ chaz_MakeRule* chaz_MakeFile_add_exe(chaz_MakeFile *makefile, const char *exe, - const char *objects, chaz_CFlags *library_flags); + const char *sources, chaz_CFlags *link_flags); /** Add a rule to link a shared library. The shared library will also be added * to the list of files to clean. * * @param makefile The makefile. * @param shared_lib The name of the shared library. - * @param objects The list of object files. - * @param library_flags Additional link flags for libraries. + * @param sources The list of source files. + * @param link_flags Additional link flags. */ chaz_MakeRule* chaz_MakeFile_add_shared_lib(chaz_MakeFile *makefile, const char *shared_lib, - const char *objects, chaz_CFlags *library_flags); + const char *sources, chaz_CFlags *link_flags); /** Write the makefile to a file named 'Makefile' in the current directory. * @@ -3328,24 +3328,24 @@ chaz_MakeFile_add_dir_to_cleanup(chaz_MakeFile *makefile, const char *dir) { chaz_MakeRule* chaz_MakeFile_add_exe(chaz_MakeFile *makefile, const char *exe, - const char *objects, chaz_CFlags *library_flags) { + const char *sources, chaz_CFlags *link_flags) { int cflags_style = chaz_CC_get_cflags_style(); chaz_CFlags *local_flags = chaz_CFlags_new(cflags_style); const char *link = chaz_CC_link_command(); - const char *library_flags_string = ""; + const char *link_flags_string = ""; const char *local_flags_string; chaz_MakeRule *rule; char *command; - rule = chaz_MakeFile_add_rule(makefile, exe, objects); + rule = chaz_MakeFile_add_rule(makefile, exe, sources); - if (library_flags) { - library_flags_string = chaz_CFlags_get_string(library_flags); + if (link_flags) { + link_flags_string = chaz_CFlags_get_string(link_flags); } chaz_CFlags_set_link_output(local_flags, exe); local_flags_string = chaz_CFlags_get_string(local_flags); - command = chaz_Util_join(" ", link, local_flags_string, objects, - library_flags_string, NULL); + command = chaz_Util_join(" ", link, sources, link_flags_string, + local_flags_string, NULL); chaz_MakeRule_add_command(rule, command); chaz_MakeFile_add_to_cleanup(makefile, exe); @@ -3357,25 +3357,25 @@ chaz_MakeFile_add_exe(chaz_MakeFile *makefile, const char *exe, chaz_MakeRule* chaz_MakeFile_add_shared_lib(chaz_MakeFile *makefile, const char *shared_lib, - const char *objects, chaz_CFlags *library_flags) { + const char *sources, chaz_CFlags *link_flags) { int cflags_style = chaz_CC_get_cflags_style(); chaz_CFlags *local_flags = chaz_CFlags_new(cflags_style); const char *link = chaz_CC_link_command(); - const char *library_flags_string = ""; + const char *link_flags_string = ""; const char *local_flags_string; chaz_MakeRule *rule; char *command; - rule = chaz_MakeFile_add_rule(makefile, shared_lib, objects); + rule = chaz_MakeFile_add_rule(makefile, shared_lib, sources); - if (library_flags) { - library_flags_string = chaz_CFlags_get_string(library_flags); + if (link_flags) { + link_flags_string = chaz_CFlags_get_string(link_flags); } chaz_CFlags_link_shared_library(local_flags); chaz_CFlags_set_link_output(local_flags, shared_lib); local_flags_string = chaz_CFlags_get_string(local_flags); - command = chaz_Util_join(" ", link, local_flags_string, objects, - library_flags_string, NULL); + command = chaz_Util_join(" ", link, sources, link_flags_string, + local_flags_string, NULL); chaz_MakeRule_add_command(rule, command); chaz_MakeFile_add_to_cleanup(makefile, shared_lib); @@ -6276,7 +6276,7 @@ S_write_makefile() { int cflags_style = chaz_CC_get_cflags_style(); chaz_CFlags *extra_cflags = chaz_CC_get_extra_cflags(); - chaz_CFlags *library_cflags; + chaz_CFlags *link_flags; const char *math_library; printf("Creating Makefile...\n"); @@ -6388,9 +6388,6 @@ S_write_makefile() { chaz_MakeVar_append(var, "$(AUTOGEN_DIR)" DIR_SEP "source" DIR_SEP "parcel$(OBJ_EXT)"); - chaz_MakeFile_add_var(makefile, "TEST_LUCY_OBJS", - "t" DIR_SEP "test_lucy$(OBJ_EXT)"); - /* Executables */ chaz_MakeFile_add_var(makefile, "LEMON_EXE", @@ -6433,26 +6430,27 @@ S_write_makefile() { chaz_MakeRule_add_prereq(rule, json_parser_c); chaz_MakeRule_add_prereq(rule, "$(AUTOGEN_DIR)"); - library_cflags = chaz_CFlags_new(cflags_style); + link_flags = chaz_CFlags_new(cflags_style); if (math_library) { - chaz_CFlags_add_library(library_cflags, math_library); + chaz_CFlags_add_library(link_flags, math_library); } if (chaz_HeadCheck_check_header("pcre.h")) { - chaz_CFlags_add_library(library_cflags, "pcre"); + chaz_CFlags_add_library(link_flags, "pcre"); } chaz_MakeFile_add_shared_lib(makefile, "$(LUCY_SHLIB)", "$(LUCY_OBJS)", - library_cflags); - chaz_CFlags_destroy(library_cflags); - - chaz_MakeFile_add_rule(makefile, "$(TEST_LUCY_OBJS)", "$(AUTOGEN_DIR)"); + link_flags); + chaz_CFlags_destroy(link_flags); - library_cflags = chaz_CFlags_new(cflags_style); - chaz_CFlags_add_library_path(library_cflags, "."); - chaz_CFlags_add_library(library_cflags, "lucy"); + link_flags = chaz_CFlags_new(cflags_style); + chaz_CFlags_add_include_dir(link_flags, "."); + chaz_CFlags_add_include_dir(link_flags, + "$(AUTOGEN_DIR)" DIR_SEP "include"); + chaz_CFlags_add_library_path(link_flags, "."); + chaz_CFlags_add_library(link_flags, "lucy"); rule = chaz_MakeFile_add_exe(makefile, "$(TEST_LUCY_EXE)", - "$(TEST_LUCY_OBJS)", library_cflags); + "t" DIR_SEP "test_lucy.c", link_flags); chaz_MakeRule_add_prereq(rule, "$(LUCY_SHLIB)"); - chaz_CFlags_destroy(library_cflags); + chaz_CFlags_destroy(link_flags); rule = chaz_MakeFile_add_rule(makefile, "test", "$(TEST_LUCY_EXE)"); const char *test_command = "$(TEST_LUCY_EXE)"; @@ -6461,7 +6459,6 @@ S_write_makefile() { } chaz_MakeRule_add_command(rule, test_command); - chaz_MakeFile_add_to_cleanup(makefile, "$(TEST_LUCY_OBJS)"); chaz_MakeFile_add_to_cleanup(makefile, "$(LUCY_OBJS)"); chaz_MakeFile_add_to_cleanup(makefile, json_parser_h); chaz_MakeFile_add_to_cleanup(makefile, json_parser_c);
