blob: 3644d4d85d1a093420270b991e93b815fdf0fd69 [file] [log] [blame]
Dan Willemsenc88c0802017-09-25 14:33:27 -07001#!/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
19cd `dirname ${BASH_SOURCE[0]}`
20
21DIR=`uname | tr 'A-Z' 'a-z'`_x86_64
22mkdir -p $DIR/pyconfig $DIR/libffi
23cd $DIR
24
25# Generate pyconfig.h
26rm -rf tmp
27mkdir tmp
28cd tmp
29../../configure
30cp pyconfig.h ../pyconfig/
31cd ..
32rm -rf tmp
33
34# Generate ffi.h / fficonfig.h
35rm -rf tmp
36mkdir tmp
37cd tmp
38../../Modules/_ctypes/libffi/configure
39cp fficonfig.h include/ffi.h ../libffi/
40cd ..
41rm -rf tmp