Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
BUILDFLAGS.MK(1)	    General Commands Manual	      BUILDFLAGS.MK(1)

NAME
       buildflags.mk --	import buildflags.conf(5)

SYNOPSIS
       buildflags.mk

DESCRIPTION
       The  primary  function  of  the	buildflags.mk  script  is  to  use the
       buildflags.conf(5) file,	but it also offers knobs to easily  use	 tools
       such as distcc and ccache.

       The  intended  way  to  use  it	is  to	add  the  following  lines  to
       make.conf(5).

	     .sinclude "/usr/local/share/bsdadminscripts2/buildflags.mk"

   Options
       The following options to	control	the  internals	of  buildflags.mk  are
       available:

       BUILDFLAGS_CCACHE
	       The ccache binary.

	       Default:	/usr/local/bin/ccache

       BUILDFLAGS_CONF
	       The configuration file.

	       Default:	/usr/local/etc/buildflags.conf

       BUILDFLAGS_DISTCC
	       The distcc binary.

	       Default:	/usr/local/bin/distcc

       BUILDFLAGS_PARSER
	       The program that	parses the configuration file.

	       Default:	/usr/local/share/bsdadminscripts2/buildflags.awk

       BUILDFLAGS_TMP
	       A temporary file	required to include the	parsed configuration.

	       Default:	/tmp/buildflags.tmp.mk.${USER}

       The following additional	knobs are offered to manipulate	make jobs:

       SUBTHREADS
	       WARNING:	 This setting is deprecated in favour of the ports na-
	       tive settings FORCE_MAKE_JOBS and MAKE_JOBS_NUMBER.

	       This knob does for ports	what THREADS does everywhere else.  It
	       does  not  have	an  effect if the target install is specified.
	       Thus it is recommended to  run  make  build  and	 make  install
	       seperately.

       THREADS
	       This knob causes	make to	create parallel	jobs. A	sensible value
	       is  twice the number of CPU cores available. This increases the
	       amount of memory	used. If the system starts to swap often,  the
	       number  should  be  decreased  to  the  number of available CPU
	       cores.  Do not use THREADS with the ports system.

       USE_DISTCC
	       Prepends	the distcc binary to CC, CXX and CPP.

       USE_CCACHE
	       Prepends	the ccache binary to CC, CXX and CPP.

       WITH_GCC
	       Triggers	 the  use  of  the  alternative	  gcc	defined	  with
	       BUILDFLAGS_GCC.	 If  BUILDFLAGS_GCC  has  not been definied it
	       will be set to whatever WITH_GCC	was set.

SEE ALSO
       buildflags.awk(1), buildflags.conf(5)

HISTORY
       The buildflags.mk script	first appeared in the bsdadminscripts-2.0 col-
       lection.

AUTHORS
       Dominic Fandrey <freebsd@k4m1.org>

FreeBSD	Ports 14.quarterly     18 November, 2023	      BUILDFLAGS.MK(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=buildflags.mk&sektion=1&manpath=FreeBSD+Ports+14.3.quarterly>

home | help