1
0

patch-Makefile_pre_in 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. --- Python-3.1.1.orig/Makefile.pre.in 2009-06-12 00:54:11.000000000 +0200
  2. +++ Python-3.1.1/Makefile.pre.in 2009-09-28 19:01:13.167748736 +0200
  3. @@ -52,7 +52,7 @@ INSTALL_DATA= @INSTALL_DATA@
  4. # Shared libraries must be installed with executable mode on some systems;
  5. # rather than figuring out exactly which, we always give them executable mode.
  6. # Also, making them read-only seems to be a good idea...
  7. -INSTALL_SHARED= ${INSTALL} -m 555
  8. +INSTALL_SHARED= ${INSTALL} -m 755
  9. MAKESETUP= $(srcdir)/Modules/makesetup
  10. @@ -177,6 +177,7 @@ LIBOBJS= @LIBOBJS@
  11. PYTHON= python$(EXE)
  12. BUILDPYTHON= python$(BUILDEXE)
  13. +HOSTPYTHON?= $(BUILDPYTHON)
  14. # The task to run while instrument when building the profile-opt target
  15. PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
  16. @@ -217,6 +218,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
  17. ##########################################################################
  18. # Parser
  19. PGEN= Parser/pgen$(EXE)
  20. +HOSTPGEN?= $(PGEN)$(EXE)
  21. POBJS= \
  22. Parser/acceler.o \
  23. @@ -393,7 +395,7 @@ build_all_generate_profile:
  24. $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov"
  25. run_profile_task:
  26. - ./$(BUILDPYTHON) $(PROFILE_TASK)
  27. + $(HOSTPYTHON) $(PROFILE_TASK)
  28. build_all_use_profile:
  29. $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use"
  30. @@ -411,14 +413,14 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
  31. $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
  32. platform: $(BUILDPYTHON)
  33. - $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
  34. + $(RUNSHARED) $(HOSTPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
  35. # Build the shared modules
  36. sharedmods: $(BUILDPYTHON)
  37. @case $$MAKEFLAGS in \
  38. - *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
  39. - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
  40. + *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
  41. + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
  42. esac
  43. # Build static library
  44. @@ -542,7 +544,7 @@ $(IO_OBJS): $(IO_H)
  45. $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
  46. -@$(INSTALL) -d Include
  47. - -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
  48. + -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
  49. $(PGEN): $(PGENOBJS)
  50. $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
  51. @@ -705,7 +707,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
  52. TESTOPTS= -l $(EXTRATESTOPTS)
  53. TESTPROG= $(srcdir)/Lib/test/regrtest.py
  54. -TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -E -bb
  55. +TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) -E -bb
  56. test: all platform
  57. -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
  58. -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
  59. @@ -1018,7 +1020,7 @@ libainstall: all
  60. # Install the dynamically loadable modules
  61. # This goes into $(exec_prefix)
  62. sharedinstall:
  63. - $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
  64. + $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
  65. --prefix=$(prefix) \
  66. --install-scripts=$(BINDIR) \
  67. --install-platlib=$(DESTSHARED) \
  68. @@ -1056,7 +1058,7 @@ frameworkinstallstructure: $(LDLIBRARY)
  69. fi; \
  70. done
  71. $(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers
  72. - sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
  73. + sed 's/%VERSION%/'"`$(RUNSHARED) $(HOSTPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
  74. $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
  75. $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
  76. $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
  77. @@ -1098,7 +1100,7 @@ frameworkinstallextras:
  78. # This installs a few of the useful scripts in Tools/scripts
  79. scriptsinstall:
  80. SRCDIR=$(srcdir) $(RUNSHARED) \
  81. - ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
  82. + $(HOSTPYTHON) $(srcdir)/Tools/scripts/setup.py install \
  83. --prefix=$(prefix) \
  84. --install-scripts=$(BINDIR) \
  85. --root=/$(DESTDIR)
  86. @@ -1120,7 +1122,7 @@ config.status: $(srcdir)/configure
  87. # Run reindent on the library
  88. reindent:
  89. - ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
  90. + $(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
  91. # Rerun configure with the same options as it was run last time,
  92. # provided the config.status script exists
  93. @@ -1234,7 +1236,7 @@ funny:
  94. # Perform some verification checks on any modified files.
  95. patchcheck:
  96. - $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
  97. + $(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
  98. # Dependencies