com php-src: less spaces in the makefile generated commands: win32/build/confutils.js
| From: | Anatol Belski | Date: | Fri, 14 Nov 2014 16:39:43 +0000 |
| Subject: | com php-src: less spaces in the makefile generated commands: win32/build/confutils.js | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-83097@lists.php.net to get a copy of this message | ||
Commit: 1ae7743a079e8c7afa7b7d2da465a8445c4cb226
Author: Anatol Belski <ab@php.net> Fri, 14 Nov 2014 17:38:03 +0100
Parents: 034a88135f325b15ccfd8726f13b7501aaa03858
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1ae7743a079e8c7afa7b7d2da465a8445c4cb226
Log:
less spaces in the makefile generated commands
Changed paths:
M win32/build/confutils.js
Diff:
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index bcf0d1d..7d02f99 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -1999,8 +1999,9 @@ function generate_makefile()
// that is part of the build dir flags (CFLAGS_BD_XXX) from being
// seen as a line continuation character
MF.WriteLine(keys[i] + "=" +
- //word_wrap_and_indent(1, configure_subst.Item(keys[i]), ' \\', '\t') +
" "
- configure_subst.Item(keys[i]) + " "
+ /* \s+\/ eliminates extra whitespace caused when using \ for string continuation,
+ whereby \/ is the start of the next compiler switch */
+ trim(configure_subst.Item(keys[i])).replace(/\s+\//gm, " /") + " "
);
MF.WriteBlankLines(1);
}
@@ -2067,7 +2068,7 @@ function ADD_FLAG(name, flags, target)
if (target != null) {
name = target.toUpperCase() + "_" + name;
}
- flags = flags.replace(/^\s+/, "").replace(/\s+$/, "");
+ flags = trim(flags);
if (configure_subst.Exists(name)) {
var curr_flags = configure_subst.Item(name);
@@ -2798,3 +2799,8 @@ function add_extra_dirs()
}
+function trim(s)
+{
+ return s.replace(/^\s+/, "").replace(/\s+$/, "");
+}
+