source: vendor/python/2.5/Makefile.pre.in@ 3449

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

Python 2.5

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