MT#55283 Abort make if required package is not found

Closes #2027

Change-Id: I609d326fe69c82268f4e58411549cf26afc68409
(cherry picked from commit aa28864c5d)
(cherry picked from commit e5cb48228f)
mr13.5.1
Orgad Shaneh 2 months ago committed by Richard Fuchs
parent a4794bcb00
commit 876b260f15

@ -1,12 +1,15 @@
# Define build flags for used dependencies.
$(top_srcdir)/config.mk:
$(top_srcdir)/utils/gen-common-flags >$@
$(top_srcdir)/config.mk: $(top_srcdir)/utils/gen-common-flags \
$(top_srcdir)/utils/gen-bcg729-flags \
$(top_srcdir)/utils/gen-codec-chain-flags
$(top_srcdir)/utils/gen-common-flags >$@.new
ifeq (,$(filter pkg.ngcp-rtpengine.nobcg729,${DEB_BUILD_PROFILES}))
$(top_srcdir)/utils/gen-bcg729-flags >>$@
$(top_srcdir)/utils/gen-bcg729-flags >>$@.new
endif
ifneq (,$(filter pkg.ngcp-rtpengine.codec-chain,${DEB_BUILD_PROFILES}))
$(top_srcdir)/utils/gen-codec-chain-flags >>$@
$(top_srcdir)/utils/gen-codec-chain-flags >>$@.new
endif
mv $@.new $@
include $(top_srcdir)/config.mk

@ -5,6 +5,11 @@ gen-pkgconf-flags()
local var="$1"
local pc="$2"
if ! pkg-config --exists "${pc}"; then
echo "Error: Required package '${pc}' not found" >&2
exit 1
fi
echo "export CFLAGS_${var} LDLIBS_${var}"
echo "CFLAGS_${var} := $(pkg-config --cflags "${pc}")"
echo "LDLIBS_${var} := $(pkg-config --libs "${pc}")"

Loading…
Cancel
Save