Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(12150)

Side by Side Diff: Makefile.pre.in

Issue 16235: Add python-config.sh for use during cross compilation.
Patch Set: Created 6 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « configure.ac ('k') | Misc/python-config.sh.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Top-level Makefile for Python 1 # Top-level Makefile for Python
2 # 2 #
3 # As distributed, this file is called Makefile.pre.in; it is processed 3 # As distributed, this file is called Makefile.pre.in; it is processed
4 # into the real Makefile by running the script ./configure, which 4 # into the real Makefile by running the script ./configure, which
5 # replaces things like @spam@ with values appropriate for your system. 5 # replaces things like @spam@ with values appropriate for your system.
6 # This means that if you edit Makefile, your changes get lost the next 6 # This means that if you edit Makefile, your changes get lost the next
7 # time you run the configure script. Ideally, you can do: 7 # time you run the configure script. Ideally, you can do:
8 # 8 #
9 # ./configure 9 # ./configure
10 # make 10 # make
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 431
432 LIBRARY_OBJS= \ 432 LIBRARY_OBJS= \
433 $(LIBRARY_OBJS_OMIT_FROZEN) \ 433 $(LIBRARY_OBJS_OMIT_FROZEN) \
434 Python/frozen.o 434 Python/frozen.o
435 435
436 ######################################################################### 436 #########################################################################
437 # Rules 437 # Rules
438 438
439 # Default target 439 # Default target
440 all: build_all 440 all: build_all
441 build_all:» $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testem bed 441 build_all:» $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testem bed python-config
442 442
443 # Compile a binary with gcc profile guided optimization. 443 # Compile a binary with gcc profile guided optimization.
444 profile-opt: 444 profile-opt:
445 @echo "Building with support for profile generation:" 445 @echo "Building with support for profile generation:"
446 $(MAKE) clean 446 $(MAKE) clean
447 $(MAKE) build_all_generate_profile 447 $(MAKE) build_all_generate_profile
448 @echo "Running benchmark to generate profile data:" 448 @echo "Running benchmark to generate profile data:"
449 $(MAKE) profile-removal 449 $(MAKE) profile-removal
450 $(MAKE) run_profile_task 450 $(MAKE) run_profile_task
451 @echo "Rebuilding with profile guided optimizations:" 451 @echo "Rebuilding with profile guided optimizations:"
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 export EXE; EXE="$(BUILDEXE)"; \ 1125 export EXE; EXE="$(BUILDEXE)"; \
1126 if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \ 1126 if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
1127 export PYTHON_FOR_BUILD; \ 1127 export PYTHON_FOR_BUILD; \
1128 if [ "$(BUILD_GNU_TYPE)" = "$(HOST_GNU_TYPE)" ]; then \ 1128 if [ "$(BUILD_GNU_TYPE)" = "$(HOST_GNU_TYPE)" ]; then \
1129 PYTHON_FOR_BUILD="$(BUILDPYTHON)"; \ 1129 PYTHON_FOR_BUILD="$(BUILDPYTHON)"; \
1130 else \ 1130 else \
1131 PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)"; \ 1131 PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)"; \
1132 fi; \ 1132 fi; \
1133 cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen 1133 cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
1134 1134
1135 python-config: $(srcdir)/Misc/python-config.in 1135 python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
1136 # Substitution happens here, as the completely-expanded BINDIR 1136 # Substitution happens here, as the completely-expanded BINDIR
1137 # is not available in configure 1137 # is not available in configure
1138 » sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Mis c/python-config.in >python-config 1138 » sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," $(srcdir)/Misc/ python-config.in >python-config.py
1139 » # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}
1140 » sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' Misc/python-config.sh >pyt hon-config
1139 1141
1140 # Install the include files 1142 # Install the include files
1141 INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY) 1143 INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
1142 inclinstall: 1144 inclinstall:
1143 @for i in $(INCLDIRSTOMAKE); \ 1145 @for i in $(INCLDIRSTOMAKE); \
1144 do \ 1146 do \
1145 if test ! -d $(DESTDIR)$$i; then \ 1147 if test ! -d $(DESTDIR)$$i; then \
1146 echo "Creating directory $$i"; \ 1148 echo "Creating directory $$i"; \
1147 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \ 1149 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
1148 else true; \ 1150 else true; \
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c 1188 $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
1187 $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o 1189 $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
1188 $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config. c.in 1190 $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config. c.in
1189 $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile 1191 $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
1190 $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup 1192 $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
1191 $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local 1193 $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
1192 $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config 1194 $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
1193 $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc 1195 $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
1194 $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makeset up 1196 $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makeset up
1195 $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh 1197 $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
1198 $(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py
1196 $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-c onfig 1199 $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-c onfig
1197 rm python-config
1198 @if [ -s Modules/python.exp -a \ 1200 @if [ -s Modules/python.exp -a \
1199 "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \ 1201 "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
1200 echo; echo "Installing support files for building shared extensi on modules on AIX:"; \ 1202 echo; echo "Installing support files for building shared extensi on modules on AIX:"; \
1201 $(INSTALL_DATA) Modules/python.exp \ 1203 $(INSTALL_DATA) Modules/python.exp \
1202 $(DESTDIR)$(LIBPL)/python.exp; \ 1204 $(DESTDIR)$(LIBPL)/python.exp; \
1203 echo; echo "$(LIBPL)/python.exp"; \ 1205 echo; echo "$(LIBPL)/python.exp"; \
1204 $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \ 1206 $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \
1205 $(DESTDIR)$(LIBPL)/makexp_aix; \ 1207 $(DESTDIR)$(LIBPL)/makexp_aix; \
1206 echo "$(LIBPL)/makexp_aix"; \ 1208 echo "$(LIBPL)/makexp_aix"; \
1207 $(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix \ 1209 $(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix \
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 1376
1375 profile-removal: 1377 profile-removal:
1376 find . -name '*.gc??' -exec rm -f {} ';' 1378 find . -name '*.gc??' -exec rm -f {} ';'
1377 1379
1378 clobber: clean profile-removal 1380 clobber: clean profile-removal
1379 -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \ 1381 -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
1380 tags TAGS \ 1382 tags TAGS \
1381 config.cache config.log pyconfig.h Modules/config.c 1383 config.cache config.log pyconfig.h Modules/config.c
1382 -rm -rf build platform 1384 -rm -rf build platform
1383 -rm -rf $(PYTHONFRAMEWORKDIR) 1385 -rm -rf $(PYTHONFRAMEWORKDIR)
1386 -rm -f python-config.py python-config
1384 1387
1385 # Make things extra clean, before making a distribution: 1388 # Make things extra clean, before making a distribution:
1386 # remove all generated files, even Makefile[.pre] 1389 # remove all generated files, even Makefile[.pre]
1387 # Keep configure and Python-ast.[ch], it's possible they can't be generated 1390 # Keep configure and Python-ast.[ch], it's possible they can't be generated
1388 distclean: clobber 1391 distclean: clobber
1389 for file in Lib/test/data/* ; do \ 1392 for file in Lib/test/data/* ; do \
1390 if test "$$file" != "Lib/test/data/README"; then rm "$$file"; fi; \ 1393 if test "$$file" != "Lib/test/data/README"; then rm "$$file"; fi; \
1391 done 1394 done
1392 -rm -f core Makefile Makefile.pre config.status \ 1395 -rm -f core Makefile Makefile.pre config.status \
1393 Modules/Setup Modules/Setup.local Modules/Setup.config \ 1396 Modules/Setup Modules/Setup.local Modules/Setup.config \
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure 1455 .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
1453 .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools 1456 .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
1454 .PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean 1457 .PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean
1455 .PHONY: smelly funny patchcheck touch 1458 .PHONY: smelly funny patchcheck touch
1456 .PHONY: gdbhooks 1459 .PHONY: gdbhooks
1457 1460
1458 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY 1461 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
1459 # Local Variables: 1462 # Local Variables:
1460 # mode: makefile 1463 # mode: makefile
1461 # End: 1464 # End:
OLDNEW
« no previous file with comments | « configure.ac ('k') | Misc/python-config.sh.in » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+