New submission from Vinay Sajip <vinay_sa...@yahoo.co.uk>:

There appears to be a failure in the Makefile build logic. Steps to reproduce:

1. Make a fresh build using "make clean && make"
2. run "touch Modules/_io/_iomodule.h"
3. Run "make" again.

Observed result: No related files get built.
Expected result: The directly including compilation units 
Modules/_io/{_iomodule,iobase,fileio,bufferedio,textio,bytesio,stringio}.o 
should be built. The compilation units which depend on these (e.g. 
Modules/textio.o) should also be built.

The problem appears to be related to Modules/makesetup, which adds rules to tbe 
Makefile. An example of a rule is

Modules/textio.o: $(srcdir)/Modules/_io/textio.c; $(CC) 
$(PY_BUILTIN_MODULE_CFLAGS)  -DPy_BUILD_CORE_BUILTIN 
-I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io -c 
$(srcdir)/Modules/_io/textio.c -o Modules/textio.o

The problem here looks like the lack of a dependency between 
Modules/_io/textio.o and Modules/_io/textio.o - there is only a dependency on 
Modules/_io/textio.c, which wouldn't be rebuilt on a touch of 
Modules/_io/_iomodule.h.

----------
components: Build
messages: 353105
nosy: vinay.sajip
priority: high
severity: normal
status: open
title: Makefile appears broken - touching header causes no build
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38264>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to