# cd /usr/ports/x11-servers/xorg-server
# make -DWITHOUT_HAL install clean
How does it differ from pipe?!... "raw" mode and process the keystrokes unbuffered ...
kpa said:Set BATCH in the environment
# env BATCH=1 make whatever
#!/bin/sh
env BATCH=1 /usr/bin/make config
# cd /usr/ports/whatever; make -DWITH_VAR1 -DWITH_VAR2 -DWITHOUT_VAR3 ... install clean
# make -C /usr/ports/whatever/name -V OPTIONSFILE
Am I?phoenix said:You're trying to solve the wrong problem.
What I want to do is to ensure that if a port doesn't have its options set (options file in /var/db/ports/<portname>/options doesn't exist), THEN just send ENTER to dialog to set default options.phoenix said:The problem you are trying to solve is "how do I manipulate the OPTIONS dialog automatically by sending keystrokes to libdialog".
The correct problem description is "how do I pre-set OPTIONS for a port so that I don't have to muck around with the OPTIONS dialog".
And the solution to that is, read the Makefile, find the OPTIONS section, figure out the name of the variables, then set either WITH_VARNAME (enable) or WITHOUT_VARNAME (disable) for each of the variables. To set them only once, you specify them on the command-line as options to make:
# cd /usr/ports/whatever; make -DWITH_VAR1 -DWITH_VAR2 -DWITHOUT_VAR3 ... install clean
To set them permanently, store them in /var/db/ports/<portname>/options, which can be determined for any port like so:
# make -C /usr/ports/whatever/name -V OPTIONSFILE
cd_die /usr/ports/"$1"
# Auto set to default options
# DON'T indent it!
# Send key 'o' to dialog and quiet it, as we don't wana see dialog
qcmd "$make" config <<MyEND
o
MyEND
That is not true, as I already replied to kpa.phoenix said:If there are no options set (options file not present), then go with the defaults by adding -DBATCH to the make command-line. That way, you won't even see the OPTIONS dialog appear at all.
So, you do a check for the options file, and conditionally add -DBATCH to the command-line.
# make install
.# env BATCH=1 make -C /usr/ports/www/chromium install clean
Yours shoot is a closest one ...aragon said:# DIALOG=true make config
WITHOUT_VISUALISATION=true
WITHOUT_LASTFM=true
WITHOUT_GPOD=true
WITHOUT_MTP=true
WITHOUT_VISUALISATION=true
WITH_LASTFM=true
WITH_GPOD=true
WITH_MTP=true
Additionally ..., could you tell me where is it documented?aragon said:# DIALOG=true make config