Lines 27-32
MODLIBS= _MODLIBS_
Link Here
|
27 |
VERSION= @VERSION@ |
27 |
VERSION= @VERSION@ |
28 |
srcdir= @srcdir@ |
28 |
srcdir= @srcdir@ |
29 |
VPATH= @srcdir@ |
29 |
VPATH= @srcdir@ |
|
|
30 |
export srcdir |
30 |
|
31 |
|
31 |
CC= @CC@ |
32 |
CC= @CC@ |
32 |
CXX= @CXX@ |
33 |
CXX= @CXX@ |
Lines 72-77
CFLAGSFORSHARED=@CFLAGSFORSHARED@
Link Here
|
72 |
# C flags used for building the interpreter object files |
73 |
# C flags used for building the interpreter object files |
73 |
PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE |
74 |
PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE |
74 |
|
75 |
|
|
|
76 |
# For cross compile: build compiler options |
77 |
CC_FOR_BUILD= @CC_FOR_BUILD@ |
78 |
CROSS_COMPILING= @cross_compiling@ |
79 |
EXEEXT_FOR_BUILD= @EXEEXT_FOR_BUILD@ |
80 |
O_FOR_BUILD= @O_FOR_BUILD@ |
81 |
|
82 |
CFLAGS_FOR_BUILD= @CFLAGS_FOR_BUILD@ |
83 |
CPPFLAGS_FOR_BUILD= @CPPFLAGS_FOR_BUILD@ -I$(srcdir)/Include |
84 |
LDFLAGS_FOR_BUILD= @LDFLAGS_FOR_BUILD@ |
85 |
LIBS_FOR_BUILD= @LIBS_FOR_BUILD@ |
75 |
|
86 |
|
76 |
# Machine-dependent subdirectories |
87 |
# Machine-dependent subdirectories |
77 |
MACHDEP= @MACHDEP@ |
88 |
MACHDEP= @MACHDEP@ |
Lines 169-175
MACHDEP_OBJS= @MACHDEP_OBJS@
Link Here
|
169 |
UNICODE_OBJS= @UNICODE_OBJS@ |
180 |
UNICODE_OBJS= @UNICODE_OBJS@ |
170 |
|
181 |
|
171 |
PYTHON= python$(EXE) |
182 |
PYTHON= python$(EXE) |
172 |
BUILDPYTHON= python$(BUILDEXE) |
183 |
BUILDPYTHON= python$(EXE) |
|
|
184 |
PYTHON_FOR_BUILD= @PYTHON_FOR_BUILD@ |
173 |
|
185 |
|
174 |
# === Definitions added by makesetup === |
186 |
# === Definitions added by makesetup === |
175 |
|
187 |
|
Lines 195-201
GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
Link Here
|
195 |
|
207 |
|
196 |
########################################################################## |
208 |
########################################################################## |
197 |
# Parser |
209 |
# Parser |
198 |
PGEN= Parser/pgen$(EXE) |
210 |
PGEN_FOR_BUILD= Parser/pgen$(EXEEXT_FOR_BUILD) |
199 |
|
211 |
|
200 |
POBJS= \ |
212 |
POBJS= \ |
201 |
Parser/acceler.o \ |
213 |
Parser/acceler.o \ |
Lines 212-225
POBJS= \
Link Here
|
212 |
|
224 |
|
213 |
PARSER_OBJS= $(POBJS) Parser/myreadline.o Parser/tokenizer.o |
225 |
PARSER_OBJS= $(POBJS) Parser/myreadline.o Parser/tokenizer.o |
214 |
|
226 |
|
215 |
PGOBJS= \ |
227 |
POBJS_FOR_BUILD= \ |
216 |
Objects/obmalloc.o \ |
228 |
Parser/acceler.$(O_FOR_BUILD) \ |
217 |
Python/mysnprintf.o \ |
229 |
Parser/grammar1.$(O_FOR_BUILD) \ |
218 |
Parser/tokenizer_pgen.o \ |
230 |
Parser/listnode.$(O_FOR_BUILD) \ |
219 |
Parser/printgrammar.o \ |
231 |
Parser/node.$(O_FOR_BUILD) \ |
220 |
Parser/pgenmain.o |
232 |
Parser/parser.$(O_FOR_BUILD) \ |
|
|
233 |
Parser/parsetok.$(O_FOR_BUILD) \ |
234 |
Parser/bitset.$(O_FOR_BUILD) \ |
235 |
Parser/metagrammar.$(O_FOR_BUILD) \ |
236 |
Parser/firstsets.$(O_FOR_BUILD) \ |
237 |
Parser/grammar.$(O_FOR_BUILD) \ |
238 |
Parser/pgen.$(O_FOR_BUILD) |
239 |
|
240 |
PGOBJS_FOR_BUILD= \ |
241 |
Objects/obmalloc.$(O_FOR_BUILD) \ |
242 |
Python/mysnprintf.$(O_FOR_BUILD) \ |
243 |
Parser/tokenizer_pgen.$(O_FOR_BUILD) \ |
244 |
Parser/printgrammar.$(O_FOR_BUILD) \ |
245 |
Parser/pgenmain.$(O_FOR_BUILD) |
221 |
|
246 |
|
222 |
PGENOBJS= $(PGENMAIN) $(POBJS) $(PGOBJS) |
247 |
PGENOBJS= $(POBJS_FOR_BUILD) $(PGOBJS_FOR_BUILD) |
223 |
|
248 |
|
224 |
########################################################################## |
249 |
########################################################################## |
225 |
# AST |
250 |
# AST |
Lines 338-352
$(BUILDPYTHON): Modules/python.o $(LIBRA
Link Here
|
338 |
Modules/python.o \ |
363 |
Modules/python.o \ |
339 |
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) |
364 |
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) |
340 |
|
365 |
|
341 |
platform: $(BUILDPYTHON) |
366 |
platform: $(PYTHON_FOR_BUILD) |
342 |
$(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform |
367 |
$(RUNSHARED) $(PYTHON_FOR_BUILD) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform |
343 |
|
368 |
|
344 |
|
369 |
|
345 |
# Build the shared modules |
370 |
# Build the shared modules |
346 |
sharedmods: $(BUILDPYTHON) |
371 |
sharedmods: $(PYTHON_FOR_BUILD) |
347 |
case $$MAKEFLAGS in \ |
372 |
case $$MAKEFLAGS in \ |
348 |
*-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ |
373 |
*-s*) $(RUNSHARED) CROSS_COMPILING=$(CROSS_COMPILING) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \ |
349 |
*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ |
374 |
*) $(RUNSHARED) CROSS_COMPILING=$(CROSS_COMPILING) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ |
350 |
esac |
375 |
esac |
351 |
|
376 |
|
352 |
# Build static library |
377 |
# Build static library |
Lines 469-479
Modules/python.o: $(srcdir)/Modules/pyth
Link Here
|
469 |
$(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c |
494 |
$(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c |
470 |
|
495 |
|
471 |
|
496 |
|
472 |
$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) |
497 |
$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) |
473 |
-$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) |
498 |
-$(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) |
474 |
|
499 |
|
475 |
$(PGEN): $(PGENOBJS) |
500 |
$(PGEN_FOR_BUILD): $(PGENOBJS) |
476 |
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) |
501 |
$(CC_FOR_BUILD) $(OPT) $(LDFLAGS_FOR_BUILD) $(PGENOBJS) $(LIBS_FOR_BUILD) -o $(PGEN_FOR_BUILD) |
477 |
|
502 |
|
478 |
Parser/grammar.o: $(srcdir)/Parser/grammar.c \ |
503 |
Parser/grammar.o: $(srcdir)/Parser/grammar.c \ |
479 |
$(srcdir)/Include/token.h \ |
504 |
$(srcdir)/Include/token.h \ |
Lines 500-505
Objects/unicodectype.o: $(srcdir)/Object
Link Here
|
500 |
$(srcdir)/Objects/unicodetype_db.h |
525 |
$(srcdir)/Objects/unicodetype_db.h |
501 |
|
526 |
|
502 |
############################################################################ |
527 |
############################################################################ |
|
|
528 |
# Cross compile rules |
529 |
|
530 |
# .x is a native object files during cross-compile. |
531 |
.SUFFIXES: .x |
532 |
.c.x: |
533 |
$(CC_FOR_BUILD) -c $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ $< |
534 |
|
535 |
############################################################################ |
503 |
# Header files |
536 |
# Header files |
504 |
|
537 |
|
505 |
PYTHON_HEADERS= \ |
538 |
PYTHON_HEADERS= \ |
Lines 572-578
$(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
Link Here
|
572 |
|
605 |
|
573 |
TESTOPTS= -l $(EXTRATESTOPTS) |
606 |
TESTOPTS= -l $(EXTRATESTOPTS) |
574 |
TESTPROG= $(srcdir)/Lib/test/regrtest.py |
607 |
TESTPROG= $(srcdir)/Lib/test/regrtest.py |
575 |
TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -E -tt |
608 |
TESTPYTHON= $(RUNSHARED) $(PYTHON_FOR_BUILD) -E -tt |
576 |
test: all platform |
609 |
test: all platform |
577 |
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f |
610 |
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f |
578 |
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) |
611 |
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) |
Lines 593-599
testuniversal: all platform
Link Here
|
593 |
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f |
626 |
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f |
594 |
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall |
627 |
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall |
595 |
$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall |
628 |
$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall |
596 |
$(RUNSHARED) /usr/libexec/oah/translate ./$(BUILDPYTHON) -E -tt $(TESTPROG) $(TESTOPTS) -uall |
629 |
$(RUNSHARED) /usr/libexec/oah/translate $(PYTHON_FOR_BUILD) -E -tt $(TESTPROG) $(TESTOPTS) -uall |
597 |
|
630 |
|
598 |
|
631 |
|
599 |
# Like testall, but with a single pass only |
632 |
# Like testall, but with a single pass only |
Lines 716-722
LIBSUBDIRS= lib-tk site-packages test te
Link Here
|
716 |
distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \ |
749 |
distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \ |
717 |
setuptools setuptools/command setuptools/tests setuptools.egg-info \ |
750 |
setuptools setuptools/command setuptools/tests setuptools.egg-info \ |
718 |
curses $(MACHDEPS) |
751 |
curses $(MACHDEPS) |
719 |
libinstall: $(BUILDPYTHON) $(srcdir)/Lib/$(PLATDIR) |
752 |
libinstall: $(srcdir)/Lib/$(PLATDIR) $(PYTHON_FOR_BUILD) |
720 |
@for i in $(SCRIPTDIR) $(LIBDEST); \ |
753 |
@for i in $(SCRIPTDIR) $(LIBDEST); \ |
721 |
do \ |
754 |
do \ |
722 |
if test ! -d $(DESTDIR)$$i; then \ |
755 |
if test ! -d $(DESTDIR)$$i; then \ |
Lines 773-791
libinstall: $(BUILDPYTHON) $(srcdir)/Lib
Link Here
|
773 |
done |
806 |
done |
774 |
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt |
807 |
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt |
775 |
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
808 |
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
776 |
./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ |
809 |
$(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ |
777 |
-d $(LIBDEST) -f \ |
810 |
-d $(LIBDEST) -f \ |
778 |
-x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) |
811 |
-x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) |
779 |
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
812 |
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
780 |
./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ |
813 |
$(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ |
781 |
-d $(LIBDEST) -f \ |
814 |
-d $(LIBDEST) -f \ |
782 |
-x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) |
815 |
-x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) |
783 |
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
816 |
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
784 |
./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ |
817 |
$(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ |
785 |
-d $(LIBDEST)/site-packages -f \ |
818 |
-d $(LIBDEST)/site-packages -f \ |
786 |
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages |
819 |
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages |
787 |
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
820 |
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
788 |
./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ |
821 |
$(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ |
789 |
-d $(LIBDEST)/site-packages -f \ |
822 |
-d $(LIBDEST)/site-packages -f \ |
790 |
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages |
823 |
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages |
791 |
|
824 |
|
Lines 826-832
libinstall: $(srcdir)/Lib/$(PLATDIR) $(P
Link Here
|
826 |
$(srcdir)/Lib/$(PLATDIR): |
826 |
$(srcdir)/Lib/$(PLATDIR): |
827 |
mkdir $(srcdir)/Lib/$(PLATDIR) |
827 |
mkdir $(srcdir)/Lib/$(PLATDIR) |
828 |
cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen |
828 |
cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen |
829 |
export PATH; PATH="`pwd`:$$PATH"; \ |
829 |
export PATH; PATH="`dirname $(PYTHON_FOR_BUILD)`:$$PATH"; \ |
830 |
export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \ |
830 |
export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \ |
831 |
export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \ |
831 |
export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \ |
832 |
export EXE; EXE="$(BUILDEXE)"; \ |
832 |
export EXE; EXE="$(BUILDEXE)"; \ |
Lines 885-892
libainstall: all
Link Here
|
885 |
# Install the dynamically loadable modules |
918 |
# Install the dynamically loadable modules |
886 |
# This goes into $(exec_prefix) |
919 |
# This goes into $(exec_prefix) |
887 |
sharedinstall: |
920 |
sharedinstall: |
888 |
$(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \ |
921 |
CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING='$(CROSS_COMPILING)' \ |
889 |
--prefix=$(prefix) \ |
922 |
$(RUNSHARED) $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \ |
|
|
923 |
--prefix=$(prefix) \ |
890 |
--install-scripts=$(BINDIR) \ |
924 |
--install-scripts=$(BINDIR) \ |
891 |
--install-platlib=$(DESTSHARED) \ |
925 |
--install-platlib=$(DESTSHARED) \ |
892 |
--root=/$(DESTDIR) |
926 |
--root=/$(DESTDIR) |
Lines 958-965
frameworkinstallextras:
Link Here
|
958 |
|
992 |
|
959 |
# This installs a few of the useful scripts in Tools/scripts |
993 |
# This installs a few of the useful scripts in Tools/scripts |
960 |
scriptsinstall: |
994 |
scriptsinstall: |
961 |
SRCDIR=$(srcdir) $(RUNSHARED) \ |
995 |
$(RUNSHARED) \ |
962 |
./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \ |
996 |
$(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/setup.py install \ |
963 |
--prefix=$(prefix) \ |
997 |
--prefix=$(prefix) \ |
964 |
--install-scripts=$(BINDIR) \ |
998 |
--install-scripts=$(BINDIR) \ |
965 |
--root=/$(DESTDIR) |
999 |
--root=/$(DESTDIR) |
Lines 1020-1030
clean: pycremoval
Link Here
|
1020 |
find $(srcdir)/build -name 'fficonfig.py' -exec rm -f {} ';' || true |
1054 |
find $(srcdir)/build -name 'fficonfig.py' -exec rm -f {} ';' || true |
1021 |
|
1055 |
|
1022 |
clobber: clean |
1056 |
clobber: clean |
1023 |
-rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \ |
1057 |
-rm -f $(BUILDPYTHON) $(PGEN_FOR_BUILD) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \ |
1024 |
tags TAGS \ |
1058 |
tags TAGS \ |
1025 |
config.cache config.log pyconfig.h Modules/config.c |
1059 |
config.cache config.log pyconfig.h Modules/config.c |
1026 |
-rm -rf build platform |
1060 |
-rm -rf build platform |
1027 |
-rm -rf $(PYTHONFRAMEWORKDIR) |
1061 |
-rm -rf $(PYTHONFRAMEWORKDIR) |
|
|
1062 |
-rm -rf buildpython |
1028 |
|
1063 |
|
1029 |
# Make things extra clean, before making a distribution: |
1064 |
# Make things extra clean, before making a distribution: |
1030 |
# remove all generated files, even Makefile[.pre] |
1065 |
# remove all generated files, even Makefile[.pre] |