2019-05-16 12:59:12 -05:00
|
|
|
.ONESHELL:
|
|
|
|
SHELL = /bin/bash
|
|
|
|
.SHELLFLAGS += -e
|
|
|
|
|
|
|
|
MAIN_TARGET = $(LIBYANG)
|
2022-07-21 16:15:16 -05:00
|
|
|
DERIVED_TARGETS = $(LIBYANG_DEV) $(LIBYANG_DBGSYM) $(LIBYANG_PY3) $(LIBYANG_CPP)
|
2019-05-16 12:59:12 -05:00
|
|
|
|
|
|
|
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
2019-11-07 15:45:39 -06:00
|
|
|
# Obtaining the libyang
|
2019-05-16 12:59:12 -05:00
|
|
|
rm -fr ./libyang-$(LIBYANG_VERSION)
|
2019-11-07 15:45:39 -06:00
|
|
|
git clone https://github.com/CESNET/libyang.git libyang-$(LIBYANG_VERSION)
|
|
|
|
pushd libyang-$(LIBYANG_VERSION)
|
|
|
|
git checkout tags/v1.0-r4 -b libyang
|
|
|
|
# Apply patch series
|
|
|
|
stg init
|
|
|
|
stg import -s ../patch/series
|
2023-05-24 12:01:43 -05:00
|
|
|
|
2022-07-21 16:15:16 -05:00
|
|
|
ifeq ($(CROSS_BUILD_ENVIRON), y)
|
|
|
|
dpkg-buildpackage -rfakeroot -b -us -uc -a$(CONFIGURED_ARCH) -Pcross,nocheck -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
|
|
|
|
else
|
|
|
|
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
|
|
|
|
endif
|
2019-11-07 15:45:39 -06:00
|
|
|
popd
|
2019-05-16 12:59:12 -05:00
|
|
|
|
2022-07-21 16:15:16 -05:00
|
|
|
mv $(DERIVED_TARGETS) $* $(DEST)/
|
|
|
|
|
2019-05-16 12:59:12 -05:00
|
|
|
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)
|