mirror of https://github.com/ArduPilot/ardupilot
build: add --apstatedir for Linux boards
This is the --localstatedir that is found on other buildsystems/programs + the package directory. We could provide a --localstatedir instead to be similar to the others, but I thought it would be too confusing for the help message.
This commit is contained in:
parent
1e7ad72909
commit
2916a3f40c
|
@ -438,6 +438,9 @@ class linux(Board):
|
||||||
if self.with_uavcan:
|
if self.with_uavcan:
|
||||||
cfg.define('UAVCAN_EXCEPTIONS', 0)
|
cfg.define('UAVCAN_EXCEPTIONS', 0)
|
||||||
|
|
||||||
|
if cfg.options.apstatedir:
|
||||||
|
cfg.define('AP_STATEDIR', cfg.options.apstatedir)
|
||||||
|
|
||||||
def build(self, bld):
|
def build(self, bld):
|
||||||
super(linux, self).build(bld)
|
super(linux, self).build(bld)
|
||||||
if bld.options.upload:
|
if bld.options.upload:
|
||||||
|
|
7
wscript
7
wscript
|
@ -101,6 +101,13 @@ submodules at specific revisions.
|
||||||
opt.parser.remove_option(k)
|
opt.parser.remove_option(k)
|
||||||
g.add_option(option)
|
g.add_option(option)
|
||||||
|
|
||||||
|
g.add_option('--apstatedir',
|
||||||
|
action='store',
|
||||||
|
default='',
|
||||||
|
help='''Where to save data like parameters, log and terrain.
|
||||||
|
This is the --localstatedir + ArduPilot's subdirectory [default:
|
||||||
|
board-dependent, usually /var/lib/ardupilot]''')
|
||||||
|
|
||||||
g.add_option('--rsync-dest',
|
g.add_option('--rsync-dest',
|
||||||
dest='rsync_dest',
|
dest='rsync_dest',
|
||||||
action='store',
|
action='store',
|
||||||
|
|
Loading…
Reference in New Issue