void-packages/xbps-src/helpers/gnu-makefile.sh
Juan RP 90204b7b28 xbps-src: revamped build_style.
By default now it's assumed that if $build_style is not set, the template
uses 'custom-install' build, .e.g do_{build,configure,install}.

If it's set, a helper with the same name with .sh extension will be sourced
to set do_{build,configure,install} phases.

The exception is "meta-template" which currently it must be set via
build_style, probably will change in the future.
2011-10-24 14:12:09 +02:00

26 lines
533 B
Bash

#
# This helper is for templates using GNU Makefiles.
#
do_build() {
if [ -z "$make_cmd" ]; then
make_cmd=make
fi
if [ -n "$XBPS_MAKEJOBS" -a -z "$disable_parallel_build" ]; then
makejobs="-j$XBPS_MAKEJOBS"
fi
${make_cmd} ${makejobs} ${make_build_args} ${make_build_target}
}
do_install() {
local target
if [ -z "$make_install_target" ]; then
target="DESTDIR=${DESTDIR} install"
else
target="${make_install_target}"
fi
if [ -z "$make_cmd" ]; then
make_cmd=make
fi
${make_cmd} ${make_install_args} ${target}
}