sonic-buildimage/src/libyang/Makefile
Guilt a73d443c1d
[CI][doc][build] Trim src folder files trailing blanks (#15162)
- Run pre-commit tox profile to trim all trailing blanks
- Use several commits with a per-folder based strategy
  to ease their merge

Issue #15114

Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
2023-05-24 10:01:43 -07:00

28 lines
895 B
Makefile

.ONESHELL:
SHELL = /bin/bash
.SHELLFLAGS += -e
MAIN_TARGET = $(LIBYANG)
DERIVED_TARGETS = $(LIBYANG_DEV) $(LIBYANG_DBGSYM) $(LIBYANG_PY3) $(LIBYANG_CPP)
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Obtaining the libyang
rm -fr ./libyang-$(LIBYANG_VERSION)
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
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
popd
mv $(DERIVED_TARGETS) $* $(DEST)/
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)