Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[master][build] fix compile error when enable nostrip #6058

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/hiredis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = libhiredis0.14_$(HIREDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb
DERIVED_TARGETS = libhiredis0.14-dbgsym_$(HIREDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb libhiredis-dev_$(HIREDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb
DBG_TARGETS = libhiredis0.14-dbgsym_$(HIREDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb
DERIVED_TARGETS = libhiredis-dev_$(HIREDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb

ifneq ($(findstring nostrip,$(DEB_BUILD_OPTIONS)),nostrip)
$(eval DERIVED_TARGETS += $(DBG_TARGETS))
endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is common across different Makefile, then I think it is better to be move to common place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok


$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -rf hiredis-$(HIREDIS_VERSION)
Expand Down
7 changes: 6 additions & 1 deletion src/isc-dhcp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = $(ISC_DHCP_RELAY)
DERIVED_TARGETS = $(ISC_DHCP_RELAY_DBG)
DBG_TARGETS = $(ISC_DHCP_RELAY_DBG)
DERIVED_TARGETS =

ifneq ($(findstring nostrip,$(DEB_BUILD_OPTIONS)),nostrip)
$(eval DERIVED_TARGETS += $(DBG_TARGETS))
endif

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Remove any stale files
Expand Down
12 changes: 8 additions & 4 deletions src/libteam/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = libteam5_$(LIBTEAM_VERSION)_$(CONFIGURED_ARCH).deb
DERIVED_TARGETS = libteam-dev_$(LIBTEAM_VERSION)_$(CONFIGURED_ARCH).deb \
libteamdctl0_$(LIBTEAM_VERSION)_$(CONFIGURED_ARCH).deb \
libteam-utils_$(LIBTEAM_VERSION)_$(CONFIGURED_ARCH).deb \
libteam5-dbgsym_$(LIBTEAM_VERSION)_$(CONFIGURED_ARCH).deb \
DBG_TARGETS = libteam5-dbgsym_$(LIBTEAM_VERSION)_$(CONFIGURED_ARCH).deb \
libteamdctl0-dbgsym_$(LIBTEAM_VERSION)_$(CONFIGURED_ARCH).deb \
libteam-utils-dbgsym_$(LIBTEAM_VERSION)_$(CONFIGURED_ARCH).deb
DERIVED_TARGETS = libteam-dev_$(LIBTEAM_VERSION)_$(CONFIGURED_ARCH).deb \
libteamdctl0_$(LIBTEAM_VERSION)_$(CONFIGURED_ARCH).deb \
libteam-utils_$(LIBTEAM_VERSION)_$(CONFIGURED_ARCH).deb

ifneq ($(findstring nostrip,$(DEB_BUILD_OPTIONS)),nostrip)
$(eval DERIVED_TARGETS += $(DBG_TARGETS))
endif

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Obtain libteam
Expand Down
7 changes: 6 additions & 1 deletion src/libyang/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = $(LIBYANG)
DERIVED_TARGETS = $(LIBYANG_DEV) $(LIBYANG_DBG) $(LIBYANG_PY2) $(LIBYANG_PY3) $(LIBYANG_CPP)
DBG_TARGETS = $(LIBYANG_DBG)
DERIVED_TARGETS = $(LIBYANG_DEV) $(LIBYANG_PY2) $(LIBYANG_PY3) $(LIBYANG_CPP)

ifneq ($(findstring nostrip,$(DEB_BUILD_OPTIONS)),nostrip)
$(eval DERIVED_TARGETS += $(DBG_TARGETS))
endif

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Obtaining the libyang
Expand Down
7 changes: 6 additions & 1 deletion src/lldpd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = $(LLDPD)
DERIVED_TARGETS = $(LIBLLDPCTL) $(LLDPD_DBG)
DBG_TARGETS = $(LLDPD_DBG)
DERIVED_TARGETS = $(LIBLLDPCTL)

LLDP_URL = https://sonicstorage.blob.core.windows.net/debian/pool/main/l/lldpd

Expand All @@ -15,6 +16,10 @@ DSC_FILE_URL = $(LLDP_URL)/$(DSC_FILE)
ORIG_FILE_URL = $(LLDP_URL)/$(ORIG_FILE)
DEBIAN_FILE_URL = $(LLDP_URL)/$(DEBIAN_FILE)

ifneq ($(findstring nostrip,$(DEB_BUILD_OPTIONS)),nostrip)
$(eval DERIVED_TARGETS += $(DBG_TARGETS))
endif

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Remove any stale files
rm -rf lldpd-$(LLDPD_VERSION)
Expand Down
12 changes: 8 additions & 4 deletions src/lm-sensors/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ SHELL = /bin/bash


MAIN_TARGET = $(LM_SENSORS)
DBG_TARGETS = $(LM_SENSORS_DBG) \
$(LIBSENSORS_DBG) \
$(SENSORD_DBG)
DERIVED_TARGETS = fancontrol_$(LM_SENSORS_VERSION_FULL)_all.deb \
$(LIBSENSORS) \
sensord_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
$(LM_SENSORS_DBG) \
$(LIBSENSORS_DBG) \
$(SENSORD_DBG)
sensord_$(LM_SENSORS_VERSION_FULL)_$(CONFIGURED_ARCH).deb

ifneq ($(findstring nostrip,$(DEB_BUILD_OPTIONS)),nostrip)
$(eval DERIVED_TARGETS += $(DBG_TARGETS))
endif

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -rf lm-sensors-$(LM_SENSORS_VERSION)
Expand Down
7 changes: 6 additions & 1 deletion src/monit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = monit_$(MONIT_VERSION)_$(CONFIGURED_ARCH).deb
DERIVED_TARGETS = monit-dbgsym_$(MONIT_VERSION)_$(CONFIGURED_ARCH).deb
DBG_TARGETS = monit-dbgsym_$(MONIT_VERSION)_$(CONFIGURED_ARCH).deb
DERIVED_TARGETS =

ifneq ($(findstring nostrip,$(DEB_BUILD_OPTIONS)),nostrip)
$(eval DERIVED_TARGETS += $(DBG_TARGETS))
endif

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Remove any stale files
Expand Down
8 changes: 7 additions & 1 deletion src/openssh/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = openssh-server_$(OPENSSH_VERSION)_$(CONFIGURED_ARCH).deb
DERIVED_TARGETS = openssh-server-dbgsym_$(OPENSSH_VERSION)_$(CONFIGURED_ARCH).deb
DBG_TARGETS = openssh-server-dbgsym_$(OPENSSH_VERSION)_$(CONFIGURED_ARCH).deb
DERIVED_TARGETS =

ifneq ($(findstring nostrip,$(DEB_BUILD_OPTIONS)),nostrip)
$(eval DERIVED_TARGETS += $(DBG_TARGETS))
endif


$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Obtain openssh: https://salsa.debian.org/ssh-team/openssh/-/tree/debian/1%257.9p1-10+deb10u2
Expand Down
8 changes: 6 additions & 2 deletions src/redis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ REDIS_VERSION = 5.0.3
REDIS_VERSION_FULL = $(REDIS_VERSION)-3~bpo9+2

MAIN_TARGET = redis-server_$(REDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb
DBG_TARGETS = redis-tools-dbgsym_$(REDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb
DERIVED_TARGETS = redis-tools_$(REDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
redis-sentinel_$(REDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
redis-tools-dbgsym_$(REDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb
redis-sentinel_$(REDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb

ifneq ($(findstring nostrip,$(DEB_BUILD_OPTIONS)),nostrip)
$(eval DERIVED_TARGETS += $(DBG_TARGETS))
endif

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -rf redis_build
Expand Down
7 changes: 6 additions & 1 deletion src/sflow/hsflowd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = $(HSFLOWD)
DERIVED_TARGET = $(HSFLOWD_DBG)
DBG_TARGETS = $(HSFLOWD_DBG)
DERIVED_TARGET =

ifneq ($(findstring nostrip,$(DEB_BUILD_OPTIONS)),nostrip)
$(eval DERIVED_TARGETS += $(DBG_TARGETS))
endif

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -fr ./host-sflow
Expand Down
8 changes: 6 additions & 2 deletions src/snmpd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@ SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = libsnmp-base_$(SNMPD_VERSION_FULL)_all.deb
DBG_TARGETS = snmp-dbgsym_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
snmpd-dbgsym_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb
DERIVED_TARGETS = snmptrapd_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
snmp_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
snmpd_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
snmp-dbgsym_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
snmpd-dbgsym_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
libsnmp30_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
libsnmp30-dbg_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
libsnmp-dev_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
libsnmp-perl_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
python-netsnmp_$(SNMPD_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
tkmib_$(SNMPD_VERSION_FULL)_all.deb

ifneq ($(findstring nostrip,$(DEB_BUILD_OPTIONS)),nostrip)
$(eval DERIVED_TARGETS += $(DBG_TARGETS))
endif

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -rf net-snmp-$(SNMPD_VERSION)

Expand Down
7 changes: 6 additions & 1 deletion src/sonic-frr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = $(FRR)
DERIVED_TARGET = $(FRR_PYTHONTOOLS) $(FRR_DBG) $(FRR_SNMP) $(FRR_SNMP_DBG)
DBG_TARGETS = $(FRR_DBG) $(FRR_SNMP_DBG)
DERIVED_TARGET = $(FRR_PYTHONTOOLS) $(FRR_SNMP)
SUFFIX = $(shell date +%Y%m%d\.%H%M%S)
STG_BRANCH = stg_temp.$(SUFFIX)

ifneq ($(findstring nostrip,$(DEB_BUILD_OPTIONS)),nostrip)
$(eval DERIVED_TARGET += $(DBG_TARGETS))
endif

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Build the package
pushd ./frr
Expand Down
7 changes: 6 additions & 1 deletion src/swig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = $(SWIG_BASE)
DERIVED_TARGETS = $(SWIG) $(SWIG_DBG)
DBG_TARGETS = $(SWIG_DBG)
DERIVED_TARGETS = $(SWIG)

ifneq ($(findstring nostrip,$(DEB_BUILD_OPTIONS)),nostrip)
$(eval DERIVED_TARGETS += $(DBG_TARGETS))
endif

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -fr ./swig-$(SWIG_VERSION) *.deb
Expand Down
6 changes: 5 additions & 1 deletion src/systemd-sonic-generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ CFLAGS=-std=gnu99

BINARY = systemd-sonic-generator
MAIN_TARGET = $(BINARY)_1.0.0_$(CONFIGURED_ARCH).deb
DBG_TARGETS = $(BINARY)-dbgsym_1.0.0_$(CONFIGURED_ARCH).deb

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
dpkg-buildpackage -us -uc -b
mv ../$(MAIN_TARGET) $(DEST)/
rm ../$(BINARY)-* ../$(BINARY)_*
rm ../$(BINARY)_*
ifneq ($(findstring nostrip,$(DEB_BUILD_OPTIONS)),nostrip)
rm ../$(DBG_TARGETS)
endif

$(BINARY): systemd-sonic-generator.c
rm -f ./systemd-sonic-generator
Expand Down