OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2014 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2014 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 EXECUTABLES=python${NACL_EXEEXT} | 6 EXECUTABLES=python${NACL_EXEEXT} |
7 | 7 |
8 # Currently this package only builds on linux. | 8 # Currently this package only builds on linux. |
9 # The build relies on certain host binaries and python's configure | 9 # The build relies on certain host binaries and python's configure |
10 # requires us to set --build= as well as --host=. | 10 # requires us to set --build= as well as --host=. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 echo ${PY_LINK_LINE} >> Modules/Setup.local | 50 echo ${PY_LINK_LINE} >> Modules/Setup.local |
51 # At this point we use the existing environment variables from | 51 # At this point we use the existing environment variables from |
52 # DefaultConfigureStep to build our destination Python modules | 52 # DefaultConfigureStep to build our destination Python modules |
53 } | 53 } |
54 | 54 |
55 BuildStep() { | 55 BuildStep() { |
56 SetupCrossEnvironment | 56 SetupCrossEnvironment |
57 export CROSS_COMPILE=true | 57 export CROSS_COMPILE=true |
58 export MAKEFLAGS="PGEN=${NACL_HOST_PYROOT}/../python-host/build-nacl-host/Pars
er/pgen" | 58 export MAKEFLAGS="PGEN=${NACL_HOST_PYROOT}/../python-host/build-nacl-host/Pars
er/pgen" |
59 DefaultBuildStep | 59 DefaultBuildStep |
60 ChangeDir ${WORK_DIR} | 60 ChangeDir ${BUILD_DIR} |
61 Banner "Rebuilding libpython2.7.a" | 61 Banner "Rebuilding libpython2.7.a" |
62 ${AR} cr libpython2.7.a ${DEST_PYTHON_OBJS}/*.o | 62 ${AR} cr libpython2.7.a ${DEST_PYTHON_OBJS}/*.o |
63 ${RANLIB} libpython2.7.a | 63 ${RANLIB} libpython2.7.a |
64 # To avoid rebuilding python.nexe with the new libpython2.7.a and duplicating | 64 # To avoid rebuilding python.nexe with the new libpython2.7.a and duplicating |
65 # symbols | 65 # symbols |
66 LogExecute touch python${NACL_EXEEXT} | 66 LogExecute touch python${NACL_EXEEXT} |
67 # The modules get built with SO=so, but they need to be SO=a inside the | 67 # The modules get built with SO=so, but they need to be SO=a inside the |
68 # destination filesystem. | 68 # destination filesystem. |
69 for fn in `find ${NACL_DEST_PYROOT}/${SITE_PACKAGES} -name "*.so"` | 69 for fn in `find ${NACL_DEST_PYROOT}/${SITE_PACKAGES} -name "*.so"` |
70 do | 70 do |
71 LogExecute touch ${fn%%so}a | 71 LogExecute touch ${fn%%so}a |
72 LogExecute rm -v ${fn} | 72 LogExecute rm -v ${fn} |
73 done | 73 done |
74 } | 74 } |
OLD | NEW |