Title: [104038] trunk/Source/WebCore
Revision
104038
Author
[email protected]
Date
2012-01-04 07:33:20 -0800 (Wed, 04 Jan 2012)

Log Message

Use one big printf command instead of many chained echo commands to generate idl_files.tmp

This works around a bug in Cygwin where sh.exe will crash if given a too-long sequence of
&&-chained commands.

Fixes <http://webkit.org/b/75546> <rdar://problem/10622193> REGRESSION (r103519): WebCore's
DerivedSources.make crashes sh.exe if path to WebKit source tree is long enough

Reviewed by Antti Koivisto.

* DerivedSources.make: Change the '(echo foo && echo bar && echo baz && echo -n) >
./idl_files.tmp' command to 'printf "foo\nbar\nbaz\n" > ./idl_files.tmp'. We use the
patsubst function to append "\n" to each IDL filename, then use the subst function to remove
the spaces between the filenames.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (104037 => 104038)


--- trunk/Source/WebCore/ChangeLog	2012-01-04 15:26:42 UTC (rev 104037)
+++ trunk/Source/WebCore/ChangeLog	2012-01-04 15:33:20 UTC (rev 104038)
@@ -1,3 +1,20 @@
+2012-01-04  Adam Roben  <[email protected]>
+
+        Use one big printf command instead of many chained echo commands to generate idl_files.tmp
+
+        This works around a bug in Cygwin where sh.exe will crash if given a too-long sequence of
+        &&-chained commands.
+
+        Fixes <http://webkit.org/b/75546> <rdar://problem/10622193> REGRESSION (r103519): WebCore's
+        DerivedSources.make crashes sh.exe if path to WebKit source tree is long enough
+
+        Reviewed by Antti Koivisto.
+
+        * DerivedSources.make: Change the '(echo foo && echo bar && echo baz && echo -n) >
+        ./idl_files.tmp' command to 'printf "foo\nbar\nbaz\n" > ./idl_files.tmp'. We use the
+        patsubst function to append "\n" to each IDL filename, then use the subst function to remove
+        the spaces between the filenames.
+
 2012-01-04  Mihnea Ovidenie  <[email protected]>
 
         [CSSRegions]Rollout support for background-color region styling

Modified: trunk/Source/WebCore/DerivedSources.make (104037 => 104038)


--- trunk/Source/WebCore/DerivedSources.make	2012-01-04 15:26:42 UTC (rev 104037)
+++ trunk/Source/WebCore/DerivedSources.make	2012-01-04 15:33:20 UTC (rev 104038)
@@ -914,9 +914,13 @@
 IDL_FILES_TMP = ./idl_files.tmp
 ADDITIONAL_IDLS = $(WebCore)/inspector/_javascript_CallFrame.idl
 
+# The following two lines get a space character stored in a variable.
+# See <http://blog.jgc.org/2007/06/escaping-comma-and-space-in-gnu-make.html>.
+space :=
+space +=
+
 $(SUPPLEMENTAL_DEPENDENCY_FILE) : $(RESOLVE_SUPPLEMENTAL_SCRIPTS) $(BINDING_IDLS) $(ADDITIONAL_IDLS)
-	echo -n > $(IDL_FILES_TMP)
-	($(foreach idl, $(BINDING_IDLS) $(ADDITIONAL_IDLS), echo $(idl) &&) echo -n) >> $(IDL_FILES_TMP)
+	printf "$(subst $(space),,$(patsubst %,%\n,$(BINDING_IDLS) $(ADDITIONAL_IDLS)))" > $(IDL_FILES_TMP)
 	$(call resolve_supplemental_script, $(RESOLVE_SUPPLEMENTAL_SCRIPTS)) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_JAVASCRIPT" --idlFilesList $(IDL_FILES_TMP) --supplementalDependencyFile $@
 	rm -f $(IDL_FILES_TMP)
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to