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

Skip to content

Commit 2a57004

Browse files
committed
Changes to deal with the sigcheck+intrcheck vs. signalmodule controversy.
1 parent 2e23c31 commit 2a57004

4 files changed

Lines changed: 27 additions & 11 deletions

File tree

Makefile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ Makefiles: config.status Modules/Makefile.pre
432432
(echo making Makefile in subdirectory $$i; cd $$i; \
433433
$(MAKE) Makefile); \
434434
done
435+
-(rm -f Modules/hassignal; cd Modules; $(MAKE) hassignal)
435436

436437
# Build the intermediate Makefile in Modules
437438
Modules/Makefile.pre: config.status

Modules/Makefile.pre.in

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,10 @@ all: $(OBJS)
110110
# To deal with the conflict between signalmodule.o and
111111
# sigcheck.o+intrcheck.o, we remove the latter two if we have the former.
112112
add2lib: $(OBJS)
113-
-for i in $(OBJS); do \
114-
if test "$$i" = "signalmodule.o"; then \
115-
$(AR) d $(LIBRARY) sigcheck.o intrcheck.o 2>/dev/null; \
116-
break; \
117-
fi; \
118-
done
113+
-if test -f hassignal; \
114+
then echo removing sigcheck.o intrcheck.o; \
115+
$(AR) d $(LIBRARY) sigcheck.o intrcheck.o 2>/dev/null; \
116+
else echo leaving sigcheck.o intrcheck.o in; fi
119117
$(AR) cr $(LIBRARY) $(OBJS)
120118
touch add2lib
121119

@@ -152,6 +150,14 @@ config.c Makefile:
152150
-rm -f $(LIBRARY)
153151
$(SHELL) $(MAKESETUP) Setup.thread Setup.local Setup
154152

153+
hassignal:
154+
-rm -f hassignal
155+
-for i in $(OBJS); do \
156+
if test "$$i" = "signalmodule.o"; then \
157+
echo yes >hassignal; break; \
158+
fi; \
159+
done
160+
155161
Setup:
156162
cp $(srcdir)/Setup.in Setup
157163

Parser/Makefile.in

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ POBJS= acceler.o grammar1.o \
3434
parsetok.o tokenizer.o bitset.o \
3535
metagrammar.o
3636

37-
OBJS= $(POBJS) intrcheck.o myreadline.o
37+
AROBJS= $(POBJS) myreadline.o
38+
OBJS= $(AROBJS) intrcheck.o
39+
3840

3941
PGENMAIN= pgenmain.o
4042

@@ -54,7 +56,10 @@ all: $(PGEN) $(OBJS)
5456

5557
# This target is used by the master Makefile to add the objects to the library
5658
add2lib: $(OBJS)
57-
$(AR) cr $(LIBRARY) $(OBJS)
59+
$(AR) cr $(LIBRARY) $(AROBJS)
60+
if test ! -f ../Modules/hassignal; \
61+
then echo adding intrcheck.o; $(AR) r $(LIBRARY) intrcheck.o; \
62+
else echo leaving intrcheck.o out; fi
5863
touch add2lib
5964

6065
$(PGEN): $(PGENOBJS)

Python/Makefile.in

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ SHELL= /bin/sh
3434

3535
# === Fixed definitions ===
3636

37-
OBJS= \
37+
AROBJS= \
3838
bltinmodule.o \
3939
ceval.o compile.o \
4040
errors.o \
@@ -44,9 +44,10 @@ OBJS= \
4444
import.o importdl.o \
4545
marshal.o modsupport.o mystrtoul.o \
4646
pyfpe.o pystate.o pythonrun.o \
47-
sigcheck.o structmember.o sysmodule.o \
47+
structmember.o sysmodule.o \
4848
traceback.o \
4949
$(LIBOBJS)
50+
OBJS= $(AROBJS) sigcheck.o
5051

5152
LIBRARY= ../libpython$(VERSION).a
5253

@@ -57,7 +58,10 @@ all: $(OBJS)
5758

5859
# This target is used by the master Makefile to add the objects to the library
5960
add2lib: $(OBJS)
60-
$(AR) cr $(LIBRARY) $(OBJS)
61+
$(AR) cr $(LIBRARY) $(AROBJS)
62+
if test ! -f ../Modules/hassignal; \
63+
then echo adding sigcheck.o; $(AR) r $(LIBRARY) sigcheck.o; \
64+
else echo leaving sigcheck.o out; fi
6165
touch add2lib
6266

6367
clean:

0 commit comments

Comments
 (0)