Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a0cbb3d

Browse files
committed
Moved the thread module to its own Setup.thread(.in) file,
which is edited by the config.status script depending on whether --with-thread is specified or not. Also needs changes to configure(.in).
1 parent e612be5 commit a0cbb3d

3 files changed

Lines changed: 16 additions & 7 deletions

File tree

Modules/Makefile.pre.in

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,11 @@ getpath.o: getpath.c Makefile
152152
# When the configuration changes, we remove the library, so that it
153153
# gets remade from scratch; this ensures to remove modules that are no
154154
# longer pertinent (but that were in a previous configuration).
155-
config.c Makefile: Makefile.pre config.c.in $(MAKESETUP) Setup Setup.local
155+
config.c Makefile: Makefile.pre config.c.in $(MAKESETUP)
156+
config.c Makefile: Setup.thread Setup Setup.local
157+
config.c Makefile:
156158
-rm -f $(LIBRARY)
157-
$(SHELL) $(MAKESETUP) Setup.local Setup
159+
$(SHELL) $(MAKESETUP) Setup.thread Setup.local Setup
158160

159161
Setup:
160162
cp $(srcdir)/Setup.in Setup

Modules/Setup.in

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,7 @@ signal signalmodule.c # signal(2)
9595

9696
#gl glmodule.c cgensupport.c -I$(srcdir) -lgl -lX11
9797

98-
# Thread module -- use only if Python has thread support for your OS.
99-
# Note that you must have configured (and built!) Python with the
100-
# --with-thread option passed to the configure script for this to work:
101-
102-
#thread threadmodule.c
98+
# The thread module is now automatically enabled, see Setup.thread.
10399

104100
# Pure module. Cannot be linked dynamically.
105101
# -DWITH_QUANTIFY, -DWITH_PURIFY, or -DWITH_ALL_PURE

Modules/Setup.thread.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This file is transmogrified into Setup.thread by config.status.
2+
3+
# Its purpose is to automatically enable the thread module when the
4+
# --with-thread argument is given to the configure script.
5+
6+
# *NOTE*: if the configure script decides it can't support threads,
7+
# the thread module will still be enabled and cause compile errors.
8+
# The solution is not to use --with-thread on platforms that don't
9+
# support threads.
10+
11+
@USE_THREAD_MODULE@thread threadmodule.c

0 commit comments

Comments
 (0)