lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [19/21] git commit: refs/heads/master - Regenerate charmonizer.c
Date Wed, 15 May 2013 22:28:53 GMT
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/21f579a1
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/21f579a1
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/21f579a1

Branch: refs/heads/master
Commit: 21f579a1d596296dc2232dfb64c756f4c564e91c
Parents: 0a971e5
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Wed May 15 23:46:41 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Thu May 16 00:11:35 2013 +0200

----------------------------------------------------------------------
 clownfish/compiler/common/charmonizer.c |   12 +++++++++++-
 clownfish/runtime/common/charmonizer.c  |   12 +++++++++++-
 common/charmonizer.c                    |   14 ++++++++++++--
 3 files changed, 34 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/21f579a1/clownfish/compiler/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/common/charmonizer.c b/clownfish/compiler/common/charmonizer.c
index cdea734..3d02760 100644
--- a/clownfish/compiler/common/charmonizer.c
+++ b/clownfish/compiler/common/charmonizer.c
@@ -3476,9 +3476,20 @@ chaz_MakeFile_add_shared_lib(chaz_MakeFile *makefile, chaz_SharedLib
*lib,
     command = chaz_Util_join(" ", link, sources, link_flags_string,
                              local_flags_string, NULL);
     chaz_MakeRule_add_command(rule, command);
+    free(command);
 
     chaz_MakeRule_add_rm_command(makefile->clean, filename);
 
+    if (strcmp(chaz_OS_shared_lib_ext(), ".so") == 0) {
+        /* Add symlink for soname. */
+        char *soname = chaz_SharedLib_major_version_filename(lib);
+        command = chaz_Util_join(" ", "ln -sf", filename, soname, NULL);
+        chaz_MakeRule_add_command(rule, command);
+        free(command);
+        chaz_MakeRule_add_rm_command(makefile->clean, soname);
+        free(soname);
+    }
+
     if (chaz_CC_msvc_version_num()) {
         /* Remove import library and export file under MSVC. */
         char *lib_filename = chaz_SharedLib_implib_filename(lib);
@@ -3491,7 +3502,6 @@ chaz_MakeFile_add_shared_lib(chaz_MakeFile *makefile, chaz_SharedLib
*lib,
 
     chaz_CFlags_destroy(local_flags);
     free(filename);
-    free(command);
     return rule;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/21f579a1/clownfish/runtime/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/common/charmonizer.c b/clownfish/runtime/common/charmonizer.c
index a0ee9d0..f5fc0ab 100644
--- a/clownfish/runtime/common/charmonizer.c
+++ b/clownfish/runtime/common/charmonizer.c
@@ -3755,9 +3755,20 @@ chaz_MakeFile_add_shared_lib(chaz_MakeFile *makefile, chaz_SharedLib
*lib,
     command = chaz_Util_join(" ", link, sources, link_flags_string,
                              local_flags_string, NULL);
     chaz_MakeRule_add_command(rule, command);
+    free(command);
 
     chaz_MakeRule_add_rm_command(makefile->clean, filename);
 
+    if (strcmp(chaz_OS_shared_lib_ext(), ".so") == 0) {
+        /* Add symlink for soname. */
+        char *soname = chaz_SharedLib_major_version_filename(lib);
+        command = chaz_Util_join(" ", "ln -sf", filename, soname, NULL);
+        chaz_MakeRule_add_command(rule, command);
+        free(command);
+        chaz_MakeRule_add_rm_command(makefile->clean, soname);
+        free(soname);
+    }
+
     if (chaz_CC_msvc_version_num()) {
         /* Remove import library and export file under MSVC. */
         char *lib_filename = chaz_SharedLib_implib_filename(lib);
@@ -3770,7 +3781,6 @@ chaz_MakeFile_add_shared_lib(chaz_MakeFile *makefile, chaz_SharedLib
*lib,
 
     chaz_CFlags_destroy(local_flags);
     free(filename);
-    free(command);
     return rule;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/21f579a1/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/common/charmonizer.c b/common/charmonizer.c
index 3dfbb38..6d2cfb7 100644
--- a/common/charmonizer.c
+++ b/common/charmonizer.c
@@ -3755,9 +3755,20 @@ chaz_MakeFile_add_shared_lib(chaz_MakeFile *makefile, chaz_SharedLib
*lib,
     command = chaz_Util_join(" ", link, sources, link_flags_string,
                              local_flags_string, NULL);
     chaz_MakeRule_add_command(rule, command);
+    free(command);
 
     chaz_MakeRule_add_rm_command(makefile->clean, filename);
 
+    if (strcmp(chaz_OS_shared_lib_ext(), ".so") == 0) {
+        /* Add symlink for soname. */
+        char *soname = chaz_SharedLib_major_version_filename(lib);
+        command = chaz_Util_join(" ", "ln -sf", filename, soname, NULL);
+        chaz_MakeRule_add_command(rule, command);
+        free(command);
+        chaz_MakeRule_add_rm_command(makefile->clean, soname);
+        free(soname);
+    }
+
     if (chaz_CC_msvc_version_num()) {
         /* Remove import library and export file under MSVC. */
         char *lib_filename = chaz_SharedLib_implib_filename(lib);
@@ -3770,7 +3781,6 @@ chaz_MakeFile_add_shared_lib(chaz_MakeFile *makefile, chaz_SharedLib
*lib,
 
     chaz_CFlags_destroy(local_flags);
     free(filename);
-    free(command);
     return rule;
 }
 
@@ -6901,7 +6911,7 @@ S_write_makefile(struct chaz_CLIArgs *args) {
     chaz_CFlags_enable_optimization(test_cflags);
     chaz_CFlags_add_include_dir(test_cflags, ".");
     chaz_CFlags_add_include_dir(test_cflags, autogen_inc_dir);
-    chaz_CFlags_add_library(link_flags, lib);
+    chaz_CFlags_add_library(test_cflags, lib);
     scratch = chaz_Util_join(dir_sep, "t", "test_lucy.c", NULL);
     rule = chaz_MakeFile_add_compiled_exe(makefile, test_lucy_exe, scratch,
                                           test_cflags);


Mime
View raw message