Dan Willemsen | c88c080 | 2017-09-25 14:33:27 -0700 | [diff] [blame] | 1 | #!/bin/bash -ex |
| 2 | # |
| 3 | # Copyright 2017 Google Inc. All rights reserved. |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | # |
| 17 | # Regenerate host configuration files for the current host |
| 18 | |
| 19 | cd `dirname ${BASH_SOURCE[0]}` |
| 20 | |
| 21 | DIR=`uname | tr 'A-Z' 'a-z'`_x86_64 |
| 22 | mkdir -p $DIR/pyconfig $DIR/libffi |
| 23 | cd $DIR |
| 24 | |
| 25 | # Generate pyconfig.h |
| 26 | rm -rf tmp |
| 27 | mkdir tmp |
| 28 | cd tmp |
| 29 | ../../configure |
| 30 | cp pyconfig.h ../pyconfig/ |
| 31 | cd .. |
| 32 | rm -rf tmp |
| 33 | |
| 34 | # Generate ffi.h / fficonfig.h |
| 35 | rm -rf tmp |
| 36 | mkdir tmp |
| 37 | cd tmp |
| 38 | ../../Modules/_ctypes/libffi/configure |
| 39 | cp fficonfig.h include/ffi.h ../libffi/ |
| 40 | cd .. |
| 41 | rm -rf tmp |