Marcel Telka
2022-10-25 e537d331fe36125633c10331a394ac57c246c725
make-rules: support for single perl/python version builds

4 files modified
32 ■■■■■ changed files
make-rules/common.mk 20 ●●●●● patch | view | raw | blame | history
make-rules/makemaker-defaults.mk 3 ●●●●● patch | view | raw | blame | history
make-rules/setup.py-defaults.mk 3 ●●●●● patch | view | raw | blame | history
make-rules/setup.py.mk 6 ●●●● patch | view | raw | blame | history
make-rules/common.mk
@@ -35,6 +35,26 @@
# Some build styles might want to set some defaults before prep.mk is included.
-include $(WS_MAKE_RULES)/$(strip $(BUILD_STYLE))-defaults.mk
# The SINGLE_PERL_VERSION variable is used to select building a component for
# single or multiple Perl versions.  By default we build for single Perl
# version only unless the component is a Perl module.  If the default value of
# SINGLE_PERL_VERSION is not what is needed for a component it could be
# overridden in component's Makefile.
SINGLE_PERL_VERSION ?= yes
ifeq ($(strip $(SINGLE_PERL_VERSION)),yes)
PERL_VERSIONS = $(PERL_VERSION)
endif
# The SINGLE_PYTHON_VERSION variable is used to select building a component for
# single or multiple Python versions.  By default we build for single Python
# version only unless the component is a Python project.  If the default value
# of SINGLE_PYTHON_VERSION is not what is needed for a component it could be
# overridden in component's Makefile.
SINGLE_PYTHON_VERSION ?= yes
ifeq ($(strip $(SINGLE_PYTHON_VERSION)),yes)
PYTHON_VERSIONS = $(PYTHON_VERSION)
endif
include $(WS_MAKE_RULES)/prep.mk
# Override this to limit builds and publication to a single architecture.
make-rules/makemaker-defaults.mk
@@ -39,3 +39,6 @@
else
ASLR_MODE = $(ASLR_ENABLE)
endif
# By default we build Perl modules for all supported Perl versions
SINGLE_PERL_VERSION ?= no
make-rules/setup.py-defaults.mk
@@ -28,3 +28,6 @@
else
ASLR_MODE = $(ASLR_ENABLE)
endif
# By default we build Python projects for all supported Python versions
SINGLE_PYTHON_VERSION ?= no
make-rules/setup.py.mk
@@ -105,6 +105,7 @@
    $(COMPONENT_POST_INSTALL_ACTION)
    $(TOUCH) $@
ifeq ($(strip $(SINGLE_PYTHON_VERSION)),no)
# Rename binaries in /usr/bin to contain version number
COMPONENT_POST_INSTALL_ACTION += \
    for f in $(PROTOUSRBINDIR)/* ; do \
@@ -114,6 +115,7 @@
        done ; \
        $(MV) $$f $$f-$(PYTHON_VERSION) ; \
    done ;
endif
# Define Python version specific filenames for tests.
ifeq ($(strip $(USE_COMMON_TEST_MASTER)),no)
@@ -230,9 +232,11 @@
    $(TOUCH) $@
ifeq ($(strip $(SINGLE_PYTHON_VERSION)),no)
# We need to add -$(PYV) to package fmri
GENERATE_EXTRA_CMD += | \
    $(GSED) -e 's/^\(set name=pkg.fmri [^@]*\)\(.*\)$$/\1-$$(PYV)\2/' \
    $(GSED) -e 's/^\(set name=pkg.fmri [^@]*\)\(.*\)$$/\1-$$(PYV)\2/'
endif
clean::