Commit 631e87fb authored by Andrew MacIntyre's avatar Andrew MacIntyre

Makefile & config.c:

- restructure build for modules now in Python DLL

README.os2emx
- clean out old cruft no longer appropriate now that EMX port builds
  from CVS
- reflect move of modules into core DLL
- add section on building from source
parent d4c9b16b
......@@ -264,7 +264,43 @@ SRC.MODULES= $(addprefix $(TOP), \
Modules/gcmodule.c \
Modules/signalmodule.c \
Modules/posixmodule.c \
Modules/threadmodule.c
Modules/threadmodule.c \
Modules/arraymodule.c \
Modules/binascii.c \
Modules/cmathmodule.c \
Modules/_codecsmodule.c \
Modules/cPickle.c \
Modules/cStringIO.c \
Modules/_csv.c \
Modules/datetimemodule.c \
Modules/dlmodule.c \
Modules/errnomodule.c \
Modules/fcntlmodule.c \
Modules/imageop.c \
Modules/itertoolsmodule.c \
Modules/_localemodule.c \
Modules/mathmodule.c \
Modules/md5c.c \
Modules/md5module.c \
Modules/operator.c \
Modules/pcremodule.c \
Modules/pypcre.c \
Modules/_randommodule.c \
Modules/regexmodule.c \
Modules/regexpr.c \
Modules/rgbimgmodule.c \
Modules/shamodule.c \
Modules/_sre.c \
Modules/stropmodule.c \
Modules/structmodule.c \
Modules/symtablemodule.c \
Modules/termios.c \
Modules/timemodule.c \
Modules/timingmodule.c \
Modules/_weakref.c \
Modules/xreadlinesmodule.c \
Modules/xxsubtype.c \
Modules/zipimport.c)
SRC.PARSE1= $(addprefix $(TOP), \
Parser/acceler.c \
Parser/grammar1.c \
......@@ -376,53 +412,20 @@ SRC.PMEXE= pythonpm.c
# 2) use the standard module naming convention
# (the 'module' in ?????module.c is assumed)
# - these can be built with implicit rules
EASYEXTMODULES= array \
cmath \
_codecs \
datetime \
dl \
errno \
fcntl \
fpectl \
EASYEXTMODULES= fpectl \
fpetest \
_locale \
math \
parser \
pwd \
_random \
rgbimg \
rotor \
select \
sha \
strop \
struct \
time \
timing
select
# Python modules to be dynamically loaded that need explicit build rules
# (either multiple source files and/or non-standard module naming)
# (NOTE: use shortened names for modules affected by 8 char name limit)
HARDEXTMODULES= binascii \
cPickle \
cStringI \
_csv \
_hotshot \
imageop \
itertool \
md5 \
operator \
pcre \
regex \
HARDEXTMODULES= _hotshot \
_socket \
_sre \
_symtabl \
termios \
_testcap \
unicoded \
_weakref \
xreadlin \
xxsubtyp \
zipimpor
unicoded
# Python external ($(MODULE.EXT)) modules - can be EASY or HARD
ifeq ($(HAVE_ZLIB),yes)
......@@ -528,63 +531,13 @@ $(PGEN.EXE): $(OBJ.PGEN) $(OUT)pgen.def
# Explicit building instructions for those external modules that require
# awkward handling (due e.g. to non-std naming, or multiple source files)
# - standard modules
binascii$(MODULE.EXT): $(OUT)binascii$O $(OUT)binascii_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
cPickle$(MODULE.EXT): $(OUT)cPickle$O $(OUT)cPickle_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
# cStringIO needs to be renamed to be useful (8 char DLL name limit)
cStringIO$(MODULE.EXT): $(OUT)cStringIO$O $(OUT)cStringIO_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
cStringI$(MODULE.EXT): cStringIO$(MODULE.EXT)
cp $^ $@
_csv$(MODULE.EXT): $(OUT)_csv$O $(OUT)_csv_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
_hotshot$(MODULE.EXT): $(OUT)_hotshot$O $(OUT)_hotshot_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
imageop$(MODULE.EXT): $(OUT)imageop$O $(OUT)imageop_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
# itertools needs to be renamed to be useful
itertools$(MODULE.EXT): $(OUT)itertoolsmodule$O $(OUT)itertools_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
itertool$(MODULE.EXT): itertools$(MODULE.EXT)
cp $^ $@
md5$(MODULE.EXT): $(OUT)md5module$O $(OUT)md5c$O $(OUT)md5_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
operator$(MODULE.EXT): $(OUT)operator$O $(OUT)operator_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
pcre$(MODULE.EXT): $(OUT)pcremodule$O $(OUT)pypcre$O $(OUT)pcre_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
regex$(MODULE.EXT): $(OUT)regexmodule$O $(OUT)regexpr$O $(OUT)regex_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
_socket$(MODULE.EXT): $(OUT)socketmodule$O $(OUT)_socket_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
_sre$(MODULE.EXT): $(OUT)_sre$O $(OUT)_sre_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
# _symtable needs to be renamed to be useful
_symtable$(MODULE.EXT): $(OUT)symtablemodule$O $(OUT)_symtable_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
_symtabl$(MODULE.EXT): _symtable$(MODULE.EXT)
cp $^ $@
termios$(MODULE.EXT): $(OUT)termios$O $(OUT)termios_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
# _testcapi needs to be renamed to be useful
_testcapi$(MODULE.EXT): $(OUT)_testcapimodule$O $(OUT)_testcapi_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
......@@ -599,30 +552,6 @@ unicodedata$(MODULE.EXT): $(OUT)unicodedata$O $(OUT)unicodedata_m.def $(PYTHON.I
unicoded$(MODULE.EXT): unicodedata$(MODULE.EXT)
cp $^ $@
_weakref$(MODULE.EXT): $(OUT)_weakref$O $(OUT)_weakref_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
# xreadlines needs to be renamed to be useful
xreadlines$(MODULE.EXT): $(OUT)xreadlinesmodule$O $(OUT)xreadlines_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
xreadlin$(MODULE.EXT): xreadlines$(MODULE.EXT)
cp $^ $@
# xxsubtype needs to be renamed to be useful
xxsubtype$(MODULE.EXT): $(OUT)xxsubtype$O $(OUT)xxsubtype_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
xxsubtyp$(MODULE.EXT): xxsubtype$(MODULE.EXT)
cp $^ $@
# zipimport needs to be renamed to be useful
zipimport$(MODULE.EXT): $(OUT)zipimport$O $(OUT)zipimport_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) $(LIBS)
zipimpor$(MODULE.EXT): zipimport$(MODULE.EXT)
cp $^ $@
# - optional modules (requiring other software to be installed)
bsddb185$(MODULE.EXT): $(OUT)bsddbmodule$O $(OUT)bsddb185_m.def $(PYTHON.IMPLIB)
$(LD) $(LDFLAGS.DLL) -o $@ $(^^) $(L^) -ldb $(LIBS)
......
This diff is collapsed.
......@@ -41,21 +41,15 @@ extern void initsignal();
#ifdef WITH_THREAD
extern void initthread();
#endif
#if !HAVE_DYNAMIC_LOADING
extern void init_codecs();
extern void init_curses();
extern void init_curses_panel();
extern void init_hotshot();
extern void init_csv();
extern void init_locale();
extern void init_random();
extern void init_sre();
extern void init_symtable();
extern void init_testcapi();
extern void init_weakref();
extern void initarray();
extern void initbinascii();
extern void initbsddb185();
extern void initbz2();
extern void initcPickle();
extern void initcStringIO();
extern void initcmath();
......@@ -63,29 +57,36 @@ extern void initdatetime();
extern void initdl();
extern void initerrno();
extern void initfcntl();
extern void initfpectl();
extern void initfpetest();
extern void initimageop();
extern void inititertools();
extern void initmath();
extern void initmd5();
extern void initoperator();
extern void initparser();
extern void initpcre();
extern void initpwd();
extern void initregex();
extern void initrgbimg();
extern void initrotor();
extern void initsha();
extern void initstrop();
extern void initstruct();
extern void inittermios();
extern void inittime();
extern void inittiming();
extern void initunicodedata();
extern void initxreadlines();
extern void initxxsubtype();
extern void initzipimport();
#if !HAVE_DYNAMIC_LOADING
extern void init_curses();
extern void init_curses_panel();
extern void init_hotshot();
extern void init_testcapi();
extern void initbsddb185();
extern void initbz2();
extern void initfpectl();
extern void initfpetest();
extern void initparser();
extern void initpwd();
extern void initrotor();
extern void initunicodedata();
extern void initzlib();
#ifdef USE_SOCKET
extern void init_socket();
......@@ -105,21 +106,15 @@ struct _inittab _PyImport_Inittab[] = {
#ifdef WITH_THREAD
{"thread", initthread},
#endif
#if !HAVE_DYNAMIC_LOADING
{"_codecs", init_codecs},
{"_curses", init_curses},
{"_curses_panel", init_curses_panel},
{"_hotshot", init_hotshot},
{"_csv", init_codecs},
{"_locale", init_locale},
{"_random", init_random},
{"_sre", init_sre},
{"_symtable", init_symtable},
{"_testcapi", init_testcapi},
{"_weakref", init_weakref},
{"array", initarray},
{"binascii", initbinascii},
{"bsddb185", initbsddb185},
{"bz2", initbz2},
{"cPickle", initcPickle},
{"cStringIO", initcStringIO},
{"cmath", initcmath},
......@@ -127,29 +122,36 @@ struct _inittab _PyImport_Inittab[] = {
{"dl", initdl},
{"errno", initerrno},
{"fcntl", initfcntl},
{"fpectl", initfpectl},
{"fpetest", initfpetest},
{"imageop", initimageop},
{"itertools", inititertools},
{"math", initmath},
{"md5", initmd5},
{"operator", initoperator},
{"parser", initparser},
{"pcre", initpcre},
{"pwd", initpwd},
{"regex", initregex},
{"rgbimg", initrgbimg},
{"rotor", initrotor},
{"sha", initsha},
{"strop", initstrop},
{"struct", initstruct},
{"termios", inittermios},
{"time", inittime},
{"timing", inittiming},
{"unicodedata", initunicodedata},
{"xreadlines", initxreadlines},
{"xxsubtype", initxxsubtype},
{"zipimport", initzipimport},
#if !HAVE_DYNAMIC_LOADING
{"_curses", init_curses},
{"_curses_panel", init_curses_panel},
{"_hotshot", init_hotshot},
{"_testcapi", init_testcapi},
{"bsddb185", initbsddb185},
{"bz2", initbz2},
{"fpectl", initfpectl},
{"fpetest", initfpetest},
{"parser", initparser},
{"pwd", initpwd},
{"rotor", initrotor},
{"unicodedata", initunicodedata},
{"zlib", initzlib},
#ifdef USE_SOCKET
{"_socket", init_socket},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment