blob: 602a669aa16ac0ba8190d0a3dc08baeba91b363e [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#
2# Class to disable binconfig files instead of installing them
3#
4
5# The list of scripts which should be disabled.
6BINCONFIG ?= ""
7
8FILES_${PN}-dev += "${bindir}/*-config"
9
10do_install_append () {
11 for x in ${BINCONFIG}; do
12 # Make the disabled script emit invalid parameters for those configure
13 # scripts which call it without checking the return code.
14 echo "#!/bin/sh" > ${D}$x
15 echo "echo 'ERROR: $x should not be used, use an alternative such as pkg-config' >&2" >> ${D}$x
16 echo "echo '--should-not-have-used-$x'" >> ${D}$x
17 echo "exit 1" >> ${D}$x
18 done
19}
20
21SYSROOT_PREPROCESS_FUNCS += "binconfig_disabled_sysroot_preprocess"
22
23binconfig_disabled_sysroot_preprocess () {
24 for x in ${BINCONFIG}; do
25 configname=`basename $x`
26 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
27 install ${D}$x ${SYSROOT_DESTDIR}${bindir_crossscripts}
28 done
29}