Skip to content

Commit 091a41b

Browse files
authored
[dhcp_relay] Build dhcprelay from dhcp6relay folder when available (#23785)
Why I did it Moving DHCP v6 Relay code to dhcp6relay folder in sonic-dhcp-relay repo. For compilation to succeed when the code is moved , these changes are raised to compile if dhcp6relay folder is present. Otherwise it will compile as before. Corresponding sonic-dhcp-relay PR: sonic-net/sonic-dhcp-relay#72 How I did it Added a check to verify if dhcprelay/dhcp6relay exists , then it will compile from that folder. How to verify it Default compilation Move DHCP v6 related code to dhcprelay/dhcp6relay folder Both above cases code should compile.
1 parent b251c0d commit 091a41b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rules/dhcprelay.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ SONIC_DHCPRELAY_PKG_NAME = dhcp6relay
55

66
SONIC_DHCPRELAY = sonic-$(SONIC_DHCPRELAY_PKG_NAME)_$(SONIC_DHCPRELAY_VERSION)_$(CONFIGURED_ARCH).deb
77
$(SONIC_DHCPRELAY)_DEPENDS = $(LIBSWSSCOMMON) $(LIBSWSSCOMMON_DEV)
8-
$(SONIC_DHCPRELAY)_SRC_PATH = $(SRC_PATH)/dhcprelay
8+
ifneq ("$(wildcard $(SRC_PATH)/dhcprelay/dhcp6relay)","")
9+
$(SONIC_DHCPRELAY)_SRC_PATH = $(SRC_PATH)/dhcprelay/dhcp6relay
10+
else
11+
$(SONIC_DHCPRELAY)_SRC_PATH = $(SRC_PATH)/dhcprelay
12+
endif
913
SONIC_DPKG_DEBS += $(SONIC_DHCPRELAY)
1014

1115
SONIC_DHCPRELAY_DBG = sonic-$(SONIC_DHCPRELAY_PKG_NAME)-dbgsym_$(SONIC_DHCPRELAY_VERSION)_$(CONFIGURED_ARCH).deb

0 commit comments

Comments
 (0)