Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 1 | ######################################################################## |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 2 | # Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
| 3 | # The Netherlands. |
| 4 | # |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 5 | # All Rights Reserved |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6 | # |
| 7 | # Permission to use, copy, modify, and distribute this software and its |
| 8 | # documentation for any purpose and without fee is hereby granted, |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 9 | # provided that the above copyright notice appear in all copies and that |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 10 | # both that copyright notice and this permission notice appear in |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 11 | # supporting documentation, and that the names of Stichting Mathematisch |
Guido van Rossum | d266eb4 | 1996-10-25 14:44:06 +0000 | [diff] [blame] | 12 | # Centrum or CWI or Corporation for National Research Initiatives or |
| 13 | # CNRI not be used in advertising or publicity pertaining to |
| 14 | # distribution of the software without specific, written prior |
| 15 | # permission. |
| 16 | # |
| 17 | # While CWI is the initial source for this software, a modified version |
| 18 | # is made available by the Corporation for National Research Initiatives |
| 19 | # (CNRI) at the Internet address ftp://ftp.python.org. |
| 20 | # |
| 21 | # STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH |
| 22 | # REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF |
| 23 | # MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH |
| 24 | # CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL |
| 25 | # DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 26 | # PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 27 | # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 28 | # PERFORMANCE OF THIS SOFTWARE. |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 29 | ######################################################################## |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 30 | |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 31 | # Top-level Makefile for Python |
| 32 | # |
| 33 | # As distributed, this file is called Makefile.in; it is processed |
| 34 | # into the real Makefile by running the script ./configure, which |
| 35 | # replaces things like @spam@ with values appropriate for your system. |
| 36 | # This means that if you edit Makefile, your changes get lost the next |
| 37 | # time you run the configure script. Ideally, you can do: |
| 38 | # |
| 39 | # ./configure |
| 40 | # make |
| 41 | # make test |
| 42 | # make install |
| 43 | # |
| 44 | # The top-level Makefile invokes make recursively in a number of |
| 45 | # subdirectories (see the SUBDIRS variable below). If you want to, |
| 46 | # you can invoke make in individual subdirectories. However, the |
| 47 | # sub-Makefiles are also generated by configure, and the quickest way |
| 48 | # to make sure they are up to date is by running make (or "make |
| 49 | # Makefiles") at the top level. This is particularly important for |
| 50 | # Modules/Makefile, which has to be regenerated every time you edit |
| 51 | # Modules/Setup. The python executable is built in the Modules |
| 52 | # directory and then moved to the top-level directory. The recursive |
| 53 | # makes pass three options to subordinate makes: OPT (a quick way to |
Guido van Rossum | b535da3 | 1996-07-30 18:04:22 +0000 | [diff] [blame] | 54 | # change some compiler options; it usually defaults to -O), prefix and |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 55 | # exec_prefix (the installation paths). |
| 56 | # |
Guido van Rossum | b535da3 | 1996-07-30 18:04:22 +0000 | [diff] [blame] | 57 | # If you have a previous version of Python installed that you don't |
| 58 | # want to overwrite, you can use "make altinstall" instead of "make |
| 59 | # install". This changes the install procedure so it installs the |
| 60 | # Python binary as "python<version>". The libraries and include files |
| 61 | # are always installed in a subdirectory called "python<version>". |
| 62 | # "make altinstall" does not install the manual page. If you want to |
| 63 | # make this installation the "official" installation but want to keep |
| 64 | # the old binary around "just in case", rename the installed python |
| 65 | # binary to "python<oldversion>" before running "make install". |
| 66 | # (This only works between different versions, e.g. 1.3 and 1.4 -- |
| 67 | # different betas of the same version will overwrite each other in |
| 68 | # installation unless you override the VERSION Make variable.) |
| 69 | # |
Guido van Rossum | 64b6567 | 1996-07-30 20:42:12 +0000 | [diff] [blame] | 70 | # In fact, "make install" or "make bininstall" installs the binary |
| 71 | # as python<version> and makes a hard link to python, so when |
| 72 | # installing a new version in the future, nothing of the current |
| 73 | # version will be lost (except for the man page). |
| 74 | # |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 75 | # If recursive makes fail, try invoking make as "make MAKE=make". |
| 76 | # |
| 77 | # See also the section "Build instructions" in the README file. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 78 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 79 | # Substitutions by configure |
Guido van Rossum | 914fbd9 | 1997-07-19 19:38:43 +0000 | [diff] [blame] | 80 | VERSION= @VERSION@ |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 81 | srcdir= @srcdir@ |
| 82 | VPATH= @srcdir@ |
Guido van Rossum | 1eec528 | 1997-07-25 22:34:08 +0000 | [diff] [blame] | 83 | CC= @CC@ |
Guido van Rossum | 5aadaf5 | 1997-08-19 14:40:11 +0000 | [diff] [blame] | 84 | AR= @AR@ |
Guido van Rossum | 4a91df4 | 1994-10-10 17:58:27 +0000 | [diff] [blame] | 85 | RANLIB= @RANLIB@ |
Guido van Rossum | 1eec528 | 1997-07-25 22:34:08 +0000 | [diff] [blame] | 86 | DEFS= @DEFS@ |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 87 | |
Guido van Rossum | ac405f6 | 1994-09-12 10:56:06 +0000 | [diff] [blame] | 88 | # Machine-dependent subdirectories |
| 89 | MACHDEP= @MACHDEP@ |
| 90 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 91 | # Install prefix for architecture-independent files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 92 | prefix= @prefix@ |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 93 | |
| 94 | # Install prefix for architecture-dependent files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 95 | exec_prefix= @exec_prefix@ |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 96 | |
Guido van Rossum | 9041279 | 1994-10-20 22:04:30 +0000 | [diff] [blame] | 97 | # Expanded directories |
Guido van Rossum | b535da3 | 1996-07-30 18:04:22 +0000 | [diff] [blame] | 98 | BINDIR= $(exec_prefix)/bin |
| 99 | LIBDIR= $(exec_prefix)/lib |
| 100 | MANDIR= $(prefix)/man |
| 101 | INCLUDEDIR= $(prefix)/include |
Guido van Rossum | abffd00 | 1997-09-11 14:37:59 +0000 | [diff] [blame] | 102 | CONFINCLUDEDIR= $(exec_prefix)/include |
Guido van Rossum | b535da3 | 1996-07-30 18:04:22 +0000 | [diff] [blame] | 103 | SCRIPTDIR= $(prefix)/lib |
Guido van Rossum | 9041279 | 1994-10-20 22:04:30 +0000 | [diff] [blame] | 104 | |
Guido van Rossum | bed23fe | 1996-07-31 17:30:37 +0000 | [diff] [blame] | 105 | # Detailed destination directories |
| 106 | BINLIBDEST= $(LIBDIR)/python$(VERSION) |
| 107 | LIBDEST= $(SCRIPTDIR)/python$(VERSION) |
| 108 | INCLUDEPY= $(INCLUDEDIR)/python$(VERSION) |
Guido van Rossum | abffd00 | 1997-09-11 14:37:59 +0000 | [diff] [blame] | 109 | CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION) |
Guido van Rossum | bed23fe | 1996-07-31 17:30:37 +0000 | [diff] [blame] | 110 | LIBP= $(LIBDIR)/python$(VERSION) |
| 111 | |
Guido van Rossum | ac405f6 | 1994-09-12 10:56:06 +0000 | [diff] [blame] | 112 | # Symbols used for using shared libraries |
| 113 | SO= @SO@ |
| 114 | LDSHARED= @LDSHARED@ |
| 115 | CCSHARED= @CCSHARED@ |
| 116 | LINKFORSHARED= @LINKFORSHARED@ |
Guido van Rossum | cf809d6 | 1997-10-20 23:16:32 +0000 | [diff] [blame] | 117 | DESTSHARED= $(BINLIBDEST)/lib-dynload |
Guido van Rossum | ac405f6 | 1994-09-12 10:56:06 +0000 | [diff] [blame] | 118 | |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 119 | # Shell used by make (some versions default to the login shell, which is bad) |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 120 | SHELL= /bin/sh |
| 121 | |
Guido van Rossum | c9fd600 | 1997-11-11 18:29:22 +0000 | [diff] [blame] | 122 | # Use ``EXE=.exe'' for Unix emulations on DOS/Windows (e.g. GNUWIN32) |
| 123 | EXE= |
| 124 | |
Guido van Rossum | 6cedf82 | 1997-12-02 17:52:37 +0000 | [diff] [blame] | 125 | # Modes for directories, executables and data files created by the |
| 126 | # install process. Default to group-writable directories but |
| 127 | # user-only-writable for executables and data files. |
| 128 | DIRMODE= 775 |
| 129 | EXEMODE= 755 |
| 130 | FILEMODE= 644 |
| 131 | |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 132 | # Portable install script (configure doesn't always guess right) |
| 133 | INSTALL= @srcdir@/install-sh -c |
Guido van Rossum | 6cedf82 | 1997-12-02 17:52:37 +0000 | [diff] [blame] | 134 | INSTALL_PROGRAM=${INSTALL} -m $(EXEMODE) |
| 135 | INSTALL_DATA= ${INSTALL} -m $(FILEMODE) |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 136 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 137 | # --with-PACKAGE options for configure script |
| 138 | # e.g. --with-readline --with-svr5 --with-solaris --with-thread |
| 139 | # (see README for an explanation) |
| 140 | WITH= |
| 141 | |
| 142 | # Compiler options passed to subordinate makes |
Guido van Rossum | 4e8af44 | 1994-08-19 15:33:54 +0000 | [diff] [blame] | 143 | OPT= @OPT@ |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 144 | |
| 145 | # Subdirectories where to run make recursively |
| 146 | SUBDIRS= Parser Objects Python Modules |
| 147 | |
| 148 | # Other subdirectories |
Guido van Rossum | b535da3 | 1996-07-30 18:04:22 +0000 | [diff] [blame] | 149 | SUBDIRSTOO= Include Lib Doc Misc Demo Grammar |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 150 | |
| 151 | # Files and directories to be distributed |
| 152 | CONFIGFILES= configure configure.in acconfig.h config.h.in Makefile.in |
| 153 | DISTFILES= README ChangeLog $(CONFIGFILES) |
| 154 | DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy |
| 155 | DIST= $(DISTFILES) $(DISTDIRS) |
| 156 | |
Guido van Rossum | 1eec528 | 1997-07-25 22:34:08 +0000 | [diff] [blame] | 157 | # Compilation flags for getbuildinfo.c only |
| 158 | CFLAGS= $(OPT) -I. $(DEFS) |
| 159 | |
Guido van Rossum | 914fbd9 | 1997-07-19 19:38:43 +0000 | [diff] [blame] | 160 | LIBRARY= libpython$(VERSION).a |
| 161 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 162 | # Default target |
Guido van Rossum | 506ef9e | 1997-08-18 14:22:24 +0000 | [diff] [blame] | 163 | all: $(LIBRARY) python sharedmods |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 164 | |
| 165 | # Build the interpreter |
Guido van Rossum | 1eec528 | 1997-07-25 22:34:08 +0000 | [diff] [blame] | 166 | python: $(LIBRARY) buildno |
Guido van Rossum | 86c052e | 1997-08-20 22:13:15 +0000 | [diff] [blame] | 167 | expr `cat buildno` + 1 >buildno1 |
| 168 | mv -f buildno1 buildno |
Guido van Rossum | 1eec528 | 1997-07-25 22:34:08 +0000 | [diff] [blame] | 169 | $(CC) -c $(CFLAGS) -DBUILD=`cat buildno` \ |
| 170 | $(srcdir)/Modules/getbuildinfo.c |
| 171 | $(AR) cr $(LIBRARY) getbuildinfo.o |
| 172 | $(RANLIB) $(LIBRARY) |
Guido van Rossum | 414f261 | 1998-02-19 21:33:13 +0000 | [diff] [blame] | 173 | @DGUX_IS_BROKEN@ |
Guido van Rossum | 914fbd9 | 1997-07-19 19:38:43 +0000 | [diff] [blame] | 174 | cd Modules; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \ |
| 175 | prefix="$(prefix)" exec_prefix="$(exec_prefix)" \ |
| 176 | LIBRARY=../$(LIBRARY) link |
| 177 | |
Guido van Rossum | 1eec528 | 1997-07-25 22:34:08 +0000 | [diff] [blame] | 178 | buildno: |
| 179 | echo 0 >buildno |
| 180 | |
Guido van Rossum | 506ef9e | 1997-08-18 14:22:24 +0000 | [diff] [blame] | 181 | # Build the shared modules |
| 182 | sharedmods: python |
| 183 | cd Modules; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \ |
| 184 | prefix="$(prefix)" exec_prefix="$(exec_prefix)" \ |
| 185 | sharedmods |
| 186 | |
Guido van Rossum | 914fbd9 | 1997-07-19 19:38:43 +0000 | [diff] [blame] | 187 | # Build the library |
| 188 | $(LIBRARY): $(SUBDIRS) |
| 189 | if test ! -f $(LIBRARY); \ |
| 190 | then for i in $(SUBDIRS); do rm -f $$i/add2lib; done; true; \ |
| 191 | else true; fi |
| 192 | for i in $(SUBDIRS); do \ |
| 193 | (cd $$i; $(MAKE) VERSION="$(VERSION)" add2lib); done |
Guido van Rossum | 4246edd | 1997-04-23 15:14:24 +0000 | [diff] [blame] | 194 | |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 195 | # This rule is only here for DG/UX!!! |
| 196 | libpython$(VERSION).so: $(LIBRARY) |
| 197 | test -d dgux || mkdir dgux |
| 198 | (cd dgux;ar x ../$^;ld -G -o ../$@ * ) |
| 199 | /bin/rm -rf ./dgux |
| 200 | |
Guido van Rossum | 4246edd | 1997-04-23 15:14:24 +0000 | [diff] [blame] | 201 | $(SUBDIRS): Makefiles |
| 202 | |
| 203 | Parser: |
| 204 | cd Parser ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \ |
| 205 | prefix="$(prefix)" exec_prefix="$(exec_prefix)" all |
| 206 | |
| 207 | Python: |
| 208 | cd Python ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \ |
| 209 | prefix="$(prefix)" exec_prefix="$(exec_prefix)" all |
| 210 | |
| 211 | Objects: |
| 212 | cd Objects ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \ |
| 213 | prefix="$(prefix)" exec_prefix="$(exec_prefix)" all |
| 214 | |
Guido van Rossum | 914fbd9 | 1997-07-19 19:38:43 +0000 | [diff] [blame] | 215 | Modules: Parser Python Objects |
Guido van Rossum | 4246edd | 1997-04-23 15:14:24 +0000 | [diff] [blame] | 216 | cd Modules ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \ |
| 217 | prefix="$(prefix)" exec_prefix="$(exec_prefix)" all |
Guido van Rossum | 810a92f | 1993-12-28 19:39:56 +0000 | [diff] [blame] | 218 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 219 | # Test the interpreter (twice, once without .pyc files, once with) |
Barry Warsaw | 9121ab9 | 1997-01-02 20:01:44 +0000 | [diff] [blame] | 220 | TESTOPTS= |
Guido van Rossum | 042a051 | 1997-01-03 15:54:36 +0000 | [diff] [blame] | 221 | TESTPROG= $(srcdir)/Lib/test/regrtest.py |
Barry Warsaw | dd82bb9 | 1997-08-29 21:52:14 +0000 | [diff] [blame] | 222 | TESTPYTHON= ./python |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 223 | test: python |
Guido van Rossum | cf809d6 | 1997-10-20 23:16:32 +0000 | [diff] [blame] | 224 | -rm -f $(srcdir)/Lib/test/*.py[co] |
Barry Warsaw | dd82bb9 | 1997-08-29 21:52:14 +0000 | [diff] [blame] | 225 | -PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) |
| 226 | PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) |
Guido van Rossum | 810a92f | 1993-12-28 19:39:56 +0000 | [diff] [blame] | 227 | |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 228 | # Install everything |
Guido van Rossum | 6d47298 | 1996-07-30 21:41:56 +0000 | [diff] [blame] | 229 | install: altinstall bininstall maninstall |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 230 | |
Guido van Rossum | 64b6567 | 1996-07-30 20:42:12 +0000 | [diff] [blame] | 231 | # Install almost everything without disturbing previous versions |
Guido van Rossum | b535da3 | 1996-07-30 18:04:22 +0000 | [diff] [blame] | 232 | altinstall: altbininstall libinstall inclinstall libainstall sharedinstall |
Guido van Rossum | 3912fd8 | 1996-07-24 02:35:43 +0000 | [diff] [blame] | 233 | |
Guido van Rossum | 64b6567 | 1996-07-30 20:42:12 +0000 | [diff] [blame] | 234 | # Install the interpreter (by creating a hard link to python$(VERSION)) |
| 235 | bininstall: altbininstall |
| 236 | -if test -f $(BINDIR)/python; \ |
| 237 | then rm -f $(BINDIR)/python; \ |
| 238 | else true; \ |
| 239 | fi |
Guido van Rossum | c9fd600 | 1997-11-11 18:29:22 +0000 | [diff] [blame] | 240 | (cd $(BINDIR); ln python$(VERSION)$(EXE) python$(EXE)) |
Guido van Rossum | 810a92f | 1993-12-28 19:39:56 +0000 | [diff] [blame] | 241 | |
Guido van Rossum | 3912fd8 | 1996-07-24 02:35:43 +0000 | [diff] [blame] | 242 | # Install the interpreter with $(VERSION) affixed |
Guido van Rossum | 64b6567 | 1996-07-30 20:42:12 +0000 | [diff] [blame] | 243 | # This goes into $(exec_prefix) |
Guido van Rossum | 3912fd8 | 1996-07-24 02:35:43 +0000 | [diff] [blame] | 244 | altbininstall: python |
| 245 | @for i in $(BINDIR); \ |
| 246 | do \ |
| 247 | if test ! -d $$i; then \ |
| 248 | echo "Creating directory $$i"; \ |
| 249 | mkdir $$i; \ |
Guido van Rossum | 6cedf82 | 1997-12-02 17:52:37 +0000 | [diff] [blame] | 250 | chmod $(DIRMODE) $$i; \ |
Guido van Rossum | 3912fd8 | 1996-07-24 02:35:43 +0000 | [diff] [blame] | 251 | else true; \ |
| 252 | fi; \ |
| 253 | done |
Guido van Rossum | c9fd600 | 1997-11-11 18:29:22 +0000 | [diff] [blame] | 254 | $(INSTALL_PROGRAM) python$(EXE) $(BINDIR)/python$(VERSION)$(EXE) |
Guido van Rossum | 414f261 | 1998-02-19 21:33:13 +0000 | [diff] [blame] | 255 | @DGUX_IS_BROKEN@ |
Guido van Rossum | 8b0d95f | 1997-12-19 23:02:22 +0000 | [diff] [blame] | 256 | if test -f libpython$(VERSION).so; then \ |
| 257 | $(INSTALL_DATA) libpython$(VERSION).so $(LIBDIR); \ |
| 258 | else true; \ |
| 259 | fi |
Guido van Rossum | 3912fd8 | 1996-07-24 02:35:43 +0000 | [diff] [blame] | 260 | |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 261 | # Install the manual page |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 262 | maninstall: |
Guido van Rossum | bfc1bbe | 1996-06-20 14:30:38 +0000 | [diff] [blame] | 263 | @for i in $(MANDIR) $(MANDIR)/man1; \ |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 264 | do \ |
| 265 | if test ! -d $$i; then \ |
| 266 | echo "Creating directory $$i"; \ |
| 267 | mkdir $$i; \ |
Guido van Rossum | 6cedf82 | 1997-12-02 17:52:37 +0000 | [diff] [blame] | 268 | chmod $(DIRMODE) $$i; \ |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 269 | else true; \ |
| 270 | fi; \ |
| 271 | done |
Guido van Rossum | 6403d28 | 1995-01-20 16:51:32 +0000 | [diff] [blame] | 272 | $(INSTALL_DATA) $(srcdir)/Misc/python.man \ |
Guido van Rossum | 9041279 | 1994-10-20 22:04:30 +0000 | [diff] [blame] | 273 | $(MANDIR)/man1/python.1 |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 274 | |
Guido van Rossum | b535da3 | 1996-07-30 18:04:22 +0000 | [diff] [blame] | 275 | # Install the library |
Guido van Rossum | 86b7db3 | 1997-10-06 00:15:31 +0000 | [diff] [blame] | 276 | PLATDIR= plat-$(MACHDEP) |
| 277 | MACHDEPS= $(PLATDIR) |
Guido van Rossum | 38bbbc7 | 1997-09-08 01:51:23 +0000 | [diff] [blame] | 278 | LIBSUBDIRS= lib-stdwin lib-tk test test/output $(MACHDEPS) |
Guido van Rossum | 86b7db3 | 1997-10-06 00:15:31 +0000 | [diff] [blame] | 279 | libinstall: python $(srcdir)/Lib/$(PLATDIR) |
Guido van Rossum | b535da3 | 1996-07-30 18:04:22 +0000 | [diff] [blame] | 280 | @for i in $(SCRIPTDIR) $(LIBDEST); \ |
| 281 | do \ |
| 282 | if test ! -d $$i; then \ |
| 283 | echo "Creating directory $$i"; \ |
| 284 | mkdir $$i; \ |
Guido van Rossum | 6cedf82 | 1997-12-02 17:52:37 +0000 | [diff] [blame] | 285 | chmod $(DIRMODE) $$i; \ |
Guido van Rossum | b535da3 | 1996-07-30 18:04:22 +0000 | [diff] [blame] | 286 | else true; \ |
| 287 | fi; \ |
| 288 | done |
| 289 | @for d in $(LIBSUBDIRS); \ |
| 290 | do \ |
| 291 | a=$(srcdir)/Lib/$$d; \ |
| 292 | if test ! -d $$a; then continue; else true; fi; \ |
| 293 | b=$(LIBDEST)/$$d; \ |
| 294 | if test ! -d $$b; then \ |
| 295 | echo "Creating directory $$b"; \ |
| 296 | mkdir $$b; \ |
Guido van Rossum | 6cedf82 | 1997-12-02 17:52:37 +0000 | [diff] [blame] | 297 | chmod $(DIRMODE) $$b; \ |
Guido van Rossum | b535da3 | 1996-07-30 18:04:22 +0000 | [diff] [blame] | 298 | else true; \ |
| 299 | fi; \ |
| 300 | done |
| 301 | @for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc; \ |
| 302 | do \ |
| 303 | if test -x $$i; then \ |
| 304 | $(INSTALL_PROGRAM) $$i $(LIBDEST); \ |
| 305 | echo $(INSTALL_PROGRAM) $$i $(LIBDEST); \ |
| 306 | else \ |
| 307 | $(INSTALL_DATA) $$i $(LIBDEST); \ |
| 308 | echo $(INSTALL_DATA) $$i $(LIBDEST); \ |
| 309 | fi; \ |
| 310 | done |
| 311 | @for d in $(LIBSUBDIRS); \ |
| 312 | do \ |
| 313 | a=$(srcdir)/Lib/$$d; \ |
| 314 | if test ! -d $$a; then continue; else true; fi; \ |
| 315 | b=$(LIBDEST)/$$d; \ |
| 316 | for i in $$a/*; \ |
| 317 | do \ |
| 318 | case $$i in \ |
| 319 | *CVS) ;; \ |
Guido van Rossum | cf809d6 | 1997-10-20 23:16:32 +0000 | [diff] [blame] | 320 | *.py[co]) ;; \ |
Guido van Rossum | b535da3 | 1996-07-30 18:04:22 +0000 | [diff] [blame] | 321 | *~) ;; \ |
| 322 | *) \ |
Guido van Rossum | 8e29a59 | 1997-12-02 19:18:27 +0000 | [diff] [blame] | 323 | if test -d $$i; then continue; fi; \ |
Guido van Rossum | b535da3 | 1996-07-30 18:04:22 +0000 | [diff] [blame] | 324 | if test -x $$i; then \ |
| 325 | echo $(INSTALL_PROGRAM) $$i $$b; \ |
| 326 | $(INSTALL_PROGRAM) $$i $$b; \ |
| 327 | else \ |
| 328 | echo $(INSTALL_DATA) $$i $$b; \ |
| 329 | $(INSTALL_DATA) $$i $$b; \ |
| 330 | fi;; \ |
| 331 | esac; \ |
| 332 | done; \ |
| 333 | done |
| 334 | PYTHONPATH=$(LIBDEST) \ |
| 335 | ./python $(LIBDEST)/compileall.py $(LIBDEST) |
Fred Drake | db5a41f | 1997-03-13 14:14:29 +0000 | [diff] [blame] | 336 | PYTHONPATH=$(LIBDEST) \ |
| 337 | ./python -O $(LIBDEST)/compileall.py $(LIBDEST) |
Guido van Rossum | b535da3 | 1996-07-30 18:04:22 +0000 | [diff] [blame] | 338 | |
Guido van Rossum | 86b7db3 | 1997-10-06 00:15:31 +0000 | [diff] [blame] | 339 | # Create the PLATDIR source directory, if one wasn't distributed.. |
| 340 | $(srcdir)/Lib/$(PLATDIR): |
| 341 | mkdir $(srcdir)/Lib/$(PLATDIR) |
| 342 | cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen |
Guido van Rossum | 04831d1 | 1996-09-10 18:21:32 +0000 | [diff] [blame] | 343 | export PATH; PATH="`pwd`:$$PATH"; \ |
Guido van Rossum | f71bd68 | 1996-08-28 19:23:01 +0000 | [diff] [blame] | 344 | export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \ |
Guido van Rossum | 86b7db3 | 1997-10-06 00:15:31 +0000 | [diff] [blame] | 345 | cd $(srcdir)/Lib/$(PLATDIR); ./regen |
Guido van Rossum | 64b6567 | 1996-07-30 20:42:12 +0000 | [diff] [blame] | 346 | |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 347 | # Install the include files |
Guido van Rossum | abffd00 | 1997-09-11 14:37:59 +0000 | [diff] [blame] | 348 | INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY) |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 349 | inclinstall: |
Guido van Rossum | abffd00 | 1997-09-11 14:37:59 +0000 | [diff] [blame] | 350 | @for i in $(INCLDIRSTOMAKE); \ |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 351 | do \ |
| 352 | if test ! -d $$i; then \ |
| 353 | echo "Creating directory $$i"; \ |
| 354 | mkdir $$i; \ |
Guido van Rossum | 6cedf82 | 1997-12-02 17:52:37 +0000 | [diff] [blame] | 355 | chmod $(DIRMODE) $$i; \ |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 356 | else true; \ |
| 357 | fi; \ |
| 358 | done |
Guido van Rossum | bfc1bbe | 1996-06-20 14:30:38 +0000 | [diff] [blame] | 359 | @for i in $(srcdir)/Include/*.h; \ |
| 360 | do \ |
| 361 | echo $(INSTALL_DATA) $$i $(INCLUDEPY); \ |
| 362 | $(INSTALL_DATA) $$i $(INCLUDEPY); \ |
| 363 | done |
Guido van Rossum | abffd00 | 1997-09-11 14:37:59 +0000 | [diff] [blame] | 364 | $(INSTALL_DATA) config.h $(CONFINCLUDEPY)/config.h |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 365 | |
Guido van Rossum | 914fbd9 | 1997-07-19 19:38:43 +0000 | [diff] [blame] | 366 | # Install the library and miscellaneous stuff needed for extending/embedding |
Guido van Rossum | 64b6567 | 1996-07-30 20:42:12 +0000 | [diff] [blame] | 367 | # This goes into $(exec_prefix) |
Guido van Rossum | b535da3 | 1996-07-30 18:04:22 +0000 | [diff] [blame] | 368 | LIBPL= $(LIBP)/config |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 369 | libainstall: all |
Guido van Rossum | bfc1bbe | 1996-06-20 14:30:38 +0000 | [diff] [blame] | 370 | @for i in $(LIBDIR) $(LIBP) $(LIBPL); \ |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 371 | do \ |
| 372 | if test ! -d $$i; then \ |
| 373 | echo "Creating directory $$i"; \ |
| 374 | mkdir $$i; \ |
Guido van Rossum | 6cedf82 | 1997-12-02 17:52:37 +0000 | [diff] [blame] | 375 | chmod $(DIRMODE) $$i; \ |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 376 | else true; \ |
| 377 | fi; \ |
| 378 | done |
Guido van Rossum | 914fbd9 | 1997-07-19 19:38:43 +0000 | [diff] [blame] | 379 | $(INSTALL_DATA) $(LIBRARY) $(LIBPL)/$(LIBRARY) |
| 380 | $(RANLIB) $(LIBPL)/$(LIBRARY) |
Guido van Rossum | 6403d28 | 1995-01-20 16:51:32 +0000 | [diff] [blame] | 381 | $(INSTALL_DATA) Modules/config.c $(LIBPL)/config.c |
Guido van Rossum | 895e105 | 1997-07-19 22:53:39 +0000 | [diff] [blame] | 382 | $(INSTALL_DATA) Modules/python.o $(LIBPL)/python.o |
Guido van Rossum | 6403d28 | 1995-01-20 16:51:32 +0000 | [diff] [blame] | 383 | $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(LIBPL)/config.c.in |
| 384 | $(INSTALL_DATA) Modules/Makefile $(LIBPL)/Makefile |
| 385 | $(INSTALL_DATA) Modules/Setup $(LIBPL)/Setup |
Guido van Rossum | ded2e20 | 1997-07-19 22:00:45 +0000 | [diff] [blame] | 386 | $(INSTALL_DATA) Modules/Setup.local $(LIBPL)/Setup.local |
Fred Drake | fc5d8b1 | 1997-12-09 15:18:33 +0000 | [diff] [blame] | 387 | $(INSTALL_DATA) Modules/Setup.thread $(LIBPL)/Setup.thread |
Guido van Rossum | 70a8659 | 1996-07-21 02:46:47 +0000 | [diff] [blame] | 388 | $(INSTALL_PROGRAM) $(srcdir)/Modules/makesetup $(LIBPL)/makesetup |
Guido van Rossum | d99d714 | 1997-10-04 04:35:24 +0000 | [diff] [blame] | 389 | $(INSTALL_PROGRAM) $(srcdir)/install-sh $(LIBPL)/install-sh |
Guido van Rossum | e475d86 | 1997-10-29 19:07:30 +0000 | [diff] [blame] | 390 | $(INSTALL_DATA) $(srcdir)/Misc/Makefile.pre.in $(LIBPL)/Makefile.pre.in |
Guido van Rossum | 69f6580 | 1998-03-03 21:47:00 +0000 | [diff] [blame] | 391 | @if [ -s Modules/python.exp -a \ |
Guido van Rossum | a58153e | 1998-05-05 20:40:18 +0000 | [diff] [blame] | 392 | "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \ |
Guido van Rossum | 69f6580 | 1998-03-03 21:47:00 +0000 | [diff] [blame] | 393 | echo; echo "Installing support files for building shared extension modules on AIX:"; \ |
| 394 | $(INSTALL_DATA) Modules/python.exp \ |
| 395 | $(LIBPL)/python.exp; \ |
| 396 | echo; echo "$(LIBPL)/python.exp"; \ |
| 397 | $(INSTALL_PROGRAM) $(srcdir)/Modules/makexp_aix \ |
| 398 | $(LIBPL)/makexp_aix; \ |
| 399 | echo "$(LIBPL)/makexp_aix"; \ |
| 400 | $(INSTALL_PROGRAM) $(srcdir)/Modules/ld_so_aix \ |
| 401 | $(LIBPL)/ld_so_aix; \ |
| 402 | echo "$(LIBPL)/ld_so_aix"; \ |
| 403 | echo; echo "See Misc/AIX-NOTES for details."; \ |
| 404 | else true; \ |
| 405 | fi |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 406 | |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 407 | # Install the dynamically loadable modules |
Guido van Rossum | 64b6567 | 1996-07-30 20:42:12 +0000 | [diff] [blame] | 408 | # This goes into $(exec_prefix) |
Guido van Rossum | ac405f6 | 1994-09-12 10:56:06 +0000 | [diff] [blame] | 409 | sharedinstall: |
| 410 | cd Modules; $(MAKE) \ |
| 411 | OPT="$(OPT)" \ |
Guido van Rossum | b535da3 | 1996-07-30 18:04:22 +0000 | [diff] [blame] | 412 | VERSION="$(VERSION)" \ |
Guido van Rossum | ac405f6 | 1994-09-12 10:56:06 +0000 | [diff] [blame] | 413 | SO="$(SO)" \ |
| 414 | LDSHARED="$(LDSHARED)" \ |
| 415 | CCSHARED="$(CCSHARED)" \ |
| 416 | LINKFORSHARED="$(LINKFORSHARED)" \ |
| 417 | DESTSHARED="$(DESTSHARED)" \ |
Guido van Rossum | 3912fd8 | 1996-07-24 02:35:43 +0000 | [diff] [blame] | 418 | prefix="$(prefix)" \ |
| 419 | exec_prefix="$(exec_prefix)" \ |
Guido van Rossum | ac405f6 | 1994-09-12 10:56:06 +0000 | [diff] [blame] | 420 | sharedinstall |
| 421 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 422 | # Build the sub-Makefiles |
Guido van Rossum | d09119e | 1995-01-17 16:45:08 +0000 | [diff] [blame] | 423 | Makefiles: config.status Modules/Makefile.pre |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 424 | (cd Modules; $(MAKE) -f Makefile.pre Makefile) |
Guido van Rossum | bfc1bbe | 1996-06-20 14:30:38 +0000 | [diff] [blame] | 425 | @for i in . $(SUBDIRS); do \ |
| 426 | (echo making Makefile in subdirectory $$i; cd $$i; \ |
| 427 | $(MAKE) Makefile); \ |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 428 | done |
| 429 | |
Guido van Rossum | d09119e | 1995-01-17 16:45:08 +0000 | [diff] [blame] | 430 | # Build the intermediate Makefile in Modules |
| 431 | Modules/Makefile.pre: config.status |
| 432 | $(SHELL) config.status |
| 433 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 434 | # Build the toplevel Makefile |
| 435 | Makefile: Makefile.in config.status |
| 436 | CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) config.status |
| 437 | |
| 438 | # Run the configure script. If config.status already exists, |
| 439 | # call it with the --recheck argument, which reruns configure with the |
| 440 | # same options as it was run last time; otherwise run the configure |
| 441 | # script with options taken from the $(WITH) variable |
| 442 | config.status: $(srcdir)/configure |
| 443 | if test -f config.status; \ |
| 444 | then $(SHELL) config.status --recheck; \ |
Guido van Rossum | fb00a99 | 1995-01-12 12:26:50 +0000 | [diff] [blame] | 445 | $(SHELL) config.status; \ |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 446 | else $(SHELL) $(srcdir)/configure $(WITH); \ |
| 447 | fi |
| 448 | |
| 449 | .PRECIOUS: config.status python |
| 450 | |
| 451 | # Rerun configure with the same options as it was run last time, |
| 452 | # provided the config.status script exists |
| 453 | recheck: |
| 454 | $(SHELL) config.status --recheck |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 455 | $(SHELL) config.status |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 456 | |
| 457 | # Rebuild the configure script from configure.in; also rebuild config.h.in |
| 458 | autoconf: |
Guido van Rossum | 0068267 | 1996-06-28 20:15:41 +0000 | [diff] [blame] | 459 | (cd $(srcdir); autoconf) |
| 460 | (cd $(srcdir); autoheader) |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 461 | |
| 462 | # Create a tags file for vi |
| 463 | tags:: |
| 464 | ctags -w -t Include/*.h |
| 465 | for i in $(SUBDIRS); do ctags -w -t -a $$i/*.[ch]; done |
| 466 | sort tags -o tags |
| 467 | |
| 468 | # Create a tags file for GNU Emacs |
| 469 | TAGS:: |
Guido van Rossum | 5552eb7 | 1994-08-05 15:51:00 +0000 | [diff] [blame] | 470 | etags Include/*.h |
| 471 | for i in $(SUBDIRS); do etags -a $$i/*.[ch]; done |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 472 | |
| 473 | # Add dependencies to sub-Makefiles |
Guido van Rossum | 810a92f | 1993-12-28 19:39:56 +0000 | [diff] [blame] | 474 | depend: |
Guido van Rossum | bfc1bbe | 1996-06-20 14:30:38 +0000 | [diff] [blame] | 475 | @for i in $(SUBDIRS); do \ |
| 476 | (echo making depend in subdirectory $$i; cd $$i; \ |
| 477 | $(MAKE) depend); \ |
Guido van Rossum | 810a92f | 1993-12-28 19:39:56 +0000 | [diff] [blame] | 478 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 479 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 480 | # Sanitation targets -- clean leaves libraries, executables and tags |
| 481 | # files, which clobber removes those as well |
| 482 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 483 | localclean: |
| 484 | -rm -f core *~ [@,#]* *.old *.orig *.rej |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 485 | |
| 486 | clean: localclean |
| 487 | -for i in $(SUBDIRS); do \ |
Guido van Rossum | bfc1bbe | 1996-06-20 14:30:38 +0000 | [diff] [blame] | 488 | (echo making clean in subdirectory $$i; cd $$i; \ |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 489 | if test -f Makefile; \ |
| 490 | then $(MAKE) clean; \ |
| 491 | else $(MAKE) -f Makefile.*in clean; \ |
| 492 | fi); \ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 493 | done |
| 494 | |
Guido van Rossum | 810a92f | 1993-12-28 19:39:56 +0000 | [diff] [blame] | 495 | localclobber: localclean |
Guido van Rossum | cf0be04 | 1997-08-29 18:42:35 +0000 | [diff] [blame] | 496 | -rm -f tags TAGS python $(LIBRARY) *.o |
Guido van Rossum | bfc1bbe | 1996-06-20 14:30:38 +0000 | [diff] [blame] | 497 | -rm -f config.log config.cache config.h |
Guido van Rossum | 810a92f | 1993-12-28 19:39:56 +0000 | [diff] [blame] | 498 | |
| 499 | clobber: localclobber |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 500 | -for i in $(SUBDIRS); do \ |
Guido van Rossum | bfc1bbe | 1996-06-20 14:30:38 +0000 | [diff] [blame] | 501 | (echo clobbering subdirectory $$i; cd $$i; \ |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 502 | if test -f Makefile; \ |
| 503 | then $(MAKE) clobber; \ |
Guido van Rossum | 7b4d460 | 1995-03-22 12:27:16 +0000 | [diff] [blame] | 504 | else $(MAKE) -f $(srcdir)/Makefile.in clobber; \ |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 505 | fi); \ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 506 | done |
| 507 | |
Guido van Rossum | bfc1bbe | 1996-06-20 14:30:38 +0000 | [diff] [blame] | 508 | # Make things extra clean, before making a distribution: |
| 509 | # remove all generated files, even Makefile[.pre] |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 510 | distclean: clobber |
Guido van Rossum | 7b4d460 | 1995-03-22 12:27:16 +0000 | [diff] [blame] | 511 | -$(MAKE) -f $(srcdir)/Makefile.in \ |
| 512 | SUBDIRS="$(SUBDIRSTOO)" clobber |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 513 | -rm -f config.status config.log config.cache config.h Makefile |
Guido van Rossum | cf0be04 | 1997-08-29 18:42:35 +0000 | [diff] [blame] | 514 | -rm -f buildno |
Guido van Rossum | e7abf4e | 1995-09-18 22:12:20 +0000 | [diff] [blame] | 515 | -rm -f Modules/Makefile |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 516 | -for i in $(SUBDIRS) $(SUBDIRSTOO); do \ |
| 517 | for f in $$i/*.in; do \ |
| 518 | f=`basename "$$f" .in`; \ |
| 519 | if test "$$f" != "*"; then \ |
| 520 | echo rm -f "$$i/$$f"; \ |
| 521 | rm -f "$$i/$$f"; \ |
| 522 | fi; \ |
| 523 | done; \ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 524 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 525 | |
Guido van Rossum | 586480b | 1996-05-28 22:49:08 +0000 | [diff] [blame] | 526 | # Check for smelly exported symbols (not starting with Py/_Py) |
| 527 | smelly: all |
| 528 | for i in $(SUBDIRS); do \ |
| 529 | echo --- $$i ---; \ |
| 530 | nm -p $$i/lib$$i.a | \ |
| 531 | sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \ |
| 532 | done |
| 533 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 534 | # Find files with funny names |
Guido van Rossum | bfc1bbe | 1996-06-20 14:30:38 +0000 | [diff] [blame] | 535 | funny: |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 536 | find $(DISTDIRS) -type d \ |
| 537 | -o -name '*.[chs]' \ |
| 538 | -o -name '*.py' \ |
| 539 | -o -name '*.doc' \ |
| 540 | -o -name '*.sty' \ |
| 541 | -o -name '*.bib' \ |
| 542 | -o -name '*.dat' \ |
| 543 | -o -name '*.el' \ |
| 544 | -o -name '*.fd' \ |
| 545 | -o -name '*.in' \ |
| 546 | -o -name '*.tex' \ |
| 547 | -o -name '*,[vpt]' \ |
| 548 | -o -name 'Setup' \ |
| 549 | -o -name 'Setup.*' \ |
| 550 | -o -name README \ |
| 551 | -o -name Makefile \ |
| 552 | -o -name ChangeLog \ |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 553 | -o -name Repository \ |
Guido van Rossum | bfc1bbe | 1996-06-20 14:30:38 +0000 | [diff] [blame] | 554 | -o -name Root \ |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 555 | -o -name Entries \ |
| 556 | -o -name Tag \ |
| 557 | -o -name tags \ |
| 558 | -o -name TAGS \ |
| 559 | -o -name .cvsignore \ |
| 560 | -o -name MANIFEST \ |
| 561 | -o -print |