Blame subr/pkg_build.subr

Lucio Andrés Illanes Albornoz (arab, vxp) 570129
#
Lucio Andrés Illanes Albornoz (arab, vxp) 802215
# set -o errexit -o noglob are assumed.
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
#
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
pkg_build() {
Lucio Andrés Illanes Albornoz (arab, vxp) d5afb4
	local _no_autoconf;
Lucio Andrés Illanes Albornoz (arab, vxp) d5afb4
	if [ ! -x "${PKG_CONFIGURE}" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) d5afb4
		_no_autoconf=1;
Lucio Andrés Illanes Albornoz (arab, vxp) d5afb4
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
	# N.B.	We only specify CC= here if the current package does not use GNU
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
	#	autoconf as it often abuses it by appending -std={gnu99,...} to it
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
	#	instead of amending CFLAGS.
Lucio Andrés Illanes Albornoz (arab, vxp) 32ad21
	ex_run_cmd_unsplit make							\
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
		${PKG_MAKEFLAGS_BUILD}						\
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
		${PKG_MAKEFLAGS_BUILD_EXTRA}					\
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
		AR=${AR} ${_no_autoconf:+CC=${CC}} RANLIB=${RANLIB}		\
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
		"${PKG_CFLAGS_BUILD:+CFLAGS=${PKG_CFLAGS_BUILD}}"		\
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
		"${CFLAGS_FOR_BUILD:+CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD}}"	\
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
		"${PKG_CFLAGS_BUILD_EXTRA:+CFLAGS+=${PKG_CFLAGS_BUILD_EXTRA}}"	\
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
		"${PKG_LDFLAGS_BUILD:+LDFLAGS=${PKG_LDFLAGS_BUILD}}"		\
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
		"${PKG_LDFLAGS_BUILD_EXTRA:+LDFLAGS+=${PKG_LDFLAGS_BUILD_EXTRA}}"\
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
		"LIBTOOL=${PKG_SLIBTOOL:-slibtool}";
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
};
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
# vim:filetype=sh