tridge/mavlink — pull request #5 by bradh (2013-10-04 11:33:32+00:00)
Title: Fix build associated with missing mavlink_conversions.h for 0.9 protocol...

... version

Also import shutil explicitly.

During build I get:
```
Scanning dependencies of target ardupilotmega.xml-v0.9
[ 5%] Generating ardupilotmega.xml-v0.9-stamp
Validating /home/bradh/uav-hacking/mavlink/message_definitions/v0.9/ardupilotmega.xml
Parsing /home/bradh/uav-hacking/mavlink/message_definitions/v0.9/ardupilotmega.xml
Validating /home/bradh/uav-hacking/mavlink/message_definitions/v0.9/common.xml
Parsing /home/bradh/uav-hacking/mavlink/message_definitions/v0.9/common.xml
Note: message GPS_STATUS is longer than 64 bytes long (109 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Merged enum MAV_CMD
Found 86 MAVLink message types in 2 XML files
Generating C implementation in directory include/v0.9/ardupilotmega
Generating C implementation in directory include/v0.9/common
Copying fixed headers
Traceback (most recent call last):
File "/home/bradh/uav-hacking/mavlink/pymavlink/generator/mavgen.py", line 166, in
mavgen(opts, args)
File "/home/bradh/uav-hacking/mavlink/pymavlink/generator/mavgen.py", line 93, in mavgen
mavgen_c.generate(opts.output, xml)
File "/home/bradh/uav-hacking/mavlink/pymavlink/generator/mavgen_c.py", line 614, in generate
copy_fixed_headers(basename, xml_list[0])
File "/home/bradh/uav-hacking/mavlink/pymavlink/generator/mavgen_c.py", line 450, in copy_fixed_headers
shutil.copy(src, dest)
File "/usr/lib/python2.7/shutil.py", line 119, in copy
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/home/bradh/uav-hacking/mavlink/pymavlink/generator/C/include_v0.9/mavlink_conversions.h'
make[2]: *** [ardupilotmega.xml-v0.9-stamp] Error 1
make[1]: *** [CMakeFiles/ardupilotmega.xml-v0.9.dir/all] Error 2
make: *** [all] Error 2
```

I'm a little dubious about this fix (perhaps I'm doing the build wrong), so worth a sanity check.