lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [17/21] git commit: refs/heads/master - Create soname symlink
Date Wed, 15 May 2013 22:28:51 GMT
Create soname symlink


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

Branch: refs/heads/master
Commit: a3ad53fbcf46ebe1a435d3e5c6c2306965e5d6e9
Parents: b5c98ed
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Wed May 15 23:46:15 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Thu May 16 00:11:08 2013 +0200

----------------------------------------------------------------------
 charmonizer/src/Charmonizer/Core/Make.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/a3ad53fb/charmonizer/src/Charmonizer/Core/Make.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Core/Make.c b/charmonizer/src/Charmonizer/Core/Make.c
index 2fbde93..77869b4 100644
--- a/charmonizer/src/Charmonizer/Core/Make.c
+++ b/charmonizer/src/Charmonizer/Core/Make.c
@@ -355,9 +355,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);
@@ -370,7 +381,6 @@ chaz_MakeFile_add_shared_lib(chaz_MakeFile *makefile, chaz_SharedLib *lib,
 
     chaz_CFlags_destroy(local_flags);
     free(filename);
-    free(command);
     return rule;
 }
 


Mime
View raw message