![]() |
![]()
| ![]() |
![]()
NAME
DESCRIPTIONThe The intended way to use it is to add the following lines to make.conf(5). .sinclude "/usr/local/share/bsdadminscripts2/buildflags.mk" SYNTAXA /usr/local/share/bsdadminscripts2/buildflags.awk buildflags.conf | less The comments, locations, knobs and variables CommentsComments are everything behind a '#'. The only exception is a '#' within a '"' block. # This is a comment. LocationsA location is a folder in which a make job runs. Locations make it possible to limit assignments only to certain ports or other build systems. A location consists of a path and/or a pattern. The difference between a path and a pattern is that the pattern will remain untouched and a path will be resolved as far as possible. Resolving a path means that a path will be substituted with its physical path. Several locations can be connected with '&' (logical and) and '|' (logical or). If e.g. '/usr/ports' is a link to '/mnt/vault/ports' a location like '/usr/ports/x11*' will be resolved into '/mnt/vault/ports/x11*'. In this case '/usr/ports' is the path and '/x11*' the pattern. Every location is followed by a block that can contain comments, knobs, variables and other locations. A block is opened with the character '{' and closed with '}'. Here is an example: /usr/ports/* & !*/work/*{ WITH_IPV6 */x11/toolkits-gtk20 {WITHOUT_DEBUG} } KnobsA knob really is a variable with a default assignment: WITH_DEBUG !CPUTYPE This example would set 'WITH_DEBUG=yes' and undefine 'CPUTYPE'. You can have several knobs in a single line: WITH_DEBUG !CPUTYPE VariablesAssigning variables is simply done with an '=' other ways of assignment known from make(1) like '?=', ':=' or '!=' can also be used. There may not be spaces in front of a '='. If the '=' is followed by spaces. The whole trailing line will be assigned as the value, unless the first character is a '"'. Values may not contain a '"'. If the value is right behind the '=' only one word will be assigned, the next word will be treated as a knob or variable. Here are some examples of valid assignments: CPUTYPE?="pentium-m" CFLAGS="-O2 -pipe" THREADS=5 SUPFLAGS= -E -g -L 2 -z DirectivesNative make(1) directives can be included. Apart from putting trailing comments in front of them and removing preceding spaces they are not changed. Make directives begin with a '.', among them are '.if', '.include' and '.for'. The following is a valid example: /usr/ports/* { .if defined(WANT_I386) CFLAGS+= -m32 LDCONFIG+= -32 .endif } WARNINGSThere are things that should not be done. WRKDIRPREFIXDo not set the WRKDIRPREFIX directive in
SEE ALSOFILES
HISTORYThe AUTHORSDominic Fandrey <freebsd@k4m1.org>
|