]> granicus.if.org Git - python/commitdiff
Moved the thread module to its own Setup.thread(.in) file,
authorGuido van Rossum <guido@python.org>
Thu, 4 Dec 1997 00:48:27 +0000 (00:48 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 4 Dec 1997 00:48:27 +0000 (00:48 +0000)
which is edited by the config.status script depending on whether
--with-thread is specified or not.  Also needs changes to configure(.in).

Modules/Makefile.pre.in
Modules/Setup.in
Modules/Setup.thread.in [new file with mode: 0644]

index ba2341ac642bb3814779e61d55854fc68910e3ba..7bc1d63f8e15f764c6a8de92c0627d99bdf2cf2c 100644 (file)
@@ -152,9 +152,11 @@ getpath.o: getpath.c Makefile
 # When the configuration changes, we remove the library, so that it
 # gets remade from scratch; this ensures to remove modules that are no
 # longer pertinent (but that were in a previous configuration).
-config.c Makefile: Makefile.pre config.c.in $(MAKESETUP) Setup Setup.local
+config.c Makefile: Makefile.pre config.c.in $(MAKESETUP)
+config.c Makefile: Setup.thread Setup Setup.local
+config.c Makefile:
                -rm -f $(LIBRARY)
-               $(SHELL) $(MAKESETUP) Setup.local Setup
+               $(SHELL) $(MAKESETUP) Setup.thread Setup.local Setup
 
 Setup:
                cp $(srcdir)/Setup.in Setup
index b4fcd7814ec42c81a225a915833f6dcf76e56598..fd673df0c82ca6557fd08cf79bf83d1fcd5806db 100644 (file)
@@ -95,11 +95,7 @@ signal signalmodule.c                # signal(2)
 
 #gl glmodule.c cgensupport.c -I$(srcdir) -lgl -lX11
 
-# Thread module -- use only if Python has thread support for your OS.
-# Note that you must have configured (and built!) Python with the
-# --with-thread option passed to the configure script for this to work:
-
-#thread threadmodule.c
+# The thread module is now automatically enabled, see Setup.thread.
 
 # Pure module.  Cannot be linked dynamically.
 # -DWITH_QUANTIFY, -DWITH_PURIFY, or -DWITH_ALL_PURE
diff --git a/Modules/Setup.thread.in b/Modules/Setup.thread.in
new file mode 100644 (file)
index 0000000..2b136c1
--- /dev/null
@@ -0,0 +1,11 @@
+# This file is transmogrified into Setup.thread by config.status.
+
+# Its purpose is to automatically enable the thread module when the
+# --with-thread argument is given to the configure script.
+
+# *NOTE*: if the configure script decides it can't support threads,
+# the thread module will still be enabled and cause compile errors.
+# The solution is not to use --with-thread on platforms that don't
+# support threads.
+
+@USE_THREAD_MODULE@thread threadmodule.c