mirror of
https://github.com/chocolate-doom/chocpkg.git
synced 2024-11-10 07:11:39 +00:00
Use gmake
over make
if it is installed.
BSD systems install GNU make as `gmake` along with their own less- capable version of make as `make`. If `gmake` is found to be installed, prefer it because the BSD makes don't often work as expected.
This commit is contained in:
parent
cf5290d208
commit
8fea99baa2
1 changed files with 13 additions and 2 deletions
|
@ -14,6 +14,17 @@ build_autotools::need_autoreconf() {
|
|||
[ ! -e configure ] || [ $configure_ac -nt configure ]
|
||||
}
|
||||
|
||||
# BSD systems usually have their own less-capable version of make, while
|
||||
# GNU make is installed as `gmake`. If a command named gmake is found,
|
||||
# prefer that over `make`.
|
||||
build_autotools::make() {
|
||||
if chocpkg::have_tool gmake; then
|
||||
gmake "$@"
|
||||
else
|
||||
make "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# This function encapsulates the "./configure; make" process that does the
|
||||
# actual build of the package. This should work for most autotools-based
|
||||
# packages but the intention is that this can be overrriden by packages.
|
||||
|
@ -45,7 +56,7 @@ do_build() {
|
|||
chocpkg::abort "Failed to configure package $PACKAGE_NAME for build."
|
||||
)
|
||||
|
||||
make $MAKE_OPTS || (
|
||||
build_autotools::make $MAKE_OPTS || (
|
||||
chocpkg::abort "Failed to build package $PACKAGE_NAME."
|
||||
)
|
||||
}
|
||||
|
@ -57,7 +68,7 @@ do_install() {
|
|||
cd "$AUTOTOOLS_BUILD_PATH"
|
||||
fi
|
||||
|
||||
make install || (
|
||||
build_autotools::make install || (
|
||||
chocpkg::abort "Failed to install package $PACKAGE_NAME."
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue