Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 1 | # Top-level Makefile for Python |
Guido van Rossum | 7cb32ae | 2001-08-17 15:32:31 +0000 | [diff] [blame] | 2 | # |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 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: |
Guido van Rossum | 7cb32ae | 2001-08-17 15:32:31 +0000 | [diff] [blame] | 8 | # |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 9 | # ./configure |
| 10 | # make |
| 11 | # make test |
| 12 | # make install |
Guido van Rossum | 7cb32ae | 2001-08-17 15:32:31 +0000 | [diff] [blame] | 13 | # |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 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 |
Neil Schemenauer | 2b2681a | 2001-02-16 04:16:34 +0000 | [diff] [blame] | 16 | # install". Refer to the "Installing" section in the README file for |
| 17 | # additional details. |
Guido van Rossum | 7cb32ae | 2001-08-17 15:32:31 +0000 | [diff] [blame] | 18 | # |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 19 | # See also the section "Build instructions" in the README file. |
| 20 | |
| 21 | # === Variables set by makesetup === |
| 22 | |
| 23 | MODOBJS= _MODOBJS_ |
| 24 | MODLIBS= _MODLIBS_ |
| 25 | |
| 26 | # === Variables set by configure |
| 27 | VERSION= @VERSION@ |
| 28 | srcdir= @srcdir@ |
| 29 | VPATH= @srcdir@ |
| 30 | |
| 31 | CC= @CC@ |
| 32 | CXX= @CXX@ |
| 33 | LINKCC= @LINKCC@ |
| 34 | AR= @AR@ |
| 35 | RANLIB= @RANLIB@ |
| 36 | |
| 37 | # Shell used by make (some versions default to the login shell, which is bad) |
| 38 | SHELL= /bin/sh |
| 39 | |
| 40 | # Use this to make a link between python$(VERSION) and python in $(BINDIR) |
| 41 | LN= @LN@ |
| 42 | |
| 43 | # Portable install script (configure doesn't always guess right) |
| 44 | INSTALL= @INSTALL@ |
| 45 | INSTALL_PROGRAM=@INSTALL_PROGRAM@ |
Neil Schemenauer | 3f5cc20 | 2001-04-10 23:03:35 +0000 | [diff] [blame] | 46 | INSTALL_SCRIPT= @INSTALL_SCRIPT@ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 47 | INSTALL_DATA= @INSTALL_DATA@ |
| 48 | # Shared libraries must be installed with executable mode on some systems; |
| 49 | # rather than figuring out exactly which, we always give them executable mode. |
| 50 | # Also, making them read-only seems to be a good idea... |
| 51 | INSTALL_SHARED= ${INSTALL} -m 555 |
| 52 | |
| 53 | MAKESETUP= $(srcdir)/Modules/makesetup |
| 54 | |
| 55 | # Compiler options |
| 56 | OPT= @OPT@ |
| 57 | DEFS= @DEFS@ |
Neil Schemenauer | 89e90d6 | 2001-06-02 06:16:02 +0000 | [diff] [blame] | 58 | CFLAGS= $(OPT) |
| 59 | CPPFLAGS= -I. -I$(srcdir)/Include $(DEFS) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 60 | LDFLAGS= @LDFLAGS@ |
| 61 | LDLAST= @LDLAST@ |
| 62 | SGI_ABI= @SGI_ABI@ |
Neil Schemenauer | 7ac954b | 2001-01-26 16:14:41 +0000 | [diff] [blame] | 63 | CCSHARED= @CCSHARED@ |
| 64 | LINKFORSHARED= @LINKFORSHARED@ |
| 65 | # Extra C flags added for building the interpreter object files. |
| 66 | CFLAGSFORSHARED=@CFLAGSFORSHARED@ |
| 67 | # C flags used for building the interpreter object files |
Neil Schemenauer | 89e90d6 | 2001-06-02 06:16:02 +0000 | [diff] [blame] | 68 | PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) |
Neil Schemenauer | 7ac954b | 2001-01-26 16:14:41 +0000 | [diff] [blame] | 69 | |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 70 | |
| 71 | # Machine-dependent subdirectories |
| 72 | MACHDEP= @MACHDEP@ |
| 73 | |
| 74 | # Install prefix for architecture-independent files |
| 75 | prefix= @prefix@ |
| 76 | |
| 77 | # Install prefix for architecture-dependent files |
| 78 | exec_prefix= @exec_prefix@ |
| 79 | |
| 80 | # Expanded directories |
| 81 | BINDIR= $(exec_prefix)/bin |
| 82 | LIBDIR= $(exec_prefix)/lib |
Martin v. Löwis | d429ab6 | 2001-08-02 06:20:20 +0000 | [diff] [blame] | 83 | MANDIR= @mandir@ |
| 84 | INCLUDEDIR= @includedir@ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 85 | CONFINCLUDEDIR= $(exec_prefix)/include |
| 86 | SCRIPTDIR= $(prefix)/lib |
| 87 | |
| 88 | # Detailed destination directories |
| 89 | BINLIBDEST= $(LIBDIR)/python$(VERSION) |
| 90 | LIBDEST= $(SCRIPTDIR)/python$(VERSION) |
| 91 | INCLUDEPY= $(INCLUDEDIR)/python$(VERSION) |
| 92 | CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION) |
| 93 | LIBP= $(LIBDIR)/python$(VERSION) |
| 94 | |
| 95 | # Symbols used for using shared libraries |
| 96 | SO= @SO@ |
| 97 | LDSHARED= @LDSHARED@ |
Neil Schemenauer | 75e3389 | 2001-02-16 03:36:53 +0000 | [diff] [blame] | 98 | BLDSHARED= @BLDSHARED@ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 99 | DESTSHARED= $(BINLIBDEST)/lib-dynload |
| 100 | |
| 101 | # Executable suffix (.exe on Windows and Mac OS X) |
Neil Schemenauer | cf9926c | 2001-02-27 18:50:56 +0000 | [diff] [blame] | 102 | EXE= @EXEEXT@ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 103 | |
Jack Jansen | b6e9cad | 2001-08-15 01:26:28 +0000 | [diff] [blame] | 104 | # Short name and location for Mac OS X Python framework |
| 105 | PYTHONFRAMEWORK= @PYTHONFRAMEWORK@ |
| 106 | PYTHONFRAMEWORKDIR= @PYTHONFRAMEWORKDIR@ |
| 107 | PYTHONFRAMEWORKPREFIX= @PYTHONFRAMEWORKPREFIX@ |
| 108 | PYTHONFRAMEWORKINSTALLDIR= @PYTHONFRAMEWORKINSTALLDIR@ |
| 109 | |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 110 | # Modes for directories, executables and data files created by the |
| 111 | # install process. Default to user-only-writable for all file types. |
| 112 | DIRMODE= 755 |
| 113 | EXEMODE= 755 |
| 114 | FILEMODE= 644 |
| 115 | |
Neil Schemenauer | 64b1b68 | 2001-03-22 00:32:32 +0000 | [diff] [blame] | 116 | # configure script arguments |
| 117 | CONFIG_ARGS= @CONFIG_ARGS@ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 118 | |
| 119 | |
| 120 | # Subdirectories with code |
| 121 | SRCDIRS= @SRCDIRS@ |
| 122 | |
| 123 | # Other subdirectories |
| 124 | SUBDIRSTOO= Include Lib Misc Demo |
| 125 | |
| 126 | # Files and directories to be distributed |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 127 | CONFIGFILES= configure configure.in acconfig.h pyconfig.h.in Makefile.pre.in |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 128 | DISTFILES= README ChangeLog $(CONFIGFILES) |
| 129 | DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy |
| 130 | DIST= $(DISTFILES) $(DISTDIRS) |
| 131 | |
| 132 | |
Neil Schemenauer | 7ac954b | 2001-01-26 16:14:41 +0000 | [diff] [blame] | 133 | LIBRARY= @LIBRARY@ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 134 | LDLIBRARY= @LDLIBRARY@ |
Jack Jansen | b6e9cad | 2001-08-15 01:26:28 +0000 | [diff] [blame] | 135 | BLDLIBRARY= @BLDLIBRARY@ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 136 | DLLLIBRARY= @DLLLIBRARY@ |
Jack Jansen | b6e9cad | 2001-08-15 01:26:28 +0000 | [diff] [blame] | 137 | LDLIBRARYDIR= @LDLIBRARYDIR@ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 138 | |
| 139 | |
| 140 | LIBS= @LIBS@ |
| 141 | LIBM= @LIBM@ |
| 142 | LIBC= @LIBC@ |
| 143 | SYSLIBS= $(LIBM) $(LIBC) |
| 144 | |
| 145 | MAINOBJ= @MAINOBJ@ |
| 146 | LIBOBJS= @LIBOBJS@ |
| 147 | DLINCLDIR= @DLINCLDIR@ |
| 148 | DYNLOADFILE= @DYNLOADFILE@ |
Jack Jansen | c49e5b7 | 2001-06-19 15:00:23 +0000 | [diff] [blame] | 149 | MACHDEP_OBJS= @MACHDEP_OBJS@ |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 150 | UNICODE_OBJS= @UNICODE_OBJS@ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 151 | |
Neil Schemenauer | cf9926c | 2001-02-27 18:50:56 +0000 | [diff] [blame] | 152 | PYTHON= python$(EXE) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 153 | |
| 154 | # === Definitions added by makesetup === |
| 155 | |
| 156 | |
| 157 | ########################################################################## |
| 158 | # Modules |
| 159 | MODULE_OBJS= \ |
| 160 | Modules/config.o \ |
| 161 | Modules/getpath.o \ |
Neil Schemenauer | 9c63e6d | 2001-08-29 23:44:38 +0000 | [diff] [blame] | 162 | Modules/main.o \ |
| 163 | Modules/gcmodule.o |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 164 | |
| 165 | # Used of signalmodule.o is not available |
| 166 | SIGNAL_OBJS= @SIGNAL_OBJS@ |
| 167 | |
| 168 | |
| 169 | ########################################################################## |
| 170 | # Grammar |
Neil Schemenauer | 7cd124c | 2001-02-27 02:19:16 +0000 | [diff] [blame] | 171 | GRAMMAR_H= $(srcdir)/Include/graminit.h |
| 172 | GRAMMAR_C= $(srcdir)/Python/graminit.c |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 173 | GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar |
| 174 | |
| 175 | |
| 176 | ########################################################################## |
| 177 | # Parser |
Neil Schemenauer | cf9926c | 2001-02-27 18:50:56 +0000 | [diff] [blame] | 178 | PGEN= Parser/pgen$(EXE) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 179 | |
| 180 | POBJS= \ |
| 181 | Parser/acceler.o \ |
| 182 | Parser/grammar1.o \ |
| 183 | Parser/listnode.o \ |
| 184 | Parser/node.o \ |
| 185 | Parser/parser.o \ |
| 186 | Parser/parsetok.o \ |
| 187 | Parser/tokenizer.o \ |
| 188 | Parser/bitset.o \ |
| 189 | Parser/metagrammar.o |
| 190 | |
| 191 | PARSER_OBJS= $(POBJS) Parser/myreadline.o |
| 192 | |
| 193 | PGOBJS= \ |
| 194 | Parser/firstsets.o \ |
| 195 | Parser/grammar.o \ |
| 196 | Parser/pgen.o \ |
| 197 | Parser/printgrammar.o \ |
| 198 | Parser/pgenmain.o |
| 199 | |
| 200 | PGENOBJS= $(PGENMAIN) $(POBJS) $(PGOBJS) |
| 201 | |
| 202 | |
| 203 | ########################################################################## |
| 204 | # Python |
| 205 | PYTHON_OBJS= \ |
| 206 | Python/bltinmodule.o \ |
| 207 | Python/exceptions.o \ |
| 208 | Python/ceval.o \ |
| 209 | Python/compile.o \ |
| 210 | Python/codecs.o \ |
| 211 | Python/errors.o \ |
| 212 | Python/frozen.o \ |
| 213 | Python/frozenmain.o \ |
Jeremy Hylton | 4db62b1 | 2001-02-27 19:07:02 +0000 | [diff] [blame] | 214 | Python/future.o \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 215 | Python/getargs.o \ |
| 216 | Python/getcompiler.o \ |
| 217 | Python/getcopyright.o \ |
| 218 | Python/getmtime.o \ |
| 219 | Python/getplatform.o \ |
| 220 | Python/getversion.o \ |
| 221 | Python/graminit.o \ |
| 222 | Python/import.o \ |
| 223 | Python/importdl.o \ |
| 224 | Python/marshal.o \ |
| 225 | Python/modsupport.o \ |
| 226 | Python/mystrtoul.o \ |
Marc-André Lemburg | e5006eb | 2001-07-31 13:24:44 +0000 | [diff] [blame] | 227 | Python/mysnprintf.o \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 228 | Python/pyfpe.o \ |
| 229 | Python/pystate.o \ |
| 230 | Python/pythonrun.o \ |
| 231 | Python/structmember.o \ |
Jeremy Hylton | cb17ae8 | 2001-02-09 22:22:18 +0000 | [diff] [blame] | 232 | Python/symtable.o \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 233 | Python/sysmodule.o \ |
| 234 | Python/traceback.o \ |
| 235 | Python/getopt.o \ |
| 236 | Python/$(DYNLOADFILE) \ |
Jack Jansen | c49e5b7 | 2001-06-19 15:00:23 +0000 | [diff] [blame] | 237 | $(MACHDEP_OBJS) \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 238 | $(LIBOBJS) |
| 239 | |
| 240 | |
| 241 | ########################################################################## |
| 242 | # Objects |
| 243 | OBJECT_OBJS= \ |
| 244 | Objects/abstract.o \ |
| 245 | Objects/bufferobject.o \ |
Jeremy Hylton | fbd849f | 2001-01-25 20:04:14 +0000 | [diff] [blame] | 246 | Objects/cellobject.o \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 247 | Objects/classobject.o \ |
| 248 | Objects/cobject.o \ |
| 249 | Objects/complexobject.o \ |
Tim Peters | 6d6c1a3 | 2001-08-02 04:15:00 +0000 | [diff] [blame] | 250 | Objects/descrobject.o \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 251 | Objects/fileobject.o \ |
| 252 | Objects/floatobject.o \ |
| 253 | Objects/frameobject.o \ |
| 254 | Objects/funcobject.o \ |
| 255 | Objects/intobject.o \ |
Guido van Rossum | 59d1d2b | 2001-04-20 19:13:02 +0000 | [diff] [blame] | 256 | Objects/iterobject.o \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 257 | Objects/listobject.o \ |
| 258 | Objects/longobject.o \ |
| 259 | Objects/dictobject.o \ |
| 260 | Objects/methodobject.o \ |
| 261 | Objects/moduleobject.o \ |
| 262 | Objects/object.o \ |
| 263 | Objects/rangeobject.o \ |
| 264 | Objects/sliceobject.o \ |
| 265 | Objects/stringobject.o \ |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 266 | Objects/structseq.o \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 267 | Objects/tupleobject.o \ |
| 268 | Objects/typeobject.o \ |
Fred Drake | 502ed82 | 2001-10-05 21:56:02 +0000 | [diff] [blame] | 269 | Objects/weakrefobject.o \ |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 270 | $(UNICODE_OBJS) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 271 | |
| 272 | |
| 273 | ########################################################################## |
| 274 | # objects that get linked into the Python library |
| 275 | LIBRARY_OBJS= \ |
Neil Schemenauer | 1882182 | 2001-01-27 21:42:38 +0000 | [diff] [blame] | 276 | Modules/getbuildinfo.o \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 277 | $(PARSER_OBJS) \ |
| 278 | $(OBJECT_OBJS) \ |
| 279 | $(PYTHON_OBJS) \ |
| 280 | $(MODULE_OBJS) \ |
| 281 | $(SIGNAL_OBJS) \ |
| 282 | $(MODOBJS) |
| 283 | |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 284 | ######################################################################### |
| 285 | # Rules |
| 286 | |
| 287 | # Default target |
Guido van Rossum | 7cb32ae | 2001-08-17 15:32:31 +0000 | [diff] [blame] | 288 | all: $(PYTHON) oldsharedmods sharedmods |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 289 | |
| 290 | # Build the interpreter |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 291 | $(PYTHON): Modules/$(MAINOBJ) $(LDLIBRARY) |
| 292 | $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \ |
| 293 | Modules/$(MAINOBJ) \ |
Jack Jansen | b6e9cad | 2001-08-15 01:26:28 +0000 | [diff] [blame] | 294 | $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 295 | |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 296 | platform: $(PYTHON) |
Neil Schemenauer | 7d4bb9f | 2001-07-23 16:30:27 +0000 | [diff] [blame] | 297 | ./$(PYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 298 | |
| 299 | |
| 300 | # Build the shared modules |
| 301 | sharedmods: $(PYTHON) |
Guido van Rossum | 1140cb2 | 2001-09-12 18:59:25 +0000 | [diff] [blame] | 302 | case $$MAKEFLAGS in \ |
Guido van Rossum | 67b2659 | 2001-10-20 14:21:45 +0000 | [diff] [blame] | 303 | *-s*) CC='$(CC)' LDSHARED='$(LDSHARED)' OPT='$(OPT)' ./$(PYTHON) -E $(srcdir)/setup.py -q build;; \ |
| 304 | *) CC='$(CC)' LDSHARED='$(LDSHARED)' OPT='$(OPT)' ./$(PYTHON) -E $(srcdir)/setup.py build;; \ |
Guido van Rossum | 1140cb2 | 2001-09-12 18:59:25 +0000 | [diff] [blame] | 305 | esac |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 306 | |
Neil Schemenauer | 1882182 | 2001-01-27 21:42:38 +0000 | [diff] [blame] | 307 | # buildno should really depend on something like LIBRARY_SRC |
| 308 | buildno: $(PARSER_OBJS) \ |
| 309 | $(OBJECT_OBJS) \ |
| 310 | $(PYTHON_OBJS) \ |
| 311 | $(MODULE_OBJS) \ |
| 312 | $(SIGNAL_OBJS) \ |
| 313 | $(MODOBJS) \ |
| 314 | $(srcdir)/Modules/getbuildinfo.c |
| 315 | if test -f buildno; then \ |
| 316 | expr `cat buildno` + 1 >buildno1; \ |
| 317 | mv -f buildno1 buildno; \ |
| 318 | else echo 1 >buildno; fi |
| 319 | |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 320 | # Build static library |
Guido van Rossum | 4e6a7a6 | 2001-04-09 22:23:22 +0000 | [diff] [blame] | 321 | # avoid long command lines, same as LIBRARY_OBJS |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 322 | $(LIBRARY): $(LIBRARY_OBJS) |
| 323 | -rm -f $@ |
Neil Schemenauer | 1882182 | 2001-01-27 21:42:38 +0000 | [diff] [blame] | 324 | $(AR) cr $@ Modules/getbuildinfo.o |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 325 | $(AR) cr $@ $(PARSER_OBJS) |
| 326 | $(AR) cr $@ $(OBJECT_OBJS) |
| 327 | $(AR) cr $@ $(PYTHON_OBJS) |
| 328 | $(AR) cr $@ $(MODULE_OBJS) $(SIGNAL_OBJS) |
| 329 | $(AR) cr $@ $(MODOBJS) |
| 330 | $(RANLIB) $@ |
| 331 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 332 | # This rule is only here for DG/UX and BeOS!!! |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 333 | libpython$(VERSION).so: $(LIBRARY) |
| 334 | case `uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'` in \ |
| 335 | *dgux*) \ |
| 336 | test -d dgux || mkdir dgux; \ |
| 337 | (cd dgux;ar x ../$^;ld -G -o ../$@ * ); \ |
| 338 | /bin/rm -rf ./dgux \ |
| 339 | ;; \ |
| 340 | beos) \ |
Neil Schemenauer | 75e3389 | 2001-02-16 03:36:53 +0000 | [diff] [blame] | 341 | $(AR) so $(LIBRARY) $@ \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 342 | ;; \ |
| 343 | esac |
| 344 | |
| 345 | # This rule is here for OPENSTEP/Rhapsody/MacOSX |
Jack Jansen | b6e9cad | 2001-08-15 01:26:28 +0000 | [diff] [blame] | 346 | $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): $(LIBRARY) $(PYTHONFRAMEWORKDIR) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 347 | libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) \ |
Guido van Rossum | 7cb32ae | 2001-08-17 15:32:31 +0000 | [diff] [blame] | 348 | -framework System @LIBTOOL_CRUFT@ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 349 | |
| 350 | # This rule builds the Cygwin Python DLL |
| 351 | libpython$(VERSION).dll.a: $(LIBRARY_OBJS) |
| 352 | dlltool --export-all --output-def $@ $^ |
| 353 | $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \ |
| 354 | $(LIBS) $(MODLIBS) $(SYSLIBS) |
| 355 | |
| 356 | |
| 357 | oldsharedmods: $(SHAREDMODS) |
| 358 | |
| 359 | |
| 360 | Makefile Modules/config.c: Makefile.pre \ |
| 361 | $(srcdir)/Modules/config.c.in \ |
| 362 | $(MAKESETUP) \ |
| 363 | Modules/Setup.config \ |
| 364 | Modules/Setup \ |
| 365 | Modules/Setup.local |
| 366 | $(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \ |
| 367 | -s Modules \ |
| 368 | Modules/Setup.config \ |
| 369 | Modules/Setup.local \ |
| 370 | Modules/Setup |
| 371 | @mv config.c Modules |
| 372 | @echo "The Makefile was updated, you may need to re-run make." |
| 373 | |
| 374 | |
| 375 | Modules/Setup: $(srcdir)/Modules/Setup.dist |
| 376 | @if test -f Modules/Setup; then \ |
| 377 | echo "-----------------------------------------------"; \ |
| 378 | echo "Modules/Setup.dist is newer than Modules/Setup;"; \ |
| 379 | echo "check to make sure you have all the updates you"; \ |
| 380 | echo "need in your Modules/Setup file."; \ |
Guido van Rossum | bb29b9c | 2001-09-29 00:42:19 +0000 | [diff] [blame] | 381 | echo "Usually, copying Setup.dist to Setup will work."; \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 382 | echo "-----------------------------------------------"; \ |
Neil Schemenauer | 7ac954b | 2001-01-26 16:14:41 +0000 | [diff] [blame] | 383 | fi |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 384 | |
| 385 | ############################################################################ |
| 386 | # Special rules for object files |
| 387 | |
| 388 | Modules/getbuildinfo.o: $(srcdir)/Modules/getbuildinfo.c buildno |
Sjoerd Mullender | 30be870 | 2001-01-29 09:39:14 +0000 | [diff] [blame] | 389 | $(CC) -c $(PY_CFLAGS) -DBUILD=`cat buildno` -o $@ $(srcdir)/Modules/getbuildinfo.c |
Andrew M. Kuchling | 03184e2 | 2001-01-26 22:52:45 +0000 | [diff] [blame] | 390 | |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 391 | Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile |
Neil Schemenauer | 7ac954b | 2001-01-26 16:14:41 +0000 | [diff] [blame] | 392 | $(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \ |
| 393 | -DPREFIX='"$(prefix)"' \ |
| 394 | -DEXEC_PREFIX='"$(exec_prefix)"' \ |
| 395 | -DVERSION='"$(VERSION)"' \ |
| 396 | -DVPATH='"$(VPATH)"' \ |
Sjoerd Mullender | 30be870 | 2001-01-29 09:39:14 +0000 | [diff] [blame] | 397 | -o $@ $(srcdir)/Modules/getpath.c |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 398 | |
Sjoerd Mullender | 30be870 | 2001-01-29 09:39:14 +0000 | [diff] [blame] | 399 | Modules/ccpython.o: $(srcdir)/Modules/ccpython.cc |
| 400 | $(CXX) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/ccpython.cc |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 401 | |
| 402 | |
| 403 | $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) |
Neil Schemenauer | 7cd124c | 2001-02-27 02:19:16 +0000 | [diff] [blame] | 404 | -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 405 | |
| 406 | $(PGEN): $(PGENOBJS) |
| 407 | $(CC) $(OPT) $(PGENOBJS) $(LIBS) -o $(PGEN) |
| 408 | |
| 409 | Parser/grammar.o: $(srcdir)/Parser/grammar.c \ |
| 410 | $(srcdir)/Parser/assert.h \ |
| 411 | $(srcdir)/Include/token.h \ |
| 412 | $(srcdir)/Include/grammar.h |
| 413 | Parser/metagrammar.o: $(srcdir)/Parser/metagrammar.c |
| 414 | |
| 415 | |
Neil Schemenauer | 4041774 | 2001-02-27 02:45:36 +0000 | [diff] [blame] | 416 | Python/compile.o Python/symtable.o: $(GRAMMAR_H) |
| 417 | |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 418 | Python/getplatform.o: $(srcdir)/Python/getplatform.c |
Neil Schemenauer | 89e90d6 | 2001-06-02 06:16:02 +0000 | [diff] [blame] | 419 | $(CC) -c $(CFLAGS) $(CPPFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 420 | |
| 421 | Python/importdl.o: $(srcdir)/Python/importdl.c |
Neil Schemenauer | 89e90d6 | 2001-06-02 06:16:02 +0000 | [diff] [blame] | 422 | $(CC) -c $(CFLAGS) $(CPPFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 423 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 424 | Objects/object.o: $(srcdir)/Objects/object.c $(srcdir)/Objects/obmalloc.c |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 425 | |
| 426 | Objects/unicodectype.o: $(srcdir)/Objects/unicodectype.c \ |
| 427 | $(srcdir)/Objects/unicodetype_db.h |
| 428 | |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 429 | ############################################################################ |
| 430 | # Header files |
| 431 | |
Neil Schemenauer | f65e500 | 2001-01-25 20:07:50 +0000 | [diff] [blame] | 432 | PYTHON_HEADERS= \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 433 | Include/Python.h \ |
Guido van Rossum | 427ce80 | 2001-09-18 02:40:21 +0000 | [diff] [blame] | 434 | Include/abstract.h \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 435 | Include/bufferobject.h \ |
Guido van Rossum | 427ce80 | 2001-09-18 02:40:21 +0000 | [diff] [blame] | 436 | Include/ceval.h \ |
| 437 | Include/classobject.h \ |
| 438 | Include/cobject.h \ |
| 439 | Include/codecs.h \ |
| 440 | Include/compile.h \ |
| 441 | Include/complexobject.h \ |
Tim Peters | 6d6c1a3 | 2001-08-02 04:15:00 +0000 | [diff] [blame] | 442 | Include/descrobject.h \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 443 | Include/dictobject.h \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 444 | Include/fileobject.h \ |
Guido van Rossum | 427ce80 | 2001-09-18 02:40:21 +0000 | [diff] [blame] | 445 | Include/floatobject.h \ |
| 446 | Include/funcobject.h \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 447 | Include/import.h \ |
Guido van Rossum | 427ce80 | 2001-09-18 02:40:21 +0000 | [diff] [blame] | 448 | Include/intobject.h \ |
| 449 | Include/intrcheck.h \ |
| 450 | Include/iterobject.h \ |
| 451 | Include/listobject.h \ |
| 452 | Include/longobject.h \ |
| 453 | Include/methodobject.h \ |
| 454 | Include/modsupport.h \ |
| 455 | Include/moduleobject.h \ |
| 456 | Include/object.h \ |
| 457 | Include/objimpl.h \ |
| 458 | Include/patchlevel.h \ |
| 459 | Include/pydebug.h \ |
| 460 | Include/pyerrors.h \ |
| 461 | Include/pyfpe.h \ |
| 462 | Include/pymem.h \ |
| 463 | Include/pyport.h \ |
| 464 | Include/pystate.h \ |
| 465 | Include/pythonrun.h \ |
| 466 | Include/rangeobject.h \ |
| 467 | Include/sliceobject.h \ |
| 468 | Include/stringobject.h \ |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 469 | Include/structseq.h \ |
Guido van Rossum | 427ce80 | 2001-09-18 02:40:21 +0000 | [diff] [blame] | 470 | Include/structmember.h \ |
| 471 | Include/symtable.h \ |
| 472 | Include/sysmodule.h \ |
| 473 | Include/traceback.h \ |
| 474 | Include/tupleobject.h \ |
| 475 | Include/unicodeobject.h \ |
Fred Drake | 502ed82 | 2001-10-05 21:56:02 +0000 | [diff] [blame] | 476 | Include/weakrefobject.h \ |
Guido van Rossum | 427ce80 | 2001-09-18 02:40:21 +0000 | [diff] [blame] | 477 | pyconfig.h |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 478 | |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 479 | $(LIBRARY_OBJS) $(MODOBJS) Modules/$(MAINOBJ): $(PYTHON_HEADERS) |
Neil Schemenauer | f65e500 | 2001-01-25 20:07:50 +0000 | [diff] [blame] | 480 | |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 481 | |
| 482 | ###################################################################### |
| 483 | |
| 484 | # Test the interpreter (twice, once without .pyc files, once with) |
| 485 | TESTOPTS= -l |
| 486 | TESTPROG= $(srcdir)/Lib/test/regrtest.py |
Neil Schemenauer | 7d4bb9f | 2001-07-23 16:30:27 +0000 | [diff] [blame] | 487 | TESTPYTHON= ./$(PYTHON) -E -tt |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 488 | test: all platform |
Guido van Rossum | cd81ea1 | 2001-03-01 00:36:53 +0000 | [diff] [blame] | 489 | -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f |
Neil Schemenauer | 7d4bb9f | 2001-07-23 16:30:27 +0000 | [diff] [blame] | 490 | -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) |
| 491 | $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 492 | |
Jeremy Hylton | 2a850d9 | 2001-02-01 19:51:28 +0000 | [diff] [blame] | 493 | QUICKTESTOPTS= $(TESTOPTS) -x test_thread test_signal test_strftime \ |
Fred Drake | 042f313 | 2001-02-02 03:03:33 +0000 | [diff] [blame] | 494 | test_unicodedata test_re test_sre test_select test_poll \ |
Jeremy Hylton | 26d1f14 | 2001-02-02 18:12:16 +0000 | [diff] [blame] | 495 | test_linuxaudiodev test_sunaudiodev |
Jeremy Hylton | 2a850d9 | 2001-02-01 19:51:28 +0000 | [diff] [blame] | 496 | quicktest: all platform |
Guido van Rossum | cd81ea1 | 2001-03-01 00:36:53 +0000 | [diff] [blame] | 497 | -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f |
Neil Schemenauer | 7d4bb9f | 2001-07-23 16:30:27 +0000 | [diff] [blame] | 498 | -$(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS) |
| 499 | $(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS) |
Jeremy Hylton | 2a850d9 | 2001-02-01 19:51:28 +0000 | [diff] [blame] | 500 | |
Barry Warsaw | 4211925 | 2001-03-03 04:14:21 +0000 | [diff] [blame] | 501 | MEMTESTOPTS= $(QUICKTESTOPTS) -x test_dl test___all__ test_fork1 \ |
| 502 | test_longexp |
| 503 | memtest: all platform |
| 504 | -rm -f $(srcdir)/Lib/test/*.py[co] |
Neil Schemenauer | 7d4bb9f | 2001-07-23 16:30:27 +0000 | [diff] [blame] | 505 | -$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS) |
| 506 | $(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS) |
Barry Warsaw | 4211925 | 2001-03-03 04:14:21 +0000 | [diff] [blame] | 507 | |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 508 | # Install everything |
| 509 | install: altinstall bininstall maninstall |
| 510 | |
| 511 | # Install almost everything without disturbing previous versions |
Andrew M. Kuchling | bddd878 | 2001-01-29 20:18:59 +0000 | [diff] [blame] | 512 | altinstall: altbininstall libinstall inclinstall libainstall \ |
Guido van Rossum | 7cb32ae | 2001-08-17 15:32:31 +0000 | [diff] [blame] | 513 | sharedinstall oldsharedinstall |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 514 | |
| 515 | # Install shared libraries enabled by Setup |
| 516 | DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED) |
| 517 | |
| 518 | oldsharedinstall: $(DESTSHARED) $(SHAREDMODS) |
| 519 | @for i in X $(SHAREDMODS); do \ |
Neil Schemenauer | ac95977 | 2001-02-06 14:50:27 +0000 | [diff] [blame] | 520 | if test $$i != X; then \ |
| 521 | echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \ |
| 522 | $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \ |
| 523 | fi; \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 524 | done |
| 525 | |
Guido van Rossum | 7cb32ae | 2001-08-17 15:32:31 +0000 | [diff] [blame] | 526 | $(DESTSHARED): |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 527 | @for i in $(DESTDIRS); \ |
| 528 | do \ |
| 529 | if test ! -d $$i; then \ |
| 530 | echo "Creating directory $$i"; \ |
Neil Schemenauer | 8d3274e | 2001-02-10 20:07:38 +0000 | [diff] [blame] | 531 | $(INSTALL) -d -m $(DIRMODE) $$i; \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 532 | else true; \ |
| 533 | fi; \ |
| 534 | done |
| 535 | |
| 536 | |
| 537 | # Install the interpreter (by creating a hard link to python$(VERSION)) |
| 538 | bininstall: altbininstall |
| 539 | -if test -f $(BINDIR)/$(PYTHON); \ |
| 540 | then rm -f $(BINDIR)/$(PYTHON); \ |
| 541 | else true; \ |
| 542 | fi |
Neil Schemenauer | cf9926c | 2001-02-27 18:50:56 +0000 | [diff] [blame] | 543 | (cd $(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 544 | |
| 545 | # Install the interpreter with $(VERSION) affixed |
| 546 | # This goes into $(exec_prefix) |
| 547 | altbininstall: $(PYTHON) |
| 548 | @for i in $(BINDIR); \ |
| 549 | do \ |
| 550 | if test ! -d $$i; then \ |
| 551 | echo "Creating directory $$i"; \ |
Neil Schemenauer | 8d3274e | 2001-02-10 20:07:38 +0000 | [diff] [blame] | 552 | $(INSTALL) -d -m $(DIRMODE) $$i; \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 553 | else true; \ |
| 554 | fi; \ |
| 555 | done |
Neil Schemenauer | cf9926c | 2001-02-27 18:50:56 +0000 | [diff] [blame] | 556 | $(INSTALL_PROGRAM) $(PYTHON) $(BINDIR)/python$(VERSION)$(EXE) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 557 | if test -f libpython$(VERSION).so; then \ |
| 558 | $(INSTALL_DATA) libpython$(VERSION).so $(LIBDIR); \ |
| 559 | else true; \ |
| 560 | fi |
| 561 | if test -f "$(DLLLIBRARY)"; then \ |
Neil Schemenauer | cf20d4f | 2001-03-16 11:50:43 +0000 | [diff] [blame] | 562 | $(INSTALL_SHARED) $(DLLLIBRARY) $(BINDIR); \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 563 | else true; \ |
| 564 | fi |
| 565 | |
| 566 | # Install the manual page |
| 567 | maninstall: |
| 568 | @for i in $(MANDIR) $(MANDIR)/man1; \ |
| 569 | do \ |
| 570 | if test ! -d $$i; then \ |
| 571 | echo "Creating directory $$i"; \ |
Neil Schemenauer | 8d3274e | 2001-02-10 20:07:38 +0000 | [diff] [blame] | 572 | $(INSTALL) -d -m $(DIRMODE) $$i; \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 573 | else true; \ |
| 574 | fi; \ |
| 575 | done |
| 576 | $(INSTALL_DATA) $(srcdir)/Misc/python.man \ |
| 577 | $(MANDIR)/man1/python.1 |
| 578 | |
| 579 | # Install the library |
| 580 | PLATDIR= plat-$(MACHDEP) |
| 581 | MACHDEPS= $(PLATDIR) |
| 582 | XMLLIBSUBDIRS= xml xml/dom xml/parsers xml/sax |
| 583 | LIBSUBDIRS= lib-old lib-tk site-packages test test/output encodings \ |
Andrew M. Kuchling | 76d62b4 | 2001-09-28 20:29:15 +0000 | [diff] [blame] | 584 | email compiler \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 585 | distutils distutils/command $(XMLLIBSUBDIRS) curses $(MACHDEPS) |
Neil Schemenauer | cf9926c | 2001-02-27 18:50:56 +0000 | [diff] [blame] | 586 | libinstall: $(PYTHON) $(srcdir)/Lib/$(PLATDIR) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 587 | @for i in $(SCRIPTDIR) $(LIBDEST); \ |
| 588 | do \ |
| 589 | if test ! -d $$i; then \ |
| 590 | echo "Creating directory $$i"; \ |
Neil Schemenauer | 8d3274e | 2001-02-10 20:07:38 +0000 | [diff] [blame] | 591 | $(INSTALL) -d -m $(DIRMODE) $$i; \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 592 | else true; \ |
| 593 | fi; \ |
| 594 | done |
| 595 | @for d in $(LIBSUBDIRS); \ |
| 596 | do \ |
| 597 | a=$(srcdir)/Lib/$$d; \ |
| 598 | if test ! -d $$a; then continue; else true; fi; \ |
| 599 | b=$(LIBDEST)/$$d; \ |
| 600 | if test ! -d $$b; then \ |
| 601 | echo "Creating directory $$b"; \ |
Neil Schemenauer | 8d3274e | 2001-02-10 20:07:38 +0000 | [diff] [blame] | 602 | $(INSTALL) -d -m $(DIRMODE) $$b; \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 603 | else true; \ |
| 604 | fi; \ |
| 605 | done |
| 606 | @for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc; \ |
| 607 | do \ |
| 608 | if test -x $$i; then \ |
Neil Schemenauer | 3f5cc20 | 2001-04-10 23:03:35 +0000 | [diff] [blame] | 609 | $(INSTALL_SCRIPT) $$i $(LIBDEST); \ |
| 610 | echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 611 | else \ |
| 612 | $(INSTALL_DATA) $$i $(LIBDEST); \ |
| 613 | echo $(INSTALL_DATA) $$i $(LIBDEST); \ |
| 614 | fi; \ |
| 615 | done |
| 616 | @for d in $(LIBSUBDIRS); \ |
| 617 | do \ |
| 618 | a=$(srcdir)/Lib/$$d; \ |
| 619 | if test ! -d $$a; then continue; else true; fi; \ |
| 620 | b=$(LIBDEST)/$$d; \ |
| 621 | for i in $$a/*; \ |
| 622 | do \ |
| 623 | case $$i in \ |
| 624 | *CVS) ;; \ |
| 625 | *.py[co]) ;; \ |
| 626 | *.orig) ;; \ |
| 627 | *~) ;; \ |
| 628 | *) \ |
| 629 | if test -d $$i; then continue; fi; \ |
| 630 | if test -x $$i; then \ |
Neil Schemenauer | 3f5cc20 | 2001-04-10 23:03:35 +0000 | [diff] [blame] | 631 | echo $(INSTALL_SCRIPT) $$i $$b; \ |
| 632 | $(INSTALL_SCRIPT) $$i $$b; \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 633 | else \ |
| 634 | echo $(INSTALL_DATA) $$i $$b; \ |
| 635 | $(INSTALL_DATA) $$i $$b; \ |
| 636 | fi;; \ |
| 637 | esac; \ |
| 638 | done; \ |
| 639 | done |
| 640 | $(INSTALL_DATA) $(srcdir)/LICENSE $(LIBDEST)/LICENSE.txt |
| 641 | PYTHONPATH=$(LIBDEST) \ |
Jeremy Hylton | 12b6457 | 2001-04-18 01:20:21 +0000 | [diff] [blame] | 642 | ./$(PYTHON) -tt $(LIBDEST)/compileall.py -x badsyntax \ |
| 643 | $(LIBDEST) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 644 | PYTHONPATH=$(LIBDEST) \ |
Jeremy Hylton | 12b6457 | 2001-04-18 01:20:21 +0000 | [diff] [blame] | 645 | ./$(PYTHON) -O $(LIBDEST)/compileall.py -x badsyntax $(LIBDEST) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 646 | |
| 647 | # Create the PLATDIR source directory, if one wasn't distributed.. |
| 648 | $(srcdir)/Lib/$(PLATDIR): |
| 649 | mkdir $(srcdir)/Lib/$(PLATDIR) |
| 650 | cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen |
| 651 | export PATH; PATH="`pwd`:$$PATH"; \ |
| 652 | export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \ |
Jack Jansen | b6e9cad | 2001-08-15 01:26:28 +0000 | [diff] [blame] | 653 | export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \ |
Neil Schemenauer | cf9926c | 2001-02-27 18:50:56 +0000 | [diff] [blame] | 654 | export EXE; EXE="$(EXE)"; \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 655 | cd $(srcdir)/Lib/$(PLATDIR); ./regen |
| 656 | |
| 657 | # Install the include files |
| 658 | INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY) |
| 659 | inclinstall: |
| 660 | @for i in $(INCLDIRSTOMAKE); \ |
| 661 | do \ |
| 662 | if test ! -d $$i; then \ |
| 663 | echo "Creating directory $$i"; \ |
Neil Schemenauer | 8d3274e | 2001-02-10 20:07:38 +0000 | [diff] [blame] | 664 | $(INSTALL) -d -m $(DIRMODE) $$i; \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 665 | else true; \ |
| 666 | fi; \ |
| 667 | done |
| 668 | @for i in $(srcdir)/Include/*.h; \ |
| 669 | do \ |
| 670 | echo $(INSTALL_DATA) $$i $(INCLUDEPY); \ |
| 671 | $(INSTALL_DATA) $$i $(INCLUDEPY); \ |
| 672 | done |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 673 | $(INSTALL_DATA) pyconfig.h $(CONFINCLUDEPY)/pyconfig.h |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 674 | |
| 675 | # Install the library and miscellaneous stuff needed for extending/embedding |
| 676 | # This goes into $(exec_prefix) |
| 677 | LIBPL= $(LIBP)/config |
| 678 | libainstall: all |
| 679 | @for i in $(LIBDIR) $(LIBP) $(LIBPL); \ |
| 680 | do \ |
| 681 | if test ! -d $$i; then \ |
| 682 | echo "Creating directory $$i"; \ |
Neil Schemenauer | 8d3274e | 2001-02-10 20:07:38 +0000 | [diff] [blame] | 683 | $(INSTALL) -d -m $(DIRMODE) $$i; \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 684 | else true; \ |
| 685 | fi; \ |
| 686 | done |
| 687 | @if test -d $(LDLIBRARY); then :; else \ |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 688 | if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ |
Jack Jansen | b6e9cad | 2001-08-15 01:26:28 +0000 | [diff] [blame] | 689 | $(INSTALL_DATA) $(LDLIBRARY) $(LIBPL)/$(LDLIBRARY) ; \ |
| 690 | $(RANLIB) $(LIBPL)/$(LDLIBRARY) ; \ |
| 691 | else \ |
| 692 | echo Skip install of $(LDLIBRARY) - use make frameworkinstall; \ |
| 693 | fi; \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 694 | fi |
| 695 | $(INSTALL_DATA) Modules/config.c $(LIBPL)/config.c |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 696 | $(INSTALL_DATA) Modules/$(MAINOBJ) $(LIBPL)/$(MAINOBJ) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 697 | $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(LIBPL)/config.c.in |
| 698 | $(INSTALL_DATA) Makefile $(LIBPL)/Makefile |
| 699 | $(INSTALL_DATA) Modules/Setup $(LIBPL)/Setup |
| 700 | $(INSTALL_DATA) Modules/Setup.local $(LIBPL)/Setup.local |
| 701 | $(INSTALL_DATA) Modules/Setup.config $(LIBPL)/Setup.config |
Neil Schemenauer | 3f5cc20 | 2001-04-10 23:03:35 +0000 | [diff] [blame] | 702 | $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(LIBPL)/makesetup |
| 703 | $(INSTALL_SCRIPT) $(srcdir)/install-sh $(LIBPL)/install-sh |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 704 | @if [ -s Modules/python.exp -a \ |
| 705 | "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \ |
| 706 | echo; echo "Installing support files for building shared extension modules on AIX:"; \ |
| 707 | $(INSTALL_DATA) Modules/python.exp \ |
| 708 | $(LIBPL)/python.exp; \ |
| 709 | echo; echo "$(LIBPL)/python.exp"; \ |
Neil Schemenauer | 3f5cc20 | 2001-04-10 23:03:35 +0000 | [diff] [blame] | 710 | $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 711 | $(LIBPL)/makexp_aix; \ |
| 712 | echo "$(LIBPL)/makexp_aix"; \ |
Neil Schemenauer | 3f5cc20 | 2001-04-10 23:03:35 +0000 | [diff] [blame] | 713 | $(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 714 | $(LIBPL)/ld_so_aix; \ |
| 715 | echo "$(LIBPL)/ld_so_aix"; \ |
| 716 | echo; echo "See Misc/AIX-NOTES for details."; \ |
| 717 | else true; \ |
| 718 | fi |
| 719 | @case "$(MACHDEP)" in beos*) \ |
| 720 | echo; echo "Installing support files for building shared extension modules on BeOS:"; \ |
Neil Schemenauer | 75e3389 | 2001-02-16 03:36:53 +0000 | [diff] [blame] | 721 | $(INSTALL_DATA) Misc/BeOS-NOTES $(LIBPL)/README; \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 722 | echo; echo "$(LIBPL)/README"; \ |
Neil Schemenauer | 3f5cc20 | 2001-04-10 23:03:35 +0000 | [diff] [blame] | 723 | $(INSTALL_SCRIPT) Modules/ar_beos $(LIBPL)/ar_beos; \ |
Neil Schemenauer | 75e3389 | 2001-02-16 03:36:53 +0000 | [diff] [blame] | 724 | echo "$(LIBPL)/ar_beos"; \ |
Neil Schemenauer | 3f5cc20 | 2001-04-10 23:03:35 +0000 | [diff] [blame] | 725 | $(INSTALL_SCRIPT) Modules/ld_so_beos $(LIBPL)/ld_so_beos; \ |
Neil Schemenauer | 75e3389 | 2001-02-16 03:36:53 +0000 | [diff] [blame] | 726 | echo "$(LIBPL)/ld_so_beos"; \ |
| 727 | echo; echo "See Misc/BeOS-NOTES for details."; \ |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 728 | ;; \ |
| 729 | esac |
| 730 | |
| 731 | # Install the dynamically loadable modules |
| 732 | # This goes into $(exec_prefix) |
| 733 | sharedinstall: |
Neil Schemenauer | 7d4bb9f | 2001-07-23 16:30:27 +0000 | [diff] [blame] | 734 | ./$(PYTHON) -E $(srcdir)/setup.py install \ |
Guido van Rossum | b33e789 | 2001-10-17 06:26:53 +0000 | [diff] [blame] | 735 | --install-scripts=$(BINDIR) \ |
Andrew M. Kuchling | 03184e2 | 2001-01-26 22:52:45 +0000 | [diff] [blame] | 736 | --install-platlib=$(DESTSHARED) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 737 | |
Jack Jansen | b6e9cad | 2001-08-15 01:26:28 +0000 | [diff] [blame] | 738 | # Install a MacOSX framework During build (before |
| 739 | # setup.py), make a minimal Python.framework directory structure in the build |
| 740 | # directory. This framework is minimal, it doesn't contain the Lib directory |
| 741 | # and such, but together with some magic in Modules/getpath.c it is good enough |
| 742 | # to run python from the install dir. |
| 743 | |
| 744 | FRAMEWORKDEST=$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION) |
| 745 | RESSRCDIR=$(srcdir)/Mac/OSXResources/framework |
| 746 | $(PYTHONFRAMEWORKDIR): $(RESSRCDIR)/Info.plist \ |
| 747 | $(RESSRCDIR)/version.plist \ |
| 748 | $(RESSRCDIR)/English.lproj/InfoPlist.strings |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 749 | @if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ |
Jack Jansen | b6e9cad | 2001-08-15 01:26:28 +0000 | [diff] [blame] | 750 | echo Not configured with --enable-framework; \ |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 751 | exit 1; \ |
Jack Jansen | b6e9cad | 2001-08-15 01:26:28 +0000 | [diff] [blame] | 752 | else true; \ |
| 753 | fi |
| 754 | $(INSTALL) -d -m $(DIRMODE) $(FRAMEWORKDEST)/Resources/English.lproj |
| 755 | $(INSTALL_DATA) $(RESSRCDIR)/Info.plist $(FRAMEWORKDEST)/Resources/Info.plist |
| 756 | $(INSTALL_DATA) $(RESSRCDIR)/version.plist $(FRAMEWORKDEST)/Resources/version.plist |
| 757 | $(INSTALL_DATA) $(RESSRCDIR)/English.lproj/InfoPlist.strings \ |
| 758 | $(FRAMEWORKDEST)/Resources/English.lproj/InfoPlist.strings |
| 759 | $(LN) -fs $(VERSION) $(PYTHONFRAMEWORKDIR)/Versions/Current |
| 760 | $(LN) -fs Versions/Current/Python $(PYTHONFRAMEWORKDIR)/Python |
| 761 | $(LN) -fs Versions/Current/Headers $(PYTHONFRAMEWORKDIR)/Headers |
| 762 | $(LN) -fs Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources |
Guido van Rossum | 7cb32ae | 2001-08-17 15:32:31 +0000 | [diff] [blame] | 763 | |
Jack Jansen | b6e9cad | 2001-08-15 01:26:28 +0000 | [diff] [blame] | 764 | # On install, we re-make the framework |
| 765 | # structure in the install location, /Library/Frameworks/ or the argument to |
| 766 | # --enable-framework. If --enable-framework has been specified then we have |
| 767 | # automatically set prefix to the location deep down in the framework, so we |
| 768 | # only have to cater for the structural bits of the framework. |
| 769 | |
| 770 | frameworkinstall: install frameworkinfrastructureinstall |
| 771 | FRAMEWORKFINALDEST=$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION) |
| 772 | frameworkinfrastructureinstall: $(LDLIBRARY) |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 773 | @if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ |
Jack Jansen | b6e9cad | 2001-08-15 01:26:28 +0000 | [diff] [blame] | 774 | echo Not configured with --enable-framework; \ |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 775 | exit 1; \ |
Jack Jansen | b6e9cad | 2001-08-15 01:26:28 +0000 | [diff] [blame] | 776 | else true; \ |
| 777 | fi |
| 778 | @for i in $(FRAMEWORKFINALDEST)/Resources/English.lproj $(FRAMEWORKFINALDEST)/lib; do\ |
| 779 | if test ! -d $$i; then \ |
| 780 | echo "Creating directory $$i"; \ |
| 781 | $(INSTALL) -d -m $(DIRMODE) $$i; \ |
| 782 | else true; \ |
| 783 | fi; \ |
| 784 | done |
Jack Jansen | a8278cc | 2001-08-17 22:37:02 +0000 | [diff] [blame] | 785 | $(LN) -sf $(INCLUDEPY) $(FRAMEWORKFINALDEST)/Headers |
Jack Jansen | b6e9cad | 2001-08-15 01:26:28 +0000 | [diff] [blame] | 786 | $(INSTALL_DATA) $(RESSRCDIR)/Info.plist $(FRAMEWORKFINALDEST)/Resources/Info.plist |
| 787 | $(INSTALL_DATA) $(RESSRCDIR)/version.plist $(FRAMEWORKFINALDEST)/Resources/version.plist |
| 788 | $(INSTALL_DATA) $(RESSRCDIR)/English.lproj/InfoPlist.strings \ |
| 789 | $(FRAMEWORKFINALDEST)/Resources/English.lproj/InfoPlist.strings |
| 790 | $(LN) -fs $(VERSION) $(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current |
| 791 | $(LN) -fs Versions/Current/Python $(PYTHONFRAMEWORKINSTALLDIR)/Python |
| 792 | $(LN) -fs Versions/Current/Headers $(PYTHONFRAMEWORKINSTALLDIR)/Headers |
| 793 | $(LN) -fs Versions/Current/Resources $(PYTHONFRAMEWORKINSTALLDIR)/Resources |
| 794 | $(INSTALL_DATA) $(LDLIBRARY) $(PYTHONFRAMEWORKPREFIX)/$(LDLIBRARY) |
Guido van Rossum | 7cb32ae | 2001-08-17 15:32:31 +0000 | [diff] [blame] | 795 | |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 796 | # Build the toplevel Makefile |
| 797 | Makefile.pre: Makefile.pre.in config.status |
| 798 | CONFIG_FILES=Makefile.pre CONFIG_HEADERS= $(SHELL) config.status |
| 799 | $(MAKE) -f Makefile.pre Makefile |
| 800 | |
Neil Schemenauer | 64b1b68 | 2001-03-22 00:32:32 +0000 | [diff] [blame] | 801 | # Run the configure script. |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 802 | config.status: $(srcdir)/configure |
Neil Schemenauer | 64b1b68 | 2001-03-22 00:32:32 +0000 | [diff] [blame] | 803 | $(SHELL) $(srcdir)/configure $(CONFIG_ARGS) |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 804 | |
| 805 | .PRECIOUS: config.status $(PYTHON) Makefile Makefile.pre |
| 806 | |
| 807 | # Some make's put the object file in the current directory |
| 808 | .c.o: |
Neil Schemenauer | 7ac954b | 2001-01-26 16:14:41 +0000 | [diff] [blame] | 809 | $(CC) -c $(PY_CFLAGS) -o $@ $< |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 810 | |
| 811 | # Rerun configure with the same options as it was run last time, |
| 812 | # provided the config.status script exists |
| 813 | recheck: |
| 814 | $(SHELL) config.status --recheck |
| 815 | $(SHELL) config.status |
| 816 | |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 817 | # Rebuild the configure script from configure.in; also rebuild pyconfig.h.in |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 818 | autoconf: |
| 819 | (cd $(srcdir); autoconf) |
| 820 | (cd $(srcdir); autoheader) |
| 821 | |
| 822 | # Create a tags file for vi |
| 823 | tags:: |
| 824 | cd $(srcdir); \ |
| 825 | ctags -w -t Include/*.h; \ |
| 826 | for i in $(SRCDIRS); do ctags -w -t -a $$i/*.[ch]; \ |
| 827 | done; \ |
| 828 | sort tags -o tags |
| 829 | |
| 830 | # Create a tags file for GNU Emacs |
| 831 | TAGS:: |
| 832 | cd $(srcdir); \ |
| 833 | etags Include/*.h; \ |
| 834 | for i in $(SRCDIRS); do etags -a $$i/*.[ch]; done |
| 835 | |
| 836 | # Sanitation targets -- clean leaves libraries, executables and tags |
| 837 | # files, which clobber removes those as well |
| 838 | |
| 839 | clean: |
Neil Schemenauer | c5cfcb4 | 2001-02-19 04:35:11 +0000 | [diff] [blame] | 840 | find . -name '*.o' -exec rm -f {} ';' |
Guido van Rossum | cd0ed97 | 2001-04-14 17:57:07 +0000 | [diff] [blame] | 841 | find . -name '*.s[ol]' -exec rm -f {} ';' |
Neil Schemenauer | e0d4357 | 2001-02-03 17:16:29 +0000 | [diff] [blame] | 842 | find $(srcdir) -name '*.py[co]' -exec rm -f {} ';' |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 843 | |
| 844 | clobber: clean |
Neil Schemenauer | c5cfcb4 | 2001-02-19 04:35:11 +0000 | [diff] [blame] | 845 | -rm -f $(PYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \ |
Guido van Rossum | cd0ed97 | 2001-04-14 17:57:07 +0000 | [diff] [blame] | 846 | tags TAGS \ |
Guido van Rossum | 7cb32ae | 2001-08-17 15:32:31 +0000 | [diff] [blame] | 847 | config.cache config.log pyconfig.h Modules/config.c |
Guido van Rossum | 1d88c59 | 2001-06-06 17:51:57 +0000 | [diff] [blame] | 848 | -rm -rf build platform |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 849 | |
| 850 | # Make things extra clean, before making a distribution: |
| 851 | # remove all generated files, even Makefile[.pre] |
| 852 | distclean: clobber |
Neil Schemenauer | e0d4357 | 2001-02-03 17:16:29 +0000 | [diff] [blame] | 853 | -rm -f core Makefile Makefile.pre buildno config.status \ |
Neil Schemenauer | 7ac954b | 2001-01-26 16:14:41 +0000 | [diff] [blame] | 854 | Modules/Setup Modules/Setup.local Modules/Setup.config |
Neil Schemenauer | e0d4357 | 2001-02-03 17:16:29 +0000 | [diff] [blame] | 855 | find $(srcdir) '(' -name '*.fdc' -o -name '*~' \ |
| 856 | -o -name '[@,#]*' -o -name '*.old' \ |
| 857 | -o -name '*.orig' -o -name '*.rej' \ |
| 858 | -o -name '*.bak' ')' \ |
| 859 | -exec rm -f {} ';' |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 860 | |
| 861 | # Check for smelly exported symbols (not starting with Py/_Py) |
| 862 | smelly: all |
| 863 | nm -p $(LIBRARY) | \ |
| 864 | sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \ |
| 865 | |
| 866 | # Find files with funny names |
| 867 | funny: |
| 868 | find $(DISTDIRS) -type d \ |
| 869 | -o -name '*.[chs]' \ |
| 870 | -o -name '*.py' \ |
| 871 | -o -name '*.doc' \ |
| 872 | -o -name '*.sty' \ |
| 873 | -o -name '*.bib' \ |
| 874 | -o -name '*.dat' \ |
| 875 | -o -name '*.el' \ |
| 876 | -o -name '*.fd' \ |
| 877 | -o -name '*.in' \ |
| 878 | -o -name '*.tex' \ |
| 879 | -o -name '*,[vpt]' \ |
| 880 | -o -name 'Setup' \ |
| 881 | -o -name 'Setup.*' \ |
| 882 | -o -name README \ |
| 883 | -o -name Makefile \ |
| 884 | -o -name ChangeLog \ |
| 885 | -o -name Repository \ |
| 886 | -o -name Root \ |
| 887 | -o -name Entries \ |
| 888 | -o -name Tag \ |
| 889 | -o -name tags \ |
| 890 | -o -name TAGS \ |
| 891 | -o -name .cvsignore \ |
| 892 | -o -name MANIFEST \ |
| 893 | -o -print |
| 894 | |
Guido van Rossum | 9454ad7 | 2001-08-18 21:08:22 +0000 | [diff] [blame] | 895 | # Dependencies |
| 896 | |
| 897 | Python/thread.o: $(srcdir)/Python/thread_*.h |
| 898 | |
Neil Schemenauer | 85515ad | 2001-01-24 17:11:43 +0000 | [diff] [blame] | 899 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |