mirror of https://github.com/ArduPilot/ardupilot
waf: set variant for all build context classes
That way there's no need to manually add a newly defined build context class to the list in the iteration.
This commit is contained in:
parent
5699bf04d0
commit
51505a82bb
10
wscript
10
wscript
|
@ -11,7 +11,8 @@ import ardupilotwaf
|
||||||
import boards
|
import boards
|
||||||
|
|
||||||
from waflib import ConfigSet, Utils
|
from waflib import ConfigSet, Utils
|
||||||
from waflib.Build import BuildContext, CleanContext, InstallContext, UninstallContext
|
from waflib.Build import BuildContext
|
||||||
|
import waflib.Context
|
||||||
|
|
||||||
# TODO: implement a command 'waf help' that shows the basic tasks a
|
# TODO: implement a command 'waf help' that shows the basic tasks a
|
||||||
# developer might want to do: e.g. how to configure a board, compile a
|
# developer might want to do: e.g. how to configure a board, compile a
|
||||||
|
@ -34,9 +35,10 @@ def init(ctx):
|
||||||
return
|
return
|
||||||
|
|
||||||
# define the variant build commands according to the board
|
# define the variant build commands according to the board
|
||||||
for c in (BuildContext, CleanContext, InstallContext, UninstallContext, CheckContext):
|
for c in waflib.Context.classes:
|
||||||
class context(c):
|
if not issubclass(c, BuildContext):
|
||||||
variant = env.BOARD
|
continue
|
||||||
|
c.variant = env.BOARD
|
||||||
|
|
||||||
def options(opt):
|
def options(opt):
|
||||||
opt.load('ardupilotwaf')
|
opt.load('ardupilotwaf')
|
||||||
|
|
Loading…
Reference in New Issue