You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2016/07/08 12:23:38 UTC

lucy-charmonizer git commit: Remove MakeRule_add_command_with_libpath

Repository: lucy-charmonizer
Updated Branches:
  refs/heads/master 6ea06d339 -> fe73a8f03


Remove MakeRule_add_command_with_libpath

It's cleaner to use rpath instead.


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

Branch: refs/heads/master
Commit: fe73a8f03f47c93153cd6b10d819cf6cbefd1211
Parents: 6ea06d3
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Jul 6 17:53:12 2016 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Jul 6 17:54:39 2016 +0200

----------------------------------------------------------------------
 src/Charmonizer/Core/Make.c | 52 ----------------------------------------
 src/Charmonizer/Core/Make.h |  9 -------
 2 files changed, 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/fe73a8f0/src/Charmonizer/Core/Make.c
----------------------------------------------------------------------
diff --git a/src/Charmonizer/Core/Make.c b/src/Charmonizer/Core/Make.c
index 0272d89..15185a7 100644
--- a/src/Charmonizer/Core/Make.c
+++ b/src/Charmonizer/Core/Make.c
@@ -891,58 +891,6 @@ chaz_MakeRule_add_command(chaz_MakeRule *self, const char *command) {
 }
 
 void
-chaz_MakeRule_add_command_with_libpath(chaz_MakeRule *self,
-                                       const char *command, ...) {
-    va_list args;
-    char *path        = NULL;
-    char *lib_command = NULL;
-    int binfmt = chaz_CC_binary_format();
-
-    if (binfmt == CHAZ_CC_BINFMT_ELF) {
-        va_start(args, command);
-        path = chaz_Util_vjoin(":", args);
-        va_end(args);
-
-        lib_command = chaz_Util_join("", "LD_LIBRARY_PATH=", path,
-                                     ":$$LD_LIBRARY_PATH ", command, NULL);
-
-        free(path);
-    }
-    else if (binfmt == CHAZ_CC_BINFMT_PE) {
-        if (chaz_Make.shell_type == CHAZ_OS_CMD_EXE) {
-            va_start(args, command);
-            path = chaz_Util_vjoin(";", args);
-            va_end(args);
-
-            /* It's important to not add a space before `&&`. Otherwise, the
-             * space is added to the search path.
-             */
-            lib_command = chaz_Util_join("", "path ", path, ";%path%&& ",
-                                         command, NULL);
-        }
-        else {
-            va_start(args, command);
-            path = chaz_Util_vjoin(":", args);
-            va_end(args);
-
-            lib_command = chaz_Util_join("", "PATH=", path, ":$$PATH ",
-                                         command, NULL);
-        }
-
-        free(path);
-    }
-    else {
-        /* Assume that library paths are compiled into the executable on
-         * Darwin.
-         */
-        lib_command = chaz_Util_strdup(command);
-    }
-
-    chaz_MakeRule_add_command(self, lib_command);
-    free(lib_command);
-}
-
-void
 chaz_MakeRule_add_rm_command(chaz_MakeRule *self, const char *files) {
     char *command;
 

http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/fe73a8f0/src/Charmonizer/Core/Make.h
----------------------------------------------------------------------
diff --git a/src/Charmonizer/Core/Make.h b/src/Charmonizer/Core/Make.h
index e5bc4ac..10e28ac 100644
--- a/src/Charmonizer/Core/Make.h
+++ b/src/Charmonizer/Core/Make.h
@@ -191,15 +191,6 @@ chaz_MakeRule_add_prereq(chaz_MakeRule *self, const char *prereq);
 void
 chaz_MakeRule_add_command(chaz_MakeRule *self, const char *command);
 
-/** Add a command to be executed with a special runtime library path.
- *
- * @param command The additional command.
- * @param ... NULL-terminated list of library directories.
- */
-void
-chaz_MakeRule_add_command_with_libpath(chaz_MakeRule *self,
-                                       const char *command, ...);
-
 /** Add a command to remove one or more files.
  *
  * @param files The list of files.