2011-02-28 Dimitri Glazkov <dglazkov@chromium.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Feb 2011 19:50:24 +0000 (19:50 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Feb 2011 19:50:24 +0000 (19:50 +0000)
        Reviewed by Adam Barth.

        Add necessary build steps to JavaScriptGlue GYP project.
        https://bugs.webkit.org/show_bug.cgi?id=55196

        * gyp/JavaScriptGlue.gyp: Added pre- and post- build steps.
        * gyp/JavaScriptGlue.gypi: Added Info.plist.
        * gyp/remove-headers-if-needed.sh: Added.
        * gyp/run-if-exists.sh: Added.
        * gyp/update-info-plist.sh: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79890 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptGlue/ChangeLog
Source/JavaScriptGlue/gyp/JavaScriptGlue.gyp
Source/JavaScriptGlue/gyp/JavaScriptGlue.gypi
Source/JavaScriptGlue/gyp/remove-headers-if-needed.sh [new file with mode: 0644]
Source/JavaScriptGlue/gyp/run-if-exists.sh [new file with mode: 0644]
Source/JavaScriptGlue/gyp/update-info-plist.sh [new file with mode: 0755]

index d2a36dc92b857f1888bad9adfa9347a66320e7f9..9772a8f9f7e4fc3ff66260cdbb7739eb79eb36c5 100644 (file)
@@ -1,3 +1,16 @@
+2011-02-28  Dimitri Glazkov  <dglazkov@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Add necessary build steps to JavaScriptGlue GYP project.
+        https://bugs.webkit.org/show_bug.cgi?id=55196
+
+        * gyp/JavaScriptGlue.gyp: Added pre- and post- build steps.
+        * gyp/JavaScriptGlue.gypi: Added Info.plist.
+        * gyp/remove-headers-if-needed.sh: Added.
+        * gyp/run-if-exists.sh: Added.
+        * gyp/update-info-plist.sh: Added.
+
 2011-02-23  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Darin Adler.
index 093f493878865f2eeb939aa21e4b1d75cf296143..29f702c49361632c88c33096a872ddc127823f8d 100644 (file)
@@ -6,6 +6,9 @@
     {
       'target_name': 'JavaScriptGlue',
       'type': 'shared_library',
+      'dependencies': [
+        'Update Version'
+      ],
       'include_dirs': [
         '..',
         '../ForwardingHeaders',
       'defines': [
         'WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST',
       ],
+      'postbuilds': [
+        {
+          'postbuild_name': 'Check For Global Initializers',
+          'action': [
+            'sh', 'run-if-exists.sh', 'check-for-global-initializers'
+          ],
+        },
+        {
+          'postbuild_name': 'Check For Weak VTables and Externals',
+          'action': [
+            'sh', 'run-if-exists.sh', 'check-for-weak-vtables-and-externals'
+          ],
+        },
+        {
+          'postbuild_name': 'Remove Headers If Needed',
+          'action': [
+            'sh', 'remove-headers-if-needed.sh'
+          ],
+        },
+      ],
       'conditions': [
         ['OS=="mac"', {
           'mac_bundle': 1,
         }],
       ],
     },
-  ],
+    {
+      'target_name': 'Update Version',
+      'type': 'none',
+      'actions': [
+        {
+          'action_name': 'Update Info.plist with version information',
+          'inputs': [],
+          'outputs': [],
+          'action': [
+            'sh', 'update-info-plist.sh'
+          ],
+        },
+      ], # actions
+    },
+  ], # targets
 }
index ee71d10e6cda8315addc9e0f861d4ce52b45beaf..abc98d0cd8634306fca52ceefebf2bbea7a7213d 100644 (file)
             '../JSUtils.h',
             '../JSValueWrapper.h',
             '../UserObjectImp.h',
+            '../Info.plist',
         ],
         'testjsglue_files': [
             '../testjsglue.cpp',
diff --git a/Source/JavaScriptGlue/gyp/remove-headers-if-needed.sh b/Source/JavaScriptGlue/gyp/remove-headers-if-needed.sh
new file mode 100644 (file)
index 0000000..4137859
--- /dev/null
@@ -0,0 +1,3 @@
+if (( TARGET_MAC_OS_X_VERSION_MAJOR > 1050 )); then
+    rm -rf \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"/*.h;
+fi
diff --git a/Source/JavaScriptGlue/gyp/run-if-exists.sh b/Source/JavaScriptGlue/gyp/run-if-exists.sh
new file mode 100644 (file)
index 0000000..29cae8c
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+if [ -f ../../Tools/Scripts/$1 ]; then
+    ../../Tools/Scripts/$1 || exit $?;
+fi
diff --git a/Source/JavaScriptGlue/gyp/update-info-plist.sh b/Source/JavaScriptGlue/gyp/update-info-plist.sh
new file mode 100755 (executable)
index 0000000..5064a8d
--- /dev/null
@@ -0,0 +1,4 @@
+# Touch Info.plist to let Xcode know it needs to copy it into the built product
+if [[ "${CONFIGURATION}" != "Production" ]]; then
+    touch "../Info.plist";
+fi