ed71
![]() |
|
|
|
|
|||||||
| Installation and Maintenance of FreeBSD Ports or Packages Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software). |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Is there a way to automatically choose defaults when compiling? If there is I cannot find it.
|
|
#2
|
||||
|
||||
|
IIRC,
# 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. Failing that, you could just run # 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.
|
|
#3
|
|||
|
|||
|
To describe it:
BATCH=yes surpresses everything that the ports system can surpress, which includes all OPTIONS dialogs and some pkg-install scripts that ask questions, like mail/postfix/pkg-install. It also bails out when the port has IS_INTERACTIVE set. These are circumstances where operator intervention cannot be worked around, for example accepting a license. You can set this in your environment or in /etc/make.conf, though I advise setting it in your environment, since that allows you to easily turn it off. 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. The following script works around it: Code:
#!/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
|
|
#4
|
|||
|
|||
|
personally, for a big compile like X11, gnome/kde, openoffice (i'm a glutton for punishment)..
Code:
make -DBATCH install The other option is to use env(1) -- it's a one-time environmental alteration utility and then executes what's on the command line. So the confusion of setenv vs export are nullified with env(1) Enjoy! |
|
#5
|
||||
|
||||
|
Quote:
|
|
#6
|
||||
|
||||
|
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.
|
|
#7
|
||||
|
||||
|
You can install packages which are available for most ports.
They are compilled with default flags, recompiling under some other CPU won't give you real boost using them. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Broadcom 4401 chipset defaults to 10baseT/UTP Connection | eschleicher | Networking | 5 | February 17th, 2009 05:13 |
| what is real different between portupgrade -R and make deinstall and install | mfaridi | Installation and Maintenance of FreeBSD Ports or Packages | 7 | February 7th, 2009 20:37 |
| portinstall or make install clean | ccc | Installation and Maintenance of FreeBSD Ports or Packages | 2 | February 3rd, 2009 00:00 |
| send make install clean to Screen | mfaridi | Installation and Maintenance of FreeBSD Ports or Packages | 9 | January 25th, 2009 04:05 |
| make package without install | spock | Installation and Maintenance of FreeBSD Ports or Packages | 6 | November 19th, 2008 20:06 |