source: trunk/essentials/dev-lang/python/Makefile.pre.in@ 3399

Last change on this file since 3399 was 3399, checked in by bird, 18 years ago

emx -> os2emx

File size: 34.6 KB
Line 
1# Top-level Makefile for Python
2#
3# As distributed, this file is called Makefile.pre.in; it is processed
4# into the real Makefile by running the script ./configure, which
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
7# time you run the configure script. Ideally, you can do:
8#
9# ./configure
10# make
11# make test
12# make install
13#
14# If you have a previous version of Python installed that you don't
15# want to overwrite, you can use "make altinstall" instead of "make
16# install". Refer to the "Installing" section in the README file for
17# additional details.
18#
19# See also the section "Build instructions" in the README file.
20
21# === Variables set by makesetup ===
22
23MODOBJS= _MODOBJS_
24MODLIBS= _MODLIBS_
25
26# === Variables set by configure
27VERSION= @VERSION@
28srcdir= @srcdir@
29VPATH= @srcdir@
30
31CC= @CC@
32CXX= @CXX@
33MAINCC= @MAINCC@
34LINKCC= @LINKCC@
35AR= @AR@
36RANLIB= @RANLIB@
37SVNVERSION= @SVNVERSION@
38
39# Shell used by make (some versions default to the login shell, which is bad)
40SHELL= /bin/sh
41
42# Use this to make a link between python$(VERSION) and python in $(BINDIR)
43LN= @LN@
44
45# Portable install script (configure doesn't always guess right)
46INSTALL= @INSTALL@
47INSTALL_PROGRAM=@INSTALL_PROGRAM@
48INSTALL_SCRIPT= @INSTALL_SCRIPT@
49INSTALL_DATA= @INSTALL_DATA@
50# Shared libraries must be installed with executable mode on some systems;
51# rather than figuring out exactly which, we always give them executable mode.
52# Also, making them read-only seems to be a good idea...
53INSTALL_SHARED= ${INSTALL} -m 555
54
55MAKESETUP= $(srcdir)/Modules/makesetup
56
57# Compiler options
58OPT= @OPT@
59BASECFLAGS= @BASECFLAGS@
60CFLAGS= $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS)
61# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
62# be able to build extension modules using the directories specified in the
63# environment variables
64CPPFLAGS= -I. -I$(srcdir)/Include @CPPFLAGS@
65LDFLAGS= @LDFLAGS@
66LDLAST= @LDLAST@
67SGI_ABI= @SGI_ABI@
68CCSHARED= @CCSHARED@
69LINKFORSHARED= @LINKFORSHARED@
70# Extra C flags added for building the interpreter object files.
71CFLAGSFORSHARED=@CFLAGSFORSHARED@
72# C flags used for building the interpreter object files
73PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
74
75
76# Machine-dependent subdirectories
77MACHDEP= @MACHDEP@
78
79# Install prefix for architecture-independent files
80prefix= @prefix@
81
82# Install prefix for architecture-dependent files
83exec_prefix= @exec_prefix@
84
85# Expanded directories
86BINDIR= $(exec_prefix)/bin
87LIBDIR= $(exec_prefix)/lib
88MANDIR= @mandir@
89INCLUDEDIR= @includedir@
90CONFINCLUDEDIR= $(exec_prefix)/include
91SCRIPTDIR= $(prefix)/lib
92
93# Detailed destination directories
94BINLIBDEST= $(LIBDIR)/python$(VERSION)
95LIBDEST= $(SCRIPTDIR)/python$(VERSION)
96INCLUDEPY= $(INCLUDEDIR)/python$(VERSION)
97CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION)
98LIBP= $(LIBDIR)/python$(VERSION)
99
100# Symbols used for using shared libraries
101SO= @SO@
102LDSHARED= @LDSHARED@
103BLDSHARED= @BLDSHARED@
104DESTSHARED= $(BINLIBDEST)/lib-dynload
105
106# Executable suffix (.exe on Windows and Mac OS X)
107EXE= @EXEEXT@
108BUILDEXE= @BUILDEXEEXT@
109
110# Short name and location for Mac OS X Python framework
111UNIVERSALSDK=@UNIVERSALSDK@
112PYTHONFRAMEWORK= @PYTHONFRAMEWORK@
113PYTHONFRAMEWORKDIR= @PYTHONFRAMEWORKDIR@
114PYTHONFRAMEWORKPREFIX= @PYTHONFRAMEWORKPREFIX@
115PYTHONFRAMEWORKINSTALLDIR= @PYTHONFRAMEWORKINSTALLDIR@
116# Deployment target selected during configure, to be checked
117# by distutils. The export statement is needed to ensure that the
118# deployment target is active during build.
119MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
120@EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET
121
122# Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
123OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@
124
125# Environment to run shared python without installed libraries
126RUNSHARED= @RUNSHARED@
127
128# Modes for directories, executables and data files created by the
129# install process. Default to user-only-writable for all file types.
130DIRMODE= 755
131EXEMODE= 755
132FILEMODE= 644
133
134# configure script arguments
135CONFIG_ARGS= @CONFIG_ARGS@
136
137
138# Subdirectories with code
139SRCDIRS= @SRCDIRS@
140
141# Other subdirectories
142SUBDIRSTOO= Include Lib Misc Demo
143
144# Files and directories to be distributed
145CONFIGFILES= configure configure.in acconfig.h pyconfig.h.in Makefile.pre.in
146DISTFILES= README ChangeLog $(CONFIGFILES)
147DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
148DIST= $(DISTFILES) $(DISTDIRS)
149
150
151LIBRARY= @LIBRARY@
152LDLIBRARY= @LDLIBRARY@
153BLDLIBRARY= @BLDLIBRARY@
154DLLLIBRARY= @DLLLIBRARY@
155LDLIBRARYDIR= @LDLIBRARYDIR@
156INSTSONAME= @INSTSONAME@
157CONDENSED_VERSION= @CONDENSED_VERSION@
158
159
160LIBS= @LIBS@
161LIBM= @LIBM@
162LIBC= @LIBC@
163SYSLIBS= $(LIBM) $(LIBC)
164SHLIBS= @SHLIBS@
165
166THREADOBJ= @THREADOBJ@
167DLINCLDIR= @DLINCLDIR@
168DYNLOADFILE= @DYNLOADFILE@
169MACHDEP_OBJS= @MACHDEP_OBJS@
170UNICODE_OBJS= @UNICODE_OBJS@
171
172PYTHON= python$(EXE)
173BUILDPYTHON= python$(BUILDEXE)
174
175# === Definitions added by makesetup ===
176
177
178##########################################################################
179# Modules
180MODULE_OBJS= \
181 Modules/config.o \
182 Modules/getpath.o \
183 Modules/main.o \
184 Modules/gcmodule.o
185
186# Used of signalmodule.o is not available
187SIGNAL_OBJS= @SIGNAL_OBJS@
188
189
190##########################################################################
191# Grammar
192GRAMMAR_H= $(srcdir)/Include/graminit.h
193GRAMMAR_C= $(srcdir)/Python/graminit.c
194GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
195
196
197##########################################################################
198# Parser
199PGEN= Parser/pgen$(EXE)
200
201POBJS= \
202 Parser/acceler.o \
203 Parser/grammar1.o \
204 Parser/listnode.o \
205 Parser/node.o \
206 Parser/parser.o \
207 Parser/parsetok.o \
208 Parser/bitset.o \
209 Parser/metagrammar.o \
210 Parser/firstsets.o \
211 Parser/grammar.o \
212 Parser/pgen.o
213
214PARSER_OBJS= $(POBJS) Parser/myreadline.o Parser/tokenizer.o
215
216PGOBJS= \
217 Objects/obmalloc.o \
218 Python/mysnprintf.o \
219 Parser/tokenizer_pgen.o \
220 Parser/printgrammar.o \
221 Parser/pgenmain.o
222
223PGENOBJS= $(PGENMAIN) $(POBJS) $(PGOBJS)
224
225##########################################################################
226# AST
227AST_H_DIR= $(srcdir)/Include
228AST_H= $(AST_H_DIR)/Python-ast.h
229AST_C_DIR= $(srcdir)/Python
230AST_C= $(AST_C_DIR)/Python-ast.c
231AST_ASDL= $(srcdir)/Parser/Python.asdl
232
233ASDLGEN_FILES= $(srcdir)/Parser/asdl.py $(srcdir)/Parser/asdl_c.py
234# XXX Note that a build now requires Python exist before the build starts
235ASDLGEN= $(srcdir)/Parser/asdl_c.py
236
237##########################################################################
238# Python
239PYTHON_OBJS= \
240 Python/Python-ast.o \
241 Python/asdl.o \
242 Python/ast.o \
243 Python/bltinmodule.o \
244 Python/ceval.o \
245 Python/compile.o \
246 Python/codecs.o \
247 Python/errors.o \
248 Python/frozen.o \
249 Python/frozenmain.o \
250 Python/future.o \
251 Python/getargs.o \
252 Python/getcompiler.o \
253 Python/getcopyright.o \
254 Python/getmtime.o \
255 Python/getplatform.o \
256 Python/getversion.o \
257 Python/graminit.o \
258 Python/import.o \
259 Python/importdl.o \
260 Python/marshal.o \
261 Python/modsupport.o \
262 Python/mystrtoul.o \
263 Python/mysnprintf.o \
264 Python/pyarena.o \
265 Python/pyfpe.o \
266 Python/pystate.o \
267 Python/pythonrun.o \
268 Python/structmember.o \
269 Python/symtable.o \
270 Python/sysmodule.o \
271 Python/traceback.o \
272 Python/getopt.o \
273 Python/pystrtod.o \
274 Python/$(DYNLOADFILE) \
275 $(MACHDEP_OBJS) \
276 $(THREADOBJ)
277
278
279##########################################################################
280# Objects
281OBJECT_OBJS= \
282 Objects/abstract.o \
283 Objects/boolobject.o \
284 Objects/bufferobject.o \
285 Objects/cellobject.o \
286 Objects/classobject.o \
287 Objects/cobject.o \
288 Objects/codeobject.o \
289 Objects/complexobject.o \
290 Objects/descrobject.o \
291 Objects/enumobject.o \
292 Objects/exceptions.o \
293 Objects/genobject.o \
294 Objects/fileobject.o \
295 Objects/floatobject.o \
296 Objects/frameobject.o \
297 Objects/funcobject.o \
298 Objects/intobject.o \
299 Objects/iterobject.o \
300 Objects/listobject.o \
301 Objects/longobject.o \
302 Objects/dictobject.o \
303 Objects/methodobject.o \
304 Objects/moduleobject.o \
305 Objects/object.o \
306 Objects/obmalloc.o \
307 Objects/rangeobject.o \
308 Objects/setobject.o \
309 Objects/sliceobject.o \
310 Objects/stringobject.o \
311 Objects/structseq.o \
312 Objects/tupleobject.o \
313 Objects/typeobject.o \
314 Objects/weakrefobject.o \
315 $(UNICODE_OBJS)
316
317
318##########################################################################
319# objects that get linked into the Python library
320LIBRARY_OBJS= \
321 Modules/_typesmodule.o \
322 Modules/getbuildinfo.o \
323 $(PARSER_OBJS) \
324 $(OBJECT_OBJS) \
325 $(PYTHON_OBJS) \
326 $(MODULE_OBJS) \
327 $(SIGNAL_OBJS) \
328 $(MODOBJS)
329
330#########################################################################
331# Rules
332
333# Default target
334all: $(BUILDPYTHON) oldsharedmods sharedmods
335
336# Build the interpreter
337$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
338 $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
339 Modules/python.o \
340 $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
341
342platform: $(BUILDPYTHON)
343 $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
344
345
346# Build the shared modules
347sharedmods: $(BUILDPYTHON)
348 case $$MAKEFLAGS in \
349 *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
350 *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
351 esac
352
353# Build static library
354# avoid long command lines, same as LIBRARY_OBJS
355$(LIBRARY): $(LIBRARY_OBJS)
356 -rm -f $@
357 $(AR) cr $@ Modules/getbuildinfo.o
358 $(AR) cr $@ Modules/_typesmodule.o
359 $(AR) cr $@ $(PARSER_OBJS)
360 $(AR) cr $@ $(OBJECT_OBJS)
361 $(AR) cr $@ $(PYTHON_OBJS)
362 $(AR) cr $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
363 $(AR) cr $@ $(MODOBJS)
364 $(RANLIB) $@
365
366libpython$(VERSION).so: $(LIBRARY_OBJS)
367 if test $(INSTSONAME) != $(LDLIBRARY); then \
368 $(LDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
369 $(LN) -f $(INSTSONAME) $@; \
370 else\
371 $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
372 fi
373
374libpython$(VERSION).sl: $(LIBRARY_OBJS)
375 $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
376
377# This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
378# minimal framework (not including the Lib directory and such) in the current
379# directory.
380RESSRCDIR=$(srcdir)/Mac/Resources/framework
381$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
382 $(LIBRARY) \
383 $(RESSRCDIR)/Info.plist \
384 $(RESSRCDIR)/version.plist \
385 $(RESSRCDIR)/English.lproj/InfoPlist.strings
386 $(INSTALL) -d -m $(DIRMODE) $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)
387 if test "${UNIVERSALSDK}"; then \
388 $(CC) -o $(LDLIBRARY) -arch i386 -arch ppc -dynamiclib \
389 -isysroot "${UNIVERSALSDK}" \
390 -all_load $(LIBRARY) -Wl,-single_module \
391 -install_name $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/Python \
392 -compatibility_version $(VERSION) \
393 -current_version $(VERSION); \
394 else \
395 libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) \
396 @LIBTOOL_CRUFT@ ;\
397 fi
398 $(INSTALL) -d -m $(DIRMODE) \
399 $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj
400 $(INSTALL_DATA) $(RESSRCDIR)/Info.plist \
401 $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/Info.plist
402 $(INSTALL_DATA) $(RESSRCDIR)/version.plist \
403 $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/version.plist
404 $(INSTALL_DATA) $(RESSRCDIR)/English.lproj/InfoPlist.strings \
405 $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj/InfoPlist.strings
406 $(LN) -fsn $(VERSION) $(PYTHONFRAMEWORKDIR)/Versions/Current
407 $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)
408 $(LN) -fsn Versions/Current/Headers $(PYTHONFRAMEWORKDIR)/Headers
409 $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources
410
411ifeq ($(MACHDEP),os2emx) # bird hack!
412$(DLLLIBRARY) $(LDLIBRARY): $(LIBRARY_OBJS)
413 $(LDSHARED) -o $(DLLLIBRARY) $^ $(LIBS) $(MODLIBS) $(SYSLIBS)
414 emximp -o $(LDLIBRARY) $(DLLLIBRARY)
415
416else # CYGWIN
417# This rule builds the Cygwin Python DLL and import library if configured
418# for a shared core library; otherwise, this rule is a noop.
419$(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
420 if test -n "$(DLLLIBRARY)"; then \
421 $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
422 $(LIBS) $(MODLIBS) $(SYSLIBS); \
423 else true; \
424 fi
425endif # end bird hack!
426
427
428oldsharedmods: $(SHAREDMODS)
429
430
431Makefile Modules/config.c: Makefile.pre \
432 $(srcdir)/Modules/config.c.in \
433 $(MAKESETUP) \
434 Modules/Setup.config \
435 Modules/Setup \
436 Modules/Setup.local
437 $(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \
438 -s Modules \
439 Modules/Setup.config \
440 Modules/Setup.local \
441 Modules/Setup
442 @mv config.c Modules
443 @echo "The Makefile was updated, you may need to re-run make."
444
445
446Modules/Setup: $(srcdir)/Modules/Setup.dist
447 @if test -f Modules/Setup; then \
448 echo "-----------------------------------------------"; \
449 echo "Modules/Setup.dist is newer than Modules/Setup;"; \
450 echo "check to make sure you have all the updates you"; \
451 echo "need in your Modules/Setup file."; \
452 echo "Usually, copying Setup.dist to Setup will work."; \
453 echo "-----------------------------------------------"; \
454 fi
455
456############################################################################
457# Special rules for object files
458
459Modules/getbuildinfo.o: $(PARSER_OBJS) \
460 $(OBJECT_OBJS) \
461 $(PYTHON_OBJS) \
462 $(MODULE_OBJS) \
463 $(SIGNAL_OBJS) \
464 $(MODOBJS) \
465 $(srcdir)/Modules/getbuildinfo.c
466 $(CC) -c $(PY_CFLAGS) -DSVNVERSION=\"`LANG=C $(SVNVERSION)`\" -o $@ $(srcdir)/Modules/getbuildinfo.c
467
468Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
469 $(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
470 -DPREFIX='"$(prefix)"' \
471 -DEXEC_PREFIX='"$(exec_prefix)"' \
472 -DVERSION='"$(VERSION)"' \
473 -DVPATH='"$(VPATH)"' \
474 -o $@ $(srcdir)/Modules/getpath.c
475
476Modules/python.o: $(srcdir)/Modules/python.c
477 $(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c
478
479
480$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
481 -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
482
483$(PGEN): $(PGENOBJS)
484 $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
485
486Parser/grammar.o: $(srcdir)/Parser/grammar.c \
487 $(srcdir)/Include/token.h \
488 $(srcdir)/Include/grammar.h
489Parser/metagrammar.o: $(srcdir)/Parser/metagrammar.c
490
491Parser/tokenizer_pgen.o: $(srcdir)/Parser/tokenizer.c
492
493$(AST_H): $(AST_ASDL) $(ASDLGEN_FILES)
494ifndef BOOTSTRAPPING_PYTHON
495 $(ASDLGEN) -h $(AST_H_DIR) $(AST_ASDL)
496endif
497
498$(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
499ifndef BOOTSTRAPPING_PYTHON
500 $(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL)
501endif
502
503Python/compile.o Python/symtable.o: $(GRAMMAR_H) $(AST_H)
504
505Python/getplatform.o: $(srcdir)/Python/getplatform.c
506 $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
507
508Python/importdl.o: $(srcdir)/Python/importdl.c
509 $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
510
511Objects/unicodectype.o: $(srcdir)/Objects/unicodectype.c \
512 $(srcdir)/Objects/unicodetype_db.h
513
514############################################################################
515# Header files
516
517PYTHON_HEADERS= \
518 Include/Python.h \
519 Include/Python-ast.h \
520 Include/asdl.h \
521 Include/abstract.h \
522 Include/boolobject.h \
523 Include/bufferobject.h \
524 Include/ceval.h \
525 Include/classobject.h \
526 Include/cobject.h \
527 Include/code.h \
528 Include/codecs.h \
529 Include/compile.h \
530 Include/complexobject.h \
531 Include/descrobject.h \
532 Include/dictobject.h \
533 Include/enumobject.h \
534 Include/genobject.h \
535 Include/fileobject.h \
536 Include/floatobject.h \
537 Include/funcobject.h \
538 Include/import.h \
539 Include/intobject.h \
540 Include/intrcheck.h \
541 Include/iterobject.h \
542 Include/listobject.h \
543 Include/longobject.h \
544 Include/methodobject.h \
545 Include/modsupport.h \
546 Include/moduleobject.h \
547 Include/object.h \
548 Include/objimpl.h \
549 Include/patchlevel.h \
550 Include/pyarena.h \
551 Include/pydebug.h \
552 Include/pyerrors.h \
553 Include/pyfpe.h \
554 Include/pymem.h \
555 Include/pyport.h \
556 Include/pystate.h \
557 Include/pythonrun.h \
558 Include/rangeobject.h \
559 Include/setobject.h \
560 Include/sliceobject.h \
561 Include/stringobject.h \
562 Include/structseq.h \
563 Include/structmember.h \
564 Include/symtable.h \
565 Include/sysmodule.h \
566 Include/traceback.h \
567 Include/tupleobject.h \
568 Include/unicodeobject.h \
569 Include/weakrefobject.h \
570 pyconfig.h
571
572$(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
573
574
575######################################################################
576
577# Test the interpreter (twice, once without .pyc files, once with)
578# In the past, we've had problems where bugs in the marshalling or
579# elsewhere caused bytecode read from .pyc files to behave differently
580# than bytecode generated directly from a .py source file. Sometimes
581# the bytecode read from a .pyc file had the bug, somtimes the directly
582# generated bytecode. This is sometimes a very shy bug needing a lot of
583# sample data.
584
585TESTOPTS= -l $(EXTRATESTOPTS)
586TESTPROG= $(srcdir)/Lib/test/regrtest.py
587TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -E -tt
588test: all platform
589 -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
590 -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
591 $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
592
593testall: all platform
594 -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
595 -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
596 $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
597
598# Run the unitests for both architectures in a Universal build on OSX
599# Must be run on an Intel box.
600testuniversal: all platform
601 if [ `arch` != 'i386' ];then \
602 echo "This can only be used on OSX/i386" ;\
603 exit 1 ;\
604 fi
605 -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
606 -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
607 $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
608 $(RUNSHARED) /usr/libexec/oah/translate ./$(BUILDPYTHON) -E -tt $(TESTPROG) $(TESTOPTS) -uall
609
610
611# Like testall, but with a single pass only
612buildbottest: all platform
613 $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall -rw
614
615QUICKTESTOPTS= $(TESTOPTS) -x test_thread test_signal test_strftime \
616 test_unicodedata test_re test_sre test_select test_poll \
617 test_linuxaudiodev test_struct test_sunaudiodev test_zlib
618quicktest: all platform
619 -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
620 -$(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
621 $(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
622
623MEMTESTOPTS= $(QUICKTESTOPTS) -x test_dl test___all__ test_fork1 \
624 test_longexp
625memtest: all platform
626 -rm -f $(srcdir)/Lib/test/*.py[co]
627 -$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
628 $(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
629
630# Install everything
631install: @FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall @FRAMEWORKINSTALLLAST@
632
633# Install almost everything without disturbing previous versions
634altinstall: @FRAMEWORKALTINSTALLFIRST@ altbininstall libinstall inclinstall libainstall \
635 sharedinstall oldsharedinstall @FRAMEWORKALTINSTALLLAST@
636
637# Install shared libraries enabled by Setup
638DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
639
640oldsharedinstall: $(DESTSHARED) $(SHAREDMODS)
641 @for i in X $(SHAREDMODS); do \
642 if test $$i != X; then \
643 echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
644 $(INSTALL_SHARED) $$i $(DESTDIR)$(DESTSHARED)/`basename $$i`; \
645 fi; \
646 done
647
648$(DESTSHARED):
649 @for i in $(DESTDIRS); \
650 do \
651 if test ! -d $(DESTDIR)$$i; then \
652 echo "Creating directory $$i"; \
653 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
654 else true; \
655 fi; \
656 done
657
658
659# Install the interpreter (by creating a hard link to python$(VERSION))
660bininstall: altbininstall
661 -if test -f $(DESTDIR)$(BINDIR)/$(PYTHON) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON); \
662 then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
663 else true; \
664 fi
665 (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
666 (cd $(DESTDIR)$(BINDIR); $(LN) -sf python$(VERSION)-config python-config)
667
668# Install the interpreter with $(VERSION) affixed
669# This goes into $(exec_prefix)
670altbininstall: $(BUILDPYTHON)
671 @for i in $(BINDIR) $(LIBDIR); \
672 do \
673 if test ! -d $(DESTDIR)$$i; then \
674 echo "Creating directory $$i"; \
675 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
676 else true; \
677 fi; \
678 done
679 $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE)
680 if test -f libpython$(VERSION)$(SO); then \
681 if test "$(SO)" = .dll; then \
682 $(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(BINDIR); \
683 else \
684 $(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
685 if test libpython$(VERSION)$(SO) != $(INSTSONAME); then \
686 (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \
687 fi \
688 fi; \
689 else true; \
690 fi
691
692# Install the manual page
693maninstall:
694 @for i in $(MANDIR) $(MANDIR)/man1; \
695 do \
696 if test ! -d $(DESTDIR)$$i; then \
697 echo "Creating directory $$i"; \
698 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
699 else true; \
700 fi; \
701 done
702 $(INSTALL_DATA) $(srcdir)/Misc/python.man \
703 $(DESTDIR)$(MANDIR)/man1/python.1
704
705# Install the library
706PLATDIR= plat-$(MACHDEP)
707EXTRAPLATDIR= @EXTRAPLATDIR@
708EXTRAMACHDEPPATH=@EXTRAMACHDEPPATH@
709MACHDEPS= $(PLATDIR) $(EXTRAPLATDIR)
710XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
711PLATMACDIRS= plat-mac plat-mac/Carbon plat-mac/lib-scriptpackages \
712 plat-mac/lib-scriptpackages/_builtinSuites \
713 plat-mac/lib-scriptpackages/CodeWarrior \
714 plat-mac/lib-scriptpackages/Explorer \
715 plat-mac/lib-scriptpackages/Finder \
716 plat-mac/lib-scriptpackages/Netscape \
717 plat-mac/lib-scriptpackages/StdSuites \
718 plat-mac/lib-scriptpackages/SystemEvents \
719 plat-mac/lib-scriptpackages/Terminal
720PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
721LIBSUBDIRS= lib-tk site-packages test test/output test/data \
722 test/decimaltestdata \
723 encodings compiler hotshot \
724 email email/mime email/test email/test/data \
725 sqlite3 sqlite3/test \
726 logging bsddb bsddb/test csv wsgiref \
727 ctypes ctypes/test ctypes/macholib idlelib idlelib/Icons \
728 distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
729 setuptools setuptools/command setuptools/tests setuptools.egg-info \
730 curses $(MACHDEPS)
731libinstall: $(BUILDPYTHON) $(srcdir)/Lib/$(PLATDIR)
732 @for i in $(SCRIPTDIR) $(LIBDEST); \
733 do \
734 if test ! -d $(DESTDIR)$$i; then \
735 echo "Creating directory $$i"; \
736 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
737 else true; \
738 fi; \
739 done
740 @for d in $(LIBSUBDIRS); \
741 do \
742 a=$(srcdir)/Lib/$$d; \
743 if test ! -d $$a; then continue; else true; fi; \
744 b=$(LIBDEST)/$$d; \
745 if test ! -d $(DESTDIR)$$b; then \
746 echo "Creating directory $$b"; \
747 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \
748 else true; \
749 fi; \
750 done
751 @for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc $(srcdir)/Lib/*.egg-info ; \
752 do \
753 if test -x $$i; then \
754 $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
755 echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \
756 else \
757 $(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \
758 echo $(INSTALL_DATA) $$i $(LIBDEST); \
759 fi; \
760 done
761 @for d in $(LIBSUBDIRS); \
762 do \
763 a=$(srcdir)/Lib/$$d; \
764 if test ! -d $$a; then continue; else true; fi; \
765 if test `ls $$a | wc -l` -lt 1; then continue; fi; \
766 b=$(LIBDEST)/$$d; \
767 for i in $$a/*; \
768 do \
769 case $$i in \
770 *CVS) ;; \
771 *.py[co]) ;; \
772 *.orig) ;; \
773 *~) ;; \
774 *) \
775 if test -d $$i; then continue; fi; \
776 if test -x $$i; then \
777 echo $(INSTALL_SCRIPT) $$i $$b; \
778 $(INSTALL_SCRIPT) $$i $(DESTDIR)$$b; \
779 else \
780 echo $(INSTALL_DATA) $$i $$b; \
781 $(INSTALL_DATA) $$i $(DESTDIR)$$b; \
782 fi;; \
783 esac; \
784 done; \
785 done
786 $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
787 PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
788 ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
789 -d $(LIBDEST) -f \
790 -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
791 PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
792 ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
793 -d $(LIBDEST) -f \
794 -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
795 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
796 ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
797 -d $(LIBDEST)/site-packages -f \
798 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
799 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
800 ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
801 -d $(LIBDEST)/site-packages -f \
802 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
803
804# Create the PLATDIR source directory, if one wasn't distributed..
805$(srcdir)/Lib/$(PLATDIR):
806 mkdir $(srcdir)/Lib/$(PLATDIR)
807 cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
808 export PATH; PATH="`pwd`:$$PATH"; \
809 export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
810 export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
811 export EXE; EXE="$(BUILDEXE)"; \
812 cd $(srcdir)/Lib/$(PLATDIR); ./regen
813
814# Install the include files
815INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
816inclinstall:
817 @for i in $(INCLDIRSTOMAKE); \
818 do \
819 if test ! -d $(DESTDIR)$$i; then \
820 echo "Creating directory $$i"; \
821 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
822 else true; \
823 fi; \
824 done
825 @for i in $(srcdir)/Include/*.h; \
826 do \
827 echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
828 $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
829 done
830 $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
831
832# Install the library and miscellaneous stuff needed for extending/embedding
833# This goes into $(exec_prefix)
834LIBPL= $(LIBP)/config
835libainstall: all
836 @for i in $(LIBDIR) $(LIBP) $(LIBPL); \
837 do \
838 if test ! -d $(DESTDIR)$$i; then \
839 echo "Creating directory $$i"; \
840 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
841 else true; \
842 fi; \
843 done
844 @if test -d $(LIBRARY); then :; else \
845 if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
846 if test "$(SO)" = .dll; then \
847 $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
848 else \
849 $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
850 $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
851 fi; \
852 else \
853 echo Skip install of $(LIBRARY) - use make frameworkinstall; \
854 fi; \
855 fi
856 $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
857 $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
858 $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
859 $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
860 $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
861 $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
862 $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
863 $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
864 $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
865 # Substitution happens here, as the completely-expanded BINDIR
866 # is not available in configure
867 sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
868 $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config
869 rm python-config
870 @if [ -s Modules/python.exp -a \
871 "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
872 echo; echo "Installing support files for building shared extension modules on AIX:"; \
873 $(INSTALL_DATA) Modules/python.exp \
874 $(DESTDIR)$(LIBPL)/python.exp; \
875 echo; echo "$(LIBPL)/python.exp"; \
876 $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \
877 $(DESTDIR)$(LIBPL)/makexp_aix; \
878 echo "$(LIBPL)/makexp_aix"; \
879 $(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix \
880 $(DESTDIR)$(LIBPL)/ld_so_aix; \
881 echo "$(LIBPL)/ld_so_aix"; \
882 echo; echo "See Misc/AIX-NOTES for details."; \
883 else true; \
884 fi
885 @case "$(MACHDEP)" in beos*) \
886 echo; echo "Installing support files for building shared extension modules on BeOS:"; \
887 $(INSTALL_DATA) Misc/BeOS-NOTES $(DESTDIR)$(LIBPL)/README; \
888 echo; echo "$(LIBPL)/README"; \
889 $(INSTALL_SCRIPT) Modules/ar_beos $(DESTDIR)$(LIBPL)/ar_beos; \
890 echo "$(LIBPL)/ar_beos"; \
891 $(INSTALL_SCRIPT) Modules/ld_so_beos $(DESTDIR)$(LIBPL)/ld_so_beos; \
892 echo "$(LIBPL)/ld_so_beos"; \
893 echo; echo "See Misc/BeOS-NOTES for details."; \
894 ;; \
895 esac
896
897# Install the dynamically loadable modules
898# This goes into $(exec_prefix)
899sharedinstall:
900 $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
901 --prefix=$(prefix) \
902 --install-scripts=$(BINDIR) \
903 --install-platlib=$(DESTSHARED) \
904 --root=/$(DESTDIR)
905
906# Here are a couple of targets for MacOSX again, to install a full
907# framework-based Python. frameworkinstall installs everything, the
908# subtargets install specific parts. Much of the actual work is offloaded to
909# the Makefile in Mac
910#
911#
912# This target is here for backward compatiblity, previous versions of Python
913# hadn't integrated framework installation in the normal install process.
914frameworkinstall: install
915
916# On install, we re-make the framework
917# structure in the install location, /Library/Frameworks/ or the argument to
918# --enable-framework. If --enable-framework has been specified then we have
919# automatically set prefix to the location deep down in the framework, so we
920# only have to cater for the structural bits of the framework.
921
922frameworkinstallframework: frameworkinstallstructure install frameworkinstallmaclib
923
924frameworkinstallstructure: $(LDLIBRARY)
925 @if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
926 echo Not configured with --enable-framework; \
927 exit 1; \
928 else true; \
929 fi
930 @for i in $(prefix)/Resources/English.lproj $(prefix)/lib; do\
931 if test ! -d $(DESTDIR)$$i; then \
932 echo "Creating directory $(DESTDIR)$$i"; \
933 $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
934 else true; \
935 fi; \
936 done
937 $(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers
938 $(INSTALL_DATA) $(RESSRCDIR)/Info.plist $(DESTDIR)$(prefix)/Resources/Info.plist
939 $(INSTALL_DATA) $(RESSRCDIR)/version.plist $(DESTDIR)$(prefix)/Resources/version.plist
940 $(INSTALL_DATA) $(RESSRCDIR)/English.lproj/InfoPlist.strings \
941 $(DESTDIR)$(prefix)/Resources/English.lproj/InfoPlist.strings
942 $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
943 $(LN) -fsn Versions/Current/Python $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Python
944 $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
945 $(LN) -fsn Versions/Current/Resources $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Resources
946 $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(PYTHONFRAMEWORKPREFIX)/$(LDLIBRARY)
947
948# This installs Mac/Lib into the framework
949# Install a number of symlinks to keep software that expects a normal unix
950# install (which includes python-config) happy.
951frameworkinstallmaclib:
952 ln -fs "../../../Python" "$(DESTDIR)$(prefix)/lib/python$(VERSION)/config/libpython$(VERSION).a"
953 cd Mac && $(MAKE) installmacsubtree DESTDIR="$(DESTDIR)"
954
955# This installs the IDE, the Launcher and other apps into /Applications
956frameworkinstallapps:
957 cd Mac && $(MAKE) installapps DESTDIR="$(DESTDIR)"
958
959# This install the unix python and pythonw tools in /usr/local/bin
960frameworkinstallunixtools:
961 cd Mac && $(MAKE) installunixtools DESTDIR="$(DESTDIR)"
962
963frameworkaltinstallunixtools:
964 cd Mac && $(MAKE) altinstallunixtools DESTDIR="$(DESTDIR)"
965
966# This installs the Demos and Tools into the applications directory.
967# It is not part of a normal frameworkinstall
968frameworkinstallextras:
969 cd Mac && Make installextras DESTDIR="$(DESTDIR)"
970
971# This installs a few of the useful scripts in Tools/scripts
972scriptsinstall:
973 SRCDIR=$(srcdir) $(RUNSHARED) \
974 ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
975 --prefix=$(prefix) \
976 --install-scripts=$(BINDIR) \
977 --root=/$(DESTDIR)
978
979# Build the toplevel Makefile
980Makefile.pre: Makefile.pre.in config.status
981 CONFIG_FILES=Makefile.pre CONFIG_HEADERS= $(SHELL) config.status
982 $(MAKE) -f Makefile.pre Makefile
983
984# Run the configure script.
985config.status: $(srcdir)/configure
986 $(SHELL) $(srcdir)/configure $(CONFIG_ARGS)
987
988.PRECIOUS: config.status $(BUILDPYTHON) Makefile Makefile.pre
989
990# Some make's put the object file in the current directory
991.c.o:
992 $(CC) -c $(PY_CFLAGS) -o $@ $<
993
994# Run reindent on the library
995reindent:
996 ./python$(EXEEXT) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
997
998# Rerun configure with the same options as it was run last time,
999# provided the config.status script exists
1000recheck:
1001 $(SHELL) config.status --recheck
1002 $(SHELL) config.status
1003
1004# Rebuild the configure script from configure.in; also rebuild pyconfig.h.in
1005autoconf:
1006 (cd $(srcdir); autoconf)
1007 (cd $(srcdir); autoheader)
1008
1009# Create a tags file for vi
1010tags::
1011 cd $(srcdir); \
1012 ctags -w -t Include/*.h; \
1013 for i in $(SRCDIRS); do ctags -w -t -a $$i/*.[ch]; \
1014 done; \
1015 sort -o tags tags
1016
1017# Create a tags file for GNU Emacs
1018TAGS::
1019 cd $(srcdir); \
1020 etags Include/*.h; \
1021 for i in $(SRCDIRS); do etags -a $$i/*.[ch]; done
1022
1023# Sanitation targets -- clean leaves libraries, executables and tags
1024# files, which clobber removes those as well
1025pycremoval:
1026 find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
1027
1028clean: pycremoval
1029 find . -name '*.o' -exec rm -f {} ';'
1030 find . -name '*.s[ol]' -exec rm -f {} ';'
1031 find $(srcdir)/build -name 'fficonfig.h' -exec rm -f {} ';' || true
1032 find $(srcdir)/build -name 'fficonfig.py' -exec rm -f {} ';' || true
1033
1034clobber: clean
1035 -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
1036 tags TAGS \
1037 config.cache config.log pyconfig.h Modules/config.c
1038 -rm -rf build platform
1039 -rm -rf $(PYTHONFRAMEWORKDIR)
1040
1041# Make things extra clean, before making a distribution:
1042# remove all generated files, even Makefile[.pre]
1043# Keep configure and Python-ast.[ch], it's possible they can't be generated
1044distclean: clobber
1045 -rm -f core Makefile Makefile.pre config.status \
1046 Modules/Setup Modules/Setup.local Modules/Setup.config
1047 find $(srcdir) '(' -name '*.fdc' -o -name '*~' \
1048 -o -name '[@,#]*' -o -name '*.old' \
1049 -o -name '*.orig' -o -name '*.rej' \
1050 -o -name '*.bak' ')' \
1051 -exec rm -f {} ';'
1052
1053# Check for smelly exported symbols (not starting with Py/_Py)
1054smelly: all
1055 nm -p $(LIBRARY) | \
1056 sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
1057
1058# Find files with funny names
1059funny:
1060 find $(DISTDIRS) -type d \
1061 -o -name '*.[chs]' \
1062 -o -name '*.py' \
1063 -o -name '*.doc' \
1064 -o -name '*.sty' \
1065 -o -name '*.bib' \
1066 -o -name '*.dat' \
1067 -o -name '*.el' \
1068 -o -name '*.fd' \
1069 -o -name '*.in' \
1070 -o -name '*.tex' \
1071 -o -name '*,[vpt]' \
1072 -o -name 'Setup' \
1073 -o -name 'Setup.*' \
1074 -o -name README \
1075 -o -name Makefile \
1076 -o -name ChangeLog \
1077 -o -name Repository \
1078 -o -name Root \
1079 -o -name Entries \
1080 -o -name Tag \
1081 -o -name tags \
1082 -o -name TAGS \
1083 -o -name .cvsignore \
1084 -o -name MANIFEST \
1085 -o -print
1086
1087# Dependencies
1088
1089Python/thread.o: @THREADHEADERS@
1090
1091# Declare targets that aren't real files
1092.PHONY: all sharedmods oldsharedmods test quicktest memtest
1093.PHONY: install altinstall oldsharedinstall bininstall altbininstall
1094.PHONY: maninstall libinstall inclinstall libainstall sharedinstall
1095.PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
1096.PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
1097.PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean
1098.PHONY: smelly funny
1099
1100# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
Note: See TracBrowser for help on using the repository browser.