don't bother resolving onbld python module deps
[unleashed.git] / share / mk / target-flags.mk
blob4525dbd08d7ba0048cebe2551eb700f57b91b412
1 # NAME:
2 # target-flags.mk - target specific flags
4 # DESCRIPTION:
5 # Include this macro file after all others in a makefile and
6 # follow it with any target specific flag settings.
7 # For each such variable v in TARGET_FLAG_VARS we set:
8 #.nf
10 # _$v := ${$v}
11 # $v = ${${v}_${.TARGET:T}:U${_$v}}
12 #.fi
14 # This allows one to do things like:
15 #.nf
17 # TARGET_FLAG_VARS= CFLAGS
18 # .include <target-flags.mk>
19 # CFLAGS_fu.o = ${_CFLAGS:N-Wall}
20 #.fi
22 # To turn off -Wall for just the target fu.o
23 # Actually CFLAGS is the default value for TARGET_FLAG_VARS.
25 # BUGS:
26 # One must be careful to avoid creating circular references in
27 # variables. The original version of this macro file did
28 # elaborate things with CFLAGS. The current, simpler
29 # implementation is ultimately more flexible.
31 # It is important that target-flags.mk is included after other
32 # macro files and that target specific flags that may reference
33 # _$v are set after that.
35 # Only works with a make(1) that does nested evaluation correctly.
39 # RCSid:
40 # $Id: target-flags.mk,v 1.9 2014/04/05 22:56:54 sjg Exp $
42 # @(#) Copyright (c) 1998-2002, Simon J. Gerraty
44 # This file is provided in the hope that it will
45 # be of use. There is absolutely NO WARRANTY.
46 # Permission to copy, redistribute or otherwise
47 # use this file is hereby granted provided that
48 # the above copyright notice and this notice are
49 # left intact.
51 # Please send copies of changes and bug-fixes to:
52 # sjg@crufty.net
55 TARGET_FLAG_VARS?= CFLAGS
56 .for v in ${TARGET_FLAG_VARS}
57 .ifndef _$v
58 _$v := ${$v}
59 $v = ${${v}_${.TARGET:T}:U${_$v}}
60 .endif
61 .endfor