| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 # Copyright 2013 the V8 project authors. All rights reserved. | 2 # Copyright 2013 the V8 project authors. All rights reserved. |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following | 10 # copyright notice, this list of conditions and the following |
| 11 # disclaimer in the documentation and/or other materials provided | 11 # disclaimer in the documentation and/or other materials provided |
| 12 # with the distribution. | 12 # with the distribution. |
| 13 # * Neither the name of Google Inc. nor the names of its | 13 # * Neither the name of Google Inc. nor the names of its |
| 14 # contributors may be used to endorse or promote products derived | 14 # contributors may be used to endorse or promote products derived |
| 15 # from this software without specific prior written permission. | 15 # from this software without specific prior written permission. |
| 16 # | 16 # |
| 17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 19 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 19 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 20 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 20 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | 28 |
| 29 # Monkey-patch GYP. | 29 # Monkey-patch GYP. |
| 30 cat > build/gyp/gyp.mingw << EOF | 30 cat > tools/gyp/gyp.mingw << EOF |
| 31 #!/usr/bin/env python | 31 #!/usr/bin/env python |
| 32 | 32 |
| 33 # Copyright (c) 2009 Google Inc. All rights reserved. | 33 # Copyright (c) 2009 Google Inc. All rights reserved. |
| 34 # Use of this source code is governed by a BSD-style license that can be | 34 # Use of this source code is governed by a BSD-style license that can be |
| 35 # found in the LICENSE file. | 35 # found in the LICENSE file. |
| 36 | 36 |
| 37 import sys | 37 import sys |
| 38 | 38 |
| 39 # TODO(mark): sys.path manipulation is some temporary testing stuff. | 39 # TODO(mark): sys.path manipulation is some temporary testing stuff. |
| 40 try: | 40 try: |
| (...skipping 26 matching lines...) Expand all Loading... |
| 67 gyp.generator.make.MakefileWriter._InstallableTargetInstallPath = Monkey_ITIP | 67 gyp.generator.make.MakefileWriter._InstallableTargetInstallPath = Monkey_ITIP |
| 68 | 68 |
| 69 if __name__ == '__main__': | 69 if __name__ == '__main__': |
| 70 sys.exit(gyp.main(sys.argv[1:])) | 70 sys.exit(gyp.main(sys.argv[1:])) |
| 71 EOF | 71 EOF |
| 72 | 72 |
| 73 # Delete old generated Makefiles. | 73 # Delete old generated Makefiles. |
| 74 find out -name '*.mk' -or -name 'Makefile*' -exec rm {} \; | 74 find out -name '*.mk' -or -name 'Makefile*' -exec rm {} \; |
| 75 | 75 |
| 76 # Generate fresh Makefiles. | 76 # Generate fresh Makefiles. |
| 77 mv build/gyp/gyp build/gyp/gyp.original | 77 mv tools/gyp/gyp tools/gyp/gyp.original |
| 78 mv build/gyp/gyp.mingw build/gyp/gyp | 78 mv tools/gyp/gyp.mingw tools/gyp/gyp |
| 79 make out/Makefile.ia32 | 79 make out/Makefile.ia32 |
| 80 mv build/gyp/gyp build/gyp/gyp.mingw | 80 mv tools/gyp/gyp tools/gyp/gyp.mingw |
| 81 mv build/gyp/gyp.original build/gyp/gyp | 81 mv tools/gyp/gyp.original tools/gyp/gyp |
| 82 | 82 |
| 83 # Patch generated Makefiles: replace most backslashes with forward slashes, | 83 # Patch generated Makefiles: replace most backslashes with forward slashes, |
| 84 # fix library names in linker flags. | 84 # fix library names in linker flags. |
| 85 FILES=$(find out -name '*.mk' -or -name 'Makefile*') | 85 FILES=$(find out -name '*.mk' -or -name 'Makefile*') |
| 86 for F in $FILES ; do | 86 for F in $FILES ; do |
| 87 echo "Patching $F..." | 87 echo "Patching $F..." |
| 88 cp $F $F.orig | 88 cp $F $F.orig |
| 89 cat $F.orig \ | 89 cat $F.orig \ |
| 90 | sed -e 's|\([)a-zA-Z0-9]\)\\\([a-zA-Z]\)|\1/\2|g' \ | 90 | sed -e 's|\([)a-zA-Z0-9]\)\\\([a-zA-Z]\)|\1/\2|g' \ |
| 91 -e 's|\([)a-zA-Z0-9]\)\\\\\([a-zA-Z]\)|\1/\2|g' \ | 91 -e 's|\([)a-zA-Z0-9]\)\\\\\([a-zA-Z]\)|\1/\2|g' \ |
| 92 -e 's|'%s/n'|'%s\\\\n'|g' \ | 92 -e 's|'%s/n'|'%s\\\\n'|g' \ |
| 93 -e 's|-lwinmm\.lib|-lwinmm|g' \ | 93 -e 's|-lwinmm\.lib|-lwinmm|g' \ |
| 94 -e 's|-lws2_32\.lib|-lws2_32|g' \ | 94 -e 's|-lws2_32\.lib|-lws2_32|g' \ |
| 95 > $F | 95 > $F |
| 96 rm $F.orig | 96 rm $F.orig |
| 97 done | 97 done |
| OLD | NEW |