Message404899
I'm using a very simple conditional logic in Setup, which is based
on sed, mostly to add platform specific variables:
In Setup:
# @if macosx: TIME_DEFS=
# @if not macosx: TIME_DEFS=-lrt
time -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal timemodule.c
$(TIME_DEFS) # -lm # time operations and variables
In Makefile:
# Install the custom Modules/Setup file
if test "$(MACOSX_PLATFORM)"; then \
sed -e 's/# @if macosx: *//' \
$(PYRUNDIR)/$(MODULESSETUP) > $(PYTHONDIR)/Modules/Setup; \
elif test "$(FREEBSD_PLATFORM)"; then \
sed -e 's/# @if freebsd: *//' \
$(PYRUNDIR)/$(MODULESSETUP) > $(PYTHONDIR)/Modules/Setup; \
else \
sed -e 's/# @if not macosx: *//' \
-e 's/# @if not freebsd: *//' \
$(PYRUNDIR)/$(MODULESSETUP) > $(PYTHONDIR)/Modules/Setup; \
fi;
Setup used to be templated as well in the past, but that logic was removed
at some point. Perhaps it's time to reintroduce it. |
|
Date |
User |
Action |
Args |
2021-10-23 18:18:09 | lemburg | set | recipients:
+ lemburg, brett.cannon, christian.heimes, ned.deily, zach.ware, miss-islington |
2021-10-23 18:18:09 | lemburg | link | issue45548 messages |
2021-10-23 18:18:09 | lemburg | create | |
|