How to define variables when using portupgrade

Martin Karlsson mk-freebsd at bredband.net
Thu Apr 10 04:16:24 PDT 2003


* Adam <blueeskimo at gmx.net> [2003-04-10 00.59 -0400]:
> When compiling a port for the first time, you can define variables for
> the Makefile easily:
> make -DWITH_GMP install clean
> 
> However, I'm not sure how to define the same variable when using
> portupgrade. Is it possible? I am currently manually deinstalling and
> recompiling ports whenever I need to customize the compile process.
> 
> Is there a better way?

Excerpt from 'man portupgrade(1):
(same for portinstall)

   OPTIONS
     The following command line arguments are supported:
     [...]
     -m
     --make-args     Specify arguments to append to each make(1) com-
                     mand line.

Use it like so:

   # portupgrade -m 'WITH_FOO=yes USE_BAR=no' category/port

Or use Igor's advice to automate the process.

HTH, 
martink
-- 
Martin Karlsson


More information about the freebsd-questions mailing list