Is there a way to automatically choose defaults when compiling? If there is I cannot find it.
# setenv BATCH yes
(for csh-based) or # export BATCH="yes"
(for sh-based) should do it. It's documented in the manpages for ports(7), but its description there is not crystal clear to me. # cd /usr/ports/path/to/port && make config-recursive
-- answer all the config dialogs and then make afterwards so that you won't be bothered with them.#!/bin/sh
# vim: ts=4 sw=4 tw=78 noet ai
VISITED=
PORTSDIR=${PORTSDIR:="/usr/ports"}
CURDIR=$1
[ -z "${CURDIR}" ] && CURDIR=.
[ ! -d "${CURDIR}" ] && CURDIR="${PORTSDIR}/${CURDIR}"
config_port() {
local ldeps rdeps bdeps
make config-conditional
ldeps=`make -V LIB_DEPENDS`
rdeps=`make -V RUN_DEPENDS`
bdeps=`make -V BUILD_DEPENDS`
for dep in ${ldeps} ${rdeps} ${bdeps}; do
dir=${dep##*:}
case ${VISITED} in
*" ${dir}"*)
;;
*)
echo "---> $dir"
VISITED="${VISITED} ${dir}"
cd ${dir}
config_port
esac
done
}
cd ${CURDIR}
config_port
make -DBATCH install
Mel_Flynn said:I'm afraid make config-recursive is flawed. It uses the current list to traverse it's dependencies, rather then the list obtained after the OPTIONS dialog.
Just run it again after you've added some options. I usually run make config-recursive a couple of times until it returns without showing any options.Mel_Flynn said:I'm afraid make config-recursive is flawed. It uses the current list to traverse it's dependencies, rather then the list obtained after the OPTIONS dialog.