midipix / build / midipix_build

Forked from build/midipix_build 4 years ago
Clone

Blame subr/pkg_build.subr

Lucio Andrés Illanes Albornoz (arab, vxp) 570129
#
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
# . ./build.vars and set -o errexit -o noglob are assumed.
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
# See warning at the top of build.vars.
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) 570129
	if [ -n "${PKG_BUILD_CMDLINE}" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		${PKG_BUILD_CMDLINE};
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	elif [ ${PKG_NO_MAKE_BUILD:-0} -eq 0 ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		if [ "${PKG_SLIBTOOL}" != "default" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			export MAKE="make LIBTOOL=${PKG_SLIBTOOL:-slibtool}";
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		# N.B.	We only specify CC= here if the current package does not use GNU
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		#	autoconf as it often abuses it by appending -std={gnu99,...} to it
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		#	instead of amending CFLAGS.
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		run_cmd_unsplit make							\
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			${PKG_MAKEFLAGS_BUILD}						\
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			${PKG_MAKEFLAGS_BUILD_EXTRA}					\
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			AR=${AR} ${__no_autoconf:+CC=${CC}} RANLIB=${RANLIB}		\
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			"${PKG_CFLAGS_BUILD:+CFLAGS=${PKG_CFLAGS_BUILD}}"		\
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			"${CFLAGS_FOR_BUILD:+CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD}}"	\
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			"${PKG_CFLAGS_BUILD_EXTRA:+CFLAGS+=${PKG_CFLAGS_BUILD_EXTRA}}"	\
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			"${PKG_LDFLAGS_BUILD:+LDFLAGS=${PKG_LDFLAGS_BUILD}}"		\
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
			"${PKG_LDFLAGS_BUILD_EXTRA:+LDFLAGS+=${PKG_LDFLAGS_BUILD_EXTRA}}";
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		unset __no_autoconf;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	set_build_script_done build -install;
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