patch-Makefile_pre_in 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. --- Python-2.6.4.orig/Makefile.pre.in 2009-09-24 21:22:45.000000000 +0200
  2. +++ Python-2.6.4/Makefile.pre.in 2010-02-13 16:08:55.000000000 +0100
  3. @@ -175,6 +175,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
  4. PYTHON= python$(EXE)
  5. BUILDPYTHON= python$(BUILDEXE)
  6. +HOSTPYTHON?= $(BUILDPYTHON)
  7. # The task to run while instrument when building the profile-opt target
  8. PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
  9. @@ -205,6 +206,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
  10. ##########################################################################
  11. # Parser
  12. PGEN= Parser/pgen$(EXE)
  13. +HOSTPGEN?= $(PGEN)$(EXE)
  14. POBJS= \
  15. Parser/acceler.o \
  16. @@ -370,7 +372,7 @@ build_all_generate_profile:
  17. $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov"
  18. run_profile_task:
  19. - ./$(BUILDPYTHON) $(PROFILE_TASK)
  20. + $(HOSTPYTHON) $(PROFILE_TASK)
  21. build_all_use_profile:
  22. $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use"
  23. @@ -388,14 +390,14 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
  24. $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
  25. platform: $(BUILDPYTHON)
  26. - $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
  27. + $(RUNSHARED) $(HOSTPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
  28. # Build the shared modules
  29. sharedmods: $(BUILDPYTHON)
  30. @case $$MAKEFLAGS in \
  31. - *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
  32. - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
  33. + *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
  34. + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
  35. esac
  36. # Build static library
  37. @@ -517,7 +519,7 @@ Modules/python.o: $(srcdir)/Modules/pyth
  38. $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
  39. -@$(INSTALL) -d Include
  40. - -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
  41. + -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
  42. $(PGEN): $(PGENOBJS)
  43. $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
  44. @@ -676,7 +678,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
  45. TESTOPTS= -l $(EXTRATESTOPTS)
  46. TESTPROG= $(srcdir)/Lib/test/regrtest.py
  47. -TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -E -tt
  48. +TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) -E -tt
  49. test: all platform
  50. -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  51. -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
  52. @@ -699,7 +701,7 @@ testuniversal: all platform
  53. -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  54. -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
  55. $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
  56. - $(RUNSHARED) /usr/libexec/oah/translate ./$(BUILDPYTHON) -E -tt $(TESTPROG) $(TESTOPTS) -uall
  57. + $(RUNSHARED) /usr/libexec/oah/translate $(HOSTPYTHON) -E -tt $(TESTPROG) $(TESTOPTS) -uall
  58. # Like testall, but with a single pass only
  59. @@ -886,24 +888,24 @@ libinstall: build_all $(srcdir)/Lib/$(PL
  60. done; \
  61. done
  62. $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
  63. - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  64. - ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
  65. + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  66. + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
  67. -d $(LIBDEST) -f \
  68. -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
  69. - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  70. - ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
  71. + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  72. + $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
  73. -d $(LIBDEST) -f \
  74. -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
  75. -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  76. - ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
  77. + $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
  78. -d $(LIBDEST)/site-packages -f \
  79. -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
  80. -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  81. - ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
  82. + $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
  83. -d $(LIBDEST)/site-packages -f \
  84. -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
  85. -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  86. - ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
  87. + $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
  88. # Create the PLATDIR source directory, if one wasn't distributed..
  89. $(srcdir)/Lib/$(PLATDIR):
  90. @@ -1001,7 +1003,7 @@ libainstall: all
  91. # Install the dynamically loadable modules
  92. # This goes into $(exec_prefix)
  93. sharedinstall:
  94. - $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
  95. + $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
  96. --prefix=$(prefix) \
  97. --install-scripts=$(BINDIR) \
  98. --install-platlib=$(DESTSHARED) \
  99. @@ -1039,7 +1041,7 @@ frameworkinstallstructure: $(LDLIBRARY)
  100. fi; \
  101. done
  102. $(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers
  103. - sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
  104. + sed 's/%VERSION%/'"`$(RUNSHARED) $(HOSTPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
  105. $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
  106. $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
  107. $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
  108. @@ -1081,7 +1083,7 @@ frameworkinstallextras:
  109. # This installs a few of the useful scripts in Tools/scripts
  110. scriptsinstall:
  111. SRCDIR=$(srcdir) $(RUNSHARED) \
  112. - ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
  113. + $(HOSTPYTHON) $(srcdir)/Tools/scripts/setup.py install \
  114. --prefix=$(prefix) \
  115. --install-scripts=$(BINDIR) \
  116. --root=/$(DESTDIR)
  117. @@ -1103,7 +1105,7 @@ config.status: $(srcdir)/configure
  118. # Run reindent on the library
  119. reindent:
  120. - ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
  121. + $(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
  122. # Rerun configure with the same options as it was run last time,
  123. # provided the config.status script exists
  124. @@ -1200,7 +1202,7 @@ funny:
  125. # Perform some verification checks on any modified files.
  126. patchcheck:
  127. - $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
  128. + $(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
  129. # Dependencies