lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [4/8] git commit: refs/heads/master - Work around command length limit of cmd.exe
Date Thu, 02 May 2013 14:03:05 GMT
Work around command length limit of cmd.exe


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

Branch: refs/heads/master
Commit: d3237b81b903ff6345852a90888ed88b50094b1d
Parents: 2c0dccd
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Thu May 2 15:22:02 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Thu May 2 15:30:54 2013 +0200

----------------------------------------------------------------------
 common/charmonizer.main |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/d3237b81/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/common/charmonizer.main b/common/charmonizer.main
index 040cad1..56b1192 100644
--- a/common/charmonizer.main
+++ b/common/charmonizer.main
@@ -373,7 +373,18 @@ S_write_makefile(struct chaz_CLIArgs *args) {
 
     clean_rule = chaz_MakeFile_clean_rule(makefile);
 
-    chaz_MakeRule_add_rm_command(clean_rule, "$(LUCY_OBJS)");
+    if (chaz_OS_shell_type() == CHAZ_OS_CMD_EXE) {
+        /*
+         * The length of the command would exceed the limit of 8191
+         * characters. As a work-around, delete all .obj files in BASE_DIR
+         * using 'del /s /q'.
+         */
+        chaz_MakeRule_add_command(clean_rule, "del /s /q $(BASE_DIR)\\*.obj");
+    }
+    else {
+        chaz_MakeRule_add_rm_command(clean_rule, "$(LUCY_OBJS)");
+    }
+
     chaz_MakeRule_add_rm_command(clean_rule, json_parser_h);
     chaz_MakeRule_add_rm_command(clean_rule, json_parser_c);
     chaz_MakeRule_add_recursive_rm_command(clean_rule, "$(AUTOGEN_DIR)");


Mime
View raw message