summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-08-28 19:29:44 (GMT)
committerGuido van Rossum <guido@python.org>1996-08-28 19:29:44 (GMT)
commit62cf605a04fc2a4d39fedd7ba52ec818b9524b54 (patch)
tree1d2e4813e387bfc950f0e0a913f6a4013f76eacb /Misc
parentf71bd68673f2a5d65330a413eb421c2fac634e4a (diff)
downloadcpython-62cf605a04fc2a4d39fedd7ba52ec818b9524b54.zip
cpython-62cf605a04fc2a4d39fedd7ba52ec818b9524b54.tar.gz
cpython-62cf605a04fc2a4d39fedd7ba52ec818b9524b54.tar.bz2
New version submitted by Jim Fulton.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/gMakefile41
1 files changed, 29 insertions, 12 deletions
diff --git a/Misc/gMakefile b/Misc/gMakefile
index b5bf292..28b1563 100644
--- a/Misc/gMakefile
+++ b/Misc/gMakefile
@@ -3,17 +3,20 @@
# Jim Fulton, Digital Creations, jim@digicool.com
-# Uncomment this line if you want to fix the location of the PYTHON
-# installation. Otherwise, set the environment variable before using this
-# Makefile.
-# $(PYTHONHOME)= /usr/local/
+# Uncomment and modify these lines if you want to fix the location of
+# the PYTHON installation and the python version. Otherwise, set the
+# environment variables before using this Makefile.
+
+# $(PYTHONHOME)= /usr/local/
+# $(PYTHONVERSION)= 1.4
# The following lines should be left as is:
+VERSION= $(PYTHONVERSION)
pyinstalldir= $(PYTHONHOME)
installdir= $(PYTHONHOME)
exec_installdir=$(pyinstalldir)
-INCLUDEPY= $(pyinstalldir)/include/python1.4
-LIBP= $(exec_installdir)/lib/python1.4
+INCLUDEPY= $(pyinstalldir)/include/python$(VERSION)
+LIBP= $(exec_installdir)/lib/python$(VERSION)
LIBPL= $(LIBP)/config
PYMAKE= make -f $(LIBPL)/Makefile
@@ -31,10 +34,13 @@ MODULE=your-module
OBS=$(MODULE).o
# Put extra linker options, such as libraries here:
-EXTRA=
+EXTRALD=
+
+# Put Extra compiler options, such as extra -I options, here
+CFLAGS=-O
# If you have any Python modules, include them here, so that they
-# can be installed.
+# can get installed.
PYMODULES=
build:
@@ -42,11 +48,22 @@ build:
$(PYMAKE) INCLDIR=$(INCLUDEPY) CONFIGINCLDIR=$(LIBPL) \
ASHAREDMODULE=$(MODULE) \
'ASHAREDMODULESOBS=$(OBS)' \
- 'ASHAREDMODULESEXTRA=$(EXTRA)' \
+ 'ASHAREDMODULESEXTRA=$(EXTRALD)' \
+ 'OPT=$(CFLAGS)' \
asharedmodule; \
fi
-install: installso installpy
+# Normally we don't install .py files:
+install: installso installpyc
+
+# But sometimes we may want to:
+installpy: install
+ for m in $(PYMODULES) the-end; do \
+ if [ "$$m" != the-end ]; then \
+ cp $$m.py $(installdir)/lib/python$(VERSION)/; \
+ fi; \
+ done
+
installso: build
if [ "$(MODULE)" != your-module ]; then \
@@ -54,11 +71,11 @@ installso: build
ASHAREDMODULE=$(MODULE) asharedinstall; \
fi
-installpy:
+installpyc:
for m in $(PYMODULES) the-end; do \
if [ "$$m" != the-end ]; then \
python -c "import $$m"; \
- cp $$m.pyc $(installdir)/lib/python/; \
+ cp $$m.pyc $(installdir)/lib/python$(VERSION)/; \
fi; \
done