Title: [147125] trunk/Source/WebKit/gtk
Revision
147125
Author
mrobin...@webkit.org
Date
2013-03-28 09:38:54 -0700 (Thu, 28 Mar 2013)

Log Message

[GTK] [gyp] Improve support for rerunning gyp automatically
https://bugs.webkit.org/show_bug.cgi?id=113360

Reviewed by Gustavo Noronha Silva.

Add support for automatically rerunning gyp when input file changes are detected
while running make.

* gyp/GNUmakefile: Added. A wrapper that invokes the generated makefile.
* gyp/autogen.sh: Add a symlink to the wrapper script.
* gyp/configure.ac: "Freeze" the TOPLEVEL_DIRECTORY command-line argument so that
run-gyp reads it properly when configure is run independently of autogen.sh.
* gyp/run-gyp: Prevent generation of auto-regeneration rules in gyp. They are buggy.

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit/gtk/ChangeLog (147124 => 147125)


--- trunk/Source/WebKit/gtk/ChangeLog	2013-03-28 16:32:58 UTC (rev 147124)
+++ trunk/Source/WebKit/gtk/ChangeLog	2013-03-28 16:38:54 UTC (rev 147125)
@@ -1,3 +1,19 @@
+2013-03-26  Martin Robinson  <mrobin...@igalia.com>
+
+        [GTK] [gyp] Improve support for rerunning gyp automatically
+        https://bugs.webkit.org/show_bug.cgi?id=113360
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Add support for automatically rerunning gyp when input file changes are detected
+        while running make.
+
+        * gyp/GNUmakefile: Added. A wrapper that invokes the generated makefile.
+        * gyp/autogen.sh: Add a symlink to the wrapper script.
+        * gyp/configure.ac: "Freeze" the TOPLEVEL_DIRECTORY command-line argument so that
+        run-gyp reads it properly when configure is run independently of autogen.sh.
+        * gyp/run-gyp: Prevent generation of auto-regeneration rules in gyp. They are buggy.
+
 2013-03-27  Timothy Hatcher  <timo...@apple.com>
 
         Add support for dock-to-right of the Web Inspector in the Mac port.

Added: trunk/Source/WebKit/gtk/gyp/GNUmakefile (0 => 147125)


--- trunk/Source/WebKit/gtk/gyp/GNUmakefile	                        (rev 0)
+++ trunk/Source/WebKit/gtk/gyp/GNUmakefile	2013-03-28 16:38:54 UTC (rev 147125)
@@ -0,0 +1,16 @@
+# This is a wrapper makefile for the gyp-generated one which supports rerunning gyp when the input changes.
+include Makefile
+
+Makefile: $(srcdir)/Source/WTF/WTF.gypi \
+		  $(srcdir)/Source/WebCore/WebCore.gyp/WebCoreGTK.gyp \
+		  $(srcdir)/Source/WebCore/WebCore.gyp/ConvertFileToHeaderWithCharacterArray.gypi \
+		  $(srcdir)/Source/WebCore/WebCore.gyp/MakeNames.gypi \
+		  $(srcdir)/Source/ThirdParty/ANGLE/ANGLE.gyp/ANGLE.gyp \
+		  $(srcdir)/Source/_javascript_Core/_javascript_Core.gypi \
+		  $(srcdir)/Source/_javascript_Core/_javascript_Core.gyp/_javascript_CoreGTK.gyp \
+		  $(srcdir)/Source/WebCore/WebCore.gypi \
+		  $(srcdir)/Source/WTF/WTF.gyp/WTFGTK.gyp \
+		  $(srcdir)/Source/WebKit/gtk/gyp/Dependencies.gyp \
+		  $(srcdir)/Source/ThirdParty/ANGLE/ANGLE.gypi \
+		  $(srcdir)/build/Configuration.gypi
+	@echo "Rerunning gyp..."; ./run-gyp

Modified: trunk/Source/WebKit/gtk/gyp/autogen.sh (147124 => 147125)


--- trunk/Source/WebKit/gtk/gyp/autogen.sh	2013-03-28 16:32:58 UTC (rev 147124)
+++ trunk/Source/WebKit/gtk/gyp/autogen.sh	2013-03-28 16:38:54 UTC (rev 147125)
@@ -15,6 +15,10 @@
     ln -s "$SCRIPT_DIRECTORY/configure.ac"
 fi
 
+if [ ! -e GNUmakefile ]; then
+    ln -s "$SCRIPT_DIRECTORY/GNUmakefile"
+fi
+
 if [ ! -e WebKitMacros ]; then
     ln -s "$TOPLEVEL_DIRECTORY/Source/autotools" WebKitMacros
 fi

Modified: trunk/Source/WebKit/gtk/gyp/configure.ac (147124 => 147125)


--- trunk/Source/WebKit/gtk/gyp/configure.ac	2013-03-28 16:32:58 UTC (rev 147124)
+++ trunk/Source/WebKit/gtk/gyp/configure.ac	2013-03-28 16:38:54 UTC (rev 147125)
@@ -29,9 +29,13 @@
 WEBKIT_FEATURES=`cat WebKitFeatures.txt | tr '\n' ' '`
 AC_SUBST(WEBKIT_FEATURES)
 
+# This is how we preserve a variable set during autogen.sh into the configure phase, allowing
+# us to preserve the value of TOPLEVEL_DIRECTORY even when running configure standalone.
+m4_define([toplevel_directory], esyscmd([echo -n $TOPLEVEL_DIRECTORY]))
+TOPLEVEL_DIRECTORY="toplevel_directory"
 AC_SUBST(TOPLEVEL_DIRECTORY)
+
 AC_CONFIG_FILES([Configuration.gypi:Configuration.gypi.in])
-
 AC_CONFIG_COMMANDS([gyp], [./run-gyp])
 
 m4_include([WebKitMacros/PrintBuildConfiguration.m4])

Modified: trunk/Source/WebKit/gtk/gyp/run-gyp (147124 => 147125)


--- trunk/Source/WebKit/gtk/gyp/run-gyp	2013-03-28 16:32:58 UTC (rev 147124)
+++ trunk/Source/WebKit/gtk/gyp/run-gyp	2013-03-28 16:38:54 UTC (rev 147125)
@@ -19,5 +19,6 @@
 sys.exit(subprocess.call(['gyp',
                           '--depth=.',
                           '--generator-output=%s' % build_directory,
+                          '-Gauto_regeneration=0',
                           'Source/WebCore/WebCore.gyp/WebCoreGTK.gyp',
                           '-I', os.path.join(build_directory, 'Configuration.gypi')]))
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to