Add support for deb build profiles env variable (#15858)
Add support for a separate DEB_BUILD_PROFILES environment variable, to be able to set build profiles. This may be used to specify whether python 2 bindings/libraries should be built, or what configuration options should be specified for a package. This also makes it easier to append/remove build profiles from our rules files, which will be needed for the sairedis build. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
This commit is contained in:
parent
a4787fd213
commit
371c3a0be5
@ -46,7 +46,7 @@ $(LIBSAIMETADATA_DBG)_RDEPENDS += $(LIBSAIMETADATA)
|
||||
$(eval $(call add_derived_package,$(LIBSAIREDIS),$(LIBSAIMETADATA_DBG)))
|
||||
|
||||
ifeq ($(ENABLE_PY2_MODULES), n)
|
||||
$(LIBSAIREDIS)_BUILD_ENV += DEB_BUILD_PROFILES=nopython2
|
||||
$(LIBSAIREDIS)_DEB_BUILD_PROFILES += nopython2
|
||||
endif
|
||||
|
||||
# The .c, .cpp, .h & .hpp files under src/{$DBG_SRC_ARCHIVE list}
|
||||
|
@ -21,7 +21,7 @@ ifeq ($(ENABLE_PY2_MODULES), y)
|
||||
PYTHON_SWSSCOMMON = python-swsscommon_$(LIBSWSSCOMMON_VERSION)_$(CONFIGURED_ARCH).deb
|
||||
$(eval $(call add_derived_package,$(LIBSWSSCOMMON),$(PYTHON_SWSSCOMMON)))
|
||||
else
|
||||
$(LIBSWSSCOMMON)_BUILD_ENV += DEB_BUILD_PROFILES=nopython2
|
||||
$(LIBSWSSCOMMON)_DEB_BUILD_PROFILES += nopython2
|
||||
endif
|
||||
|
||||
PYTHON3_SWSSCOMMON = python3-swsscommon_$(LIBSWSSCOMMON_VERSION)_$(CONFIGURED_ARCH).deb
|
||||
|
@ -34,7 +34,7 @@ $(eval $(call add_derived_package,$(SYNCD),$(SYNCD_RPC_DBG)))
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_PY2_MODULES), n)
|
||||
$(SYNCD)_BUILD_ENV += DEB_BUILD_PROFILES=nopython2
|
||||
$(SYNCD)_DEB_BUILD_PROFILES += nopython2
|
||||
endif
|
||||
|
||||
endif
|
||||
|
4
slave.mk
4
slave.mk
@ -738,8 +738,8 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_DPKG_DEBS)) : $(DEBS_PATH)/% : .platform $$(a
|
||||
if [ -f ./autogen.sh ]; then ./autogen.sh $(LOG); fi
|
||||
$(SETUP_OVERLAYFS_FOR_DPKG_ADMINDIR)
|
||||
$(if $($*_DPKG_TARGET),
|
||||
${$*_BUILD_ENV} DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS_GENERIC} ${$*_DEB_BUILD_OPTIONS}" $(ANT_DEB_CONFIG) $(CROSS_COMPILE_FLAGS) dpkg-buildpackage -rfakeroot -b $(ANT_DEB_CROSS_OPT) -us -uc -tc -j$(SONIC_CONFIG_MAKE_JOBS) --as-root -T$($*_DPKG_TARGET) --admindir $$mergedir $(LOG),
|
||||
${$*_BUILD_ENV} DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS_GENERIC} ${$*_DEB_BUILD_OPTIONS}" $(ANT_DEB_CONFIG) $(CROSS_COMPILE_FLAGS) dpkg-buildpackage -rfakeroot -b $(ANT_DEB_CROSS_OPT) -us -uc -tc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $$mergedir $(LOG)
|
||||
${$*_BUILD_ENV} DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS_GENERIC} ${$*_DEB_BUILD_OPTIONS}" DEB_BUILD_PROFILES="${$*_DEB_BUILD_PROFILES}" $(ANT_DEB_CONFIG) $(CROSS_COMPILE_FLAGS) dpkg-buildpackage -rfakeroot -b $(ANT_DEB_CROSS_OPT) -us -uc -tc -j$(SONIC_CONFIG_MAKE_JOBS) --as-root -T$($*_DPKG_TARGET) --admindir $$mergedir $(LOG),
|
||||
${$*_BUILD_ENV} DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS_GENERIC} ${$*_DEB_BUILD_OPTIONS}" DEB_BUILD_PROFILES="${$*_DEB_BUILD_PROFILES}" $(ANT_DEB_CONFIG) $(CROSS_COMPILE_FLAGS) dpkg-buildpackage -rfakeroot -b $(ANT_DEB_CROSS_OPT) -us -uc -tc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $$mergedir $(LOG)
|
||||
)
|
||||
popd $(LOG_SIMPLE)
|
||||
# Clean up
|
||||
|
Loading…
Reference in New Issue
Block a user