setting ENV VARs in make.conf/ports.conf ?

snowcrash+freebsd schneecrash+freebsd at gmail.com
Mon Apr 23 21:27:22 UTC 2007


hi,

i've installed FreeBSD v6.2-RELEASE, plus 'portconf' & 'ccache' from ports.

i've setup,

  /etc/make.conf
  -----------------------------
  PERL_VER=5.8.8
  PERL_VERSION=5.8.8
  USE_OPENSSL_PORT=true
  OPENSSLBASE=/usr/local
  USE_OPENSSH_PORT=true
  WITHOUT_X11=yes
  CPUTYPE?=pentium-mmx

  CFLAGS=      -O2 -pipe
  COPTFLAGS=   -O2 -pipe

  ## Begin portconf settings
  ## Do not touch these lines
  .if !empty(.CURDIR:M/usr/ports*) && exists(/usr/local/libexec/portconf)
   _PORTCONF!=/usr/local/libexec/portconf
   .for i in ${_PORTCONF:S/|/ /g}
    ${i:S/%/ /g}
   .endfor
  .endif
  ## End portconf settings

  .if !defined(NOCCACHE)
   CC=/usr/local/libexec/ccache/cc
   CXX=/usr/local/libexec/ccache/c++
   CPP=/usr/local/libexec/ccache/cpp
  .endif
  -----------------------------

so that i can turn OFF use of ccache for individual ports.

i find that different ports 'respond' only to specific ways of setting
the NOCCACHE var.

e.g., in,

  cat /usr/local/etc/ports.conf
  -----------------------------
  *:\
  CFLAGS= -O2 -pipe -funroll-loops -s -frename-registers
-fomit-frame-pointer | \
  CXXFLAGS= -O2 -pipe -funroll-loops -s -frename-registers

  databases/sqlite3-threads:NOCCACHE=true | \
    WITHOUT_DEBUG=true|WITH_DOCS=true|WITH_FTS1=true|WITH_TCLWRAPPER=true|BATCH=Yes

  sysutils/pflogx:MAKE_ENV= NOCCACHE=true | \
    WITH_EXPAT=true|BATCH=Yes
  -----------------------------

pflogx and sqlite3 require DIFFERENT specifications of NOCCACHE ...
swapping formate, e.g., causes the conditional ".if
!defined(NOCCACHE)" to fail; meaning, that the CC/CXX/CPP defs
pointing to ccahce/* are oncorrectly used.

is this expected/normal?  i would've expected the same method of
defining ENV VAR knobs ...

is there a _consistent_ way of turning off NOCCACHE via the ports.conf?

thanks!


More information about the freebsd-questions mailing list