Martin Panter added the comment:

$(LIBPC) is a single directory name, so I suggest dropping the “for” loop.

Patch 2 should avoid the practical race condition. But there is technically 
still a race with “libainstall” and “bininstall” both testing and creating the 
same directory. Maybe we should factor it out, something like:

$(DESTDIR)$(LIBPC):
        @echo "Creating directory $@"
        @$(INSTALL) -d -m $(DIRMODE) $@
. . .
bininstall: altbininstall $(DESTDIR)$(LIBPC)
. . .
libainstall: all python-config $(DESTDIR)$(LIBPC)
        @for i in $(LIBDIR) $(LIBPL); \
        . . .

Looking at the history, the test-then-install code comes from 20 years ago: 
<https://hg.python.org/cpython/rev/d41d89eb43e5#l1.150>. I would say calling 
install unconditionally (without a test or echo message) might be simpler, but 
that’s probably getting out of scope here.

----------
nosy: +martin.panter
stage:  -> patch review

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

Reply via email to