File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
437438Modules/Makefile.pre : config.status
Original file line number Diff line number Diff 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.
112112add2lib: $(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+
155161Setup:
156162 cp $(srcdir)/Setup.in Setup
157163
Original file line number Diff line number Diff 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
3941PGENMAIN = 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
5658add2lib : $(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 )
Original file line number Diff line number Diff 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
5152LIBRARY = ../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
5960add2lib : $(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
6367clean :
You can’t perform that action at this time.
0 commit comments