lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [04/21] git commit: refs/heads/master - Convenience function to create new CFlags object
Date Wed, 15 May 2013 22:28:38 GMT
Convenience function to create new CFlags object


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

Branch: refs/heads/master
Commit: 893184bb371e145f269db257b88e733d9473fb19
Parents: 8c0f0a1
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Tue May 14 20:19:34 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Wed May 15 19:13:53 2013 +0200

----------------------------------------------------------------------
 charmonizer/src/Charmonizer/Core/Compiler.c |   10 +++++-----
 charmonizer/src/Charmonizer/Core/Compiler.h |   10 +++++-----
 charmonizer/src/Charmonizer/Core/Make.c     |    9 +++------
 clownfish/compiler/common/charmonizer.main  |    7 +++----
 common/charmonizer.main                     |    9 ++++-----
 5 files changed, 20 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/893184bb/charmonizer/src/Charmonizer/Core/Compiler.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Core/Compiler.c b/charmonizer/src/Charmonizer/Core/Compiler.c
index 9dd4841..2ad4be8 100644
--- a/charmonizer/src/Charmonizer/Core/Compiler.c
+++ b/charmonizer/src/Charmonizer/Core/Compiler.c
@@ -319,11 +319,6 @@ chaz_CC_get_cflags(void) {
     return chaz_CC.cflags;
 }
 
-int
-chaz_CC_get_cflags_style(void) {
-    return chaz_CC.cflags_style;
-}
-
 chaz_CFlags*
 chaz_CC_get_extra_cflags(void) {
     return chaz_CC.extra_cflags;
@@ -334,6 +329,11 @@ chaz_CC_get_temp_cflags(void) {
     return chaz_CC.temp_cflags;
 }
 
+chaz_CFlags*
+chaz_CC_new_cflags(void) {
+    return chaz_CFlags_new(chaz_CC.cflags_style);
+}
+
 const char*
 chaz_CC_obj_ext(void) {
     return chaz_CC.obj_ext;

http://git-wip-us.apache.org/repos/asf/lucy/blob/893184bb/charmonizer/src/Charmonizer/Core/Compiler.h
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Core/Compiler.h b/charmonizer/src/Charmonizer/Core/Compiler.h
index 820f84c..51ec01b 100644
--- a/charmonizer/src/Charmonizer/Core/Compiler.h
+++ b/charmonizer/src/Charmonizer/Core/Compiler.h
@@ -76,11 +76,6 @@ chaz_CC_get_cc(void);
 const char*
 chaz_CC_get_cflags(void);
 
-/* Accessor for `cflags_style`.
- */
-int
-chaz_CC_get_cflags_style(void);
-
 /* Accessor for `extra_cflags`.
  */
 chaz_CFlags*
@@ -91,6 +86,11 @@ chaz_CC_get_extra_cflags(void);
 chaz_CFlags*
 chaz_CC_get_temp_cflags(void);
 
+/* Return a new CFlags object.
+ */
+chaz_CFlags*
+chaz_CC_new_cflags(void);
+
 /* Return the extension for a compiled object.
  */
 const char*

http://git-wip-us.apache.org/repos/asf/lucy/blob/893184bb/charmonizer/src/Charmonizer/Core/Make.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Core/Make.c b/charmonizer/src/Charmonizer/Core/Make.c
index 1df757a..d57034e 100644
--- a/charmonizer/src/Charmonizer/Core/Make.c
+++ b/charmonizer/src/Charmonizer/Core/Make.c
@@ -264,8 +264,7 @@ chaz_MakeFile_distclean_rule(chaz_MakeFile *makefile) {
 chaz_MakeRule*
 chaz_MakeFile_add_exe(chaz_MakeFile *makefile, const char *exe,
                       const char *sources, chaz_CFlags *link_flags) {
-    int            cflags_style = chaz_CC_get_cflags_style();
-    chaz_CFlags   *local_flags  = chaz_CFlags_new(cflags_style);
+    chaz_CFlags   *local_flags  = chaz_CC_new_cflags();
     const char    *link         = chaz_CC_link_command();
     const char    *link_flags_string = "";
     const char    *local_flags_string;
@@ -293,8 +292,7 @@ chaz_MakeFile_add_exe(chaz_MakeFile *makefile, const char *exe,
 chaz_MakeRule*
 chaz_MakeFile_add_compiled_exe(chaz_MakeFile *makefile, const char *exe,
                                const char *sources, chaz_CFlags *cflags) {
-    int            cflags_style  = chaz_CC_get_cflags_style();
-    chaz_CFlags   *local_flags   = chaz_CFlags_new(cflags_style);
+    chaz_CFlags   *local_flags   = chaz_CC_new_cflags();
     const char    *cc            = chaz_CC_get_cc();
     const char    *cflags_string = "";
     const char    *local_flags_string;
@@ -323,8 +321,7 @@ chaz_MakeFile_add_compiled_exe(chaz_MakeFile *makefile, const char *exe,
 chaz_MakeRule*
 chaz_MakeFile_add_shared_lib(chaz_MakeFile *makefile, chaz_SharedLib *lib,
                              const char *sources, chaz_CFlags *link_flags) {
-    int            cflags_style = chaz_CC_get_cflags_style();
-    chaz_CFlags   *local_flags  = chaz_CFlags_new(cflags_style);
+    chaz_CFlags   *local_flags  = chaz_CC_new_cflags();
     const char    *link         = chaz_CC_link_command();
     const char    *link_flags_string = "";
     const char    *local_flags_string;

http://git-wip-us.apache.org/repos/asf/lucy/blob/893184bb/clownfish/compiler/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/clownfish/compiler/common/charmonizer.main b/clownfish/compiler/common/charmonizer.main
index 55f9139..df03a70 100644
--- a/clownfish/compiler/common/charmonizer.main
+++ b/clownfish/compiler/common/charmonizer.main
@@ -129,7 +129,6 @@ S_write_makefile(struct chaz_CLIArgs *args) {
     chaz_MakeRule *rule;
     chaz_MakeRule *clean_rule;
 
-    int          cflags_style = chaz_CC_get_cflags_style();
     chaz_CFlags *extra_cflags = chaz_CC_get_extra_cflags();
     chaz_CFlags *makefile_cflags;
     chaz_CFlags *link_flags;
@@ -161,7 +160,7 @@ S_write_makefile(struct chaz_CLIArgs *args) {
 
     chaz_MakeFile_add_var(makefile, "CC", chaz_CC_get_cc());
 
-    makefile_cflags = chaz_CFlags_new(cflags_style);
+    makefile_cflags = chaz_CC_new_cflags();
     S_add_common_cflags(makefile_cflags);
 
     chaz_CFlags_add_include_dir(makefile_cflags, ".");
@@ -203,7 +202,7 @@ S_write_makefile(struct chaz_CLIArgs *args) {
 
     chaz_MakeFile_add_rule(makefile, "all", "$(CFC_EXE)");
 
-    lemon_cflags = chaz_CFlags_new(cflags_style);
+    lemon_cflags = chaz_CC_new_cflags();
     S_add_common_cflags(lemon_cflags);
     chaz_MakeFile_add_compiled_exe(makefile, "$(LEMON_EXE)",
                                    "$(LEMON_DIR)" DIR_SEP "lemon.c",
@@ -220,7 +219,7 @@ S_write_makefile(struct chaz_CLIArgs *args) {
 
     chaz_MakeFile_add_rule(makefile, "$(COMMON_OBJS)", parse_header_c);
 
-    link_flags = chaz_CFlags_new(cflags_style);
+    link_flags = chaz_CC_new_cflags();
     if (chaz_CC_msvc_version_num()) {
         chaz_CFlags_append(link_flags, "/nologo");
     }

http://git-wip-us.apache.org/repos/asf/lucy/blob/893184bb/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/common/charmonizer.main b/common/charmonizer.main
index 0642089..e8fc434 100644
--- a/common/charmonizer.main
+++ b/common/charmonizer.main
@@ -156,7 +156,6 @@ S_write_makefile(struct chaz_CLIArgs *args) {
     chaz_MakeRule *clean_rule;
     chaz_MakeRule *distclean_rule;
 
-    int          cflags_style = chaz_CC_get_cflags_style();
     chaz_CFlags *extra_cflags = chaz_CC_get_extra_cflags();
     chaz_CFlags *makefile_cflags;
     chaz_CFlags *lemon_cflags;
@@ -206,7 +205,7 @@ S_write_makefile(struct chaz_CLIArgs *args) {
 
     chaz_MakeFile_add_var(makefile, "CC", chaz_CC_get_cc());
 
-    makefile_cflags = chaz_CFlags_new(cflags_style);
+    makefile_cflags = chaz_CC_new_cflags();
     S_add_common_cflags(makefile_cflags);
 
     chaz_CFlags_disable_strict_aliasing(makefile_cflags);
@@ -290,7 +289,7 @@ S_write_makefile(struct chaz_CLIArgs *args) {
     lib_filename = chaz_SharedLib_filename(lib);
     chaz_MakeFile_add_rule(makefile, "all", lib_filename);
 
-    lemon_cflags = chaz_CFlags_new(cflags_style);
+    lemon_cflags = chaz_CC_new_cflags();
     S_add_common_cflags(lemon_cflags);
     chaz_MakeFile_add_compiled_exe(makefile, "$(LEMON_EXE)",
                                    "$(LEMON_DIR)" DIR_SEP "lemon.c",
@@ -324,7 +323,7 @@ S_write_makefile(struct chaz_CLIArgs *args) {
     chaz_MakeRule_add_prereq(rule, json_parser_c);
     chaz_MakeRule_add_prereq(rule, "$(AUTOGEN_DIR)");
 
-    link_flags = chaz_CFlags_new(cflags_style);
+    link_flags = chaz_CC_new_cflags();
     if (chaz_CC_msvc_version_num()) {
         chaz_CFlags_append(link_flags, "/nologo");
     }
@@ -341,7 +340,7 @@ S_write_makefile(struct chaz_CLIArgs *args) {
     chaz_MakeFile_add_shared_lib(makefile, lib, "$(LUCY_OBJS)", link_flags);
     chaz_CFlags_destroy(link_flags);
 
-    test_cflags = chaz_CFlags_new(cflags_style);
+    test_cflags = chaz_CC_new_cflags();
     S_add_common_cflags(test_cflags);
     chaz_CFlags_add_include_dir(test_cflags, ".");
     chaz_CFlags_add_include_dir(test_cflags,


Mime
View raw message