Browse Source

waf: allow partial builds with new mavlink as submodule

The task generator for the mavlink headers is given a name 'mavlink' and is
added as a dependency to all local static libraries, because all of them use
sources that include mavlink headers. It would be nice to have a good way to
detect sources that use mavlink headers or to declare list of libraries that
use the headers, so that the dependency could be added automatically.

Additionally, there's a minor change in syntax for the task generator: using
strings directly instead of lists.
master
Gustavo Jose de Sousa 9 years ago committed by Andrew Tridgell
parent
commit
17e5d99509
  1. 1
      APMrover2/wscript
  2. 1
      AntennaTracker/wscript
  3. 1
      ArduCopter/wscript
  4. 1
      ArduPlane/wscript
  5. 10
      wscript

1
APMrover2/wscript

@ -24,6 +24,7 @@ def build(bld): @@ -24,6 +24,7 @@ def build(bld):
'AP_ServoRelayEvents',
'PID',
],
use='mavlink',
)
ardupilotwaf.program(

1
AntennaTracker/wscript

@ -12,6 +12,7 @@ def build(bld): @@ -12,6 +12,7 @@ def build(bld):
libraries=ardupilotwaf.COMMON_VEHICLE_DEPENDENT_LIBRARIES + [
'PID',
],
use='mavlink',
)
ardupilotwaf.program(

1
ArduCopter/wscript

@ -33,6 +33,7 @@ def build(bld): @@ -33,6 +33,7 @@ def build(bld):
'AP_Relay',
'AP_ServoRelayEvents',
],
use='mavlink',
)
ardupilotwaf.program(

1
ArduPlane/wscript

@ -34,6 +34,7 @@ def build(bld): @@ -34,6 +34,7 @@ def build(bld):
'AP_Motors',
'AC_PID'
],
use='mavlink',
)
ardupilotwaf.program(

10
wscript

@ -120,9 +120,12 @@ def list_boards(ctx): @@ -120,9 +120,12 @@ def list_boards(ctx):
def build(bld):
#generate mavlink headers
bld(features=['mavgen'],
source=['modules/mavlink/message_definitions/v1.0/ardupilotmega.xml'],
target=['libraries/GCS_MAVLink/include/mavlink/v1.0/'])
bld(
features='mavgen',
source='modules/mavlink/message_definitions/v1.0/ardupilotmega.xml',
target='libraries/GCS_MAVLink/include/mavlink/v1.0/',
name='mavlink',
)
# NOTE: Static library with vehicle set to UNKNOWN, shared by all
# the tools and examples. This is the first step until the
@ -133,6 +136,7 @@ def build(bld): @@ -133,6 +136,7 @@ def build(bld):
name='ap',
vehicle='UNKNOWN',
libraries=ardupilotwaf.get_all_libraries(bld),
use='mavlink',
)
# TODO: Currently each vehicle also generate its own copy of the
# libraries. Fix this, or at least reduce the amount of

Loading…
Cancel
Save