Browse Source

MT#55283 Abort make if required package is not found

Closes #2027

Change-Id: I609d326fe69c82268f4e58411549cf26afc68409
pull/1126/merge
Orgad Shaneh 4 weeks ago
committed by Richard Fuchs
parent
commit
aa28864c5d
2 changed files with 12 additions and 4 deletions
  1. +7
    -4
      lib/deps.Makefile
  2. +5
    -0
      utils/gen-common-flags

+ 7
- 4
lib/deps.Makefile View File

@ -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
- 0
utils/gen-common-flags View File

@ -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