[eb9c598] | 1 | #
|
---|
| 2 | # Copyright (c) 2017 Jiri Svoboda
|
---|
| 3 | # Copyright (c) 2019 Jiří Zárevúcky
|
---|
| 4 | # All rights reserved.
|
---|
| 5 | #
|
---|
| 6 | # Redistribution and use in source and binary forms, with or without
|
---|
| 7 | # modification, are permitted provided that the following conditions
|
---|
| 8 | # are met:
|
---|
| 9 | #
|
---|
| 10 | # - Redistributions of source code must retain the above copyright
|
---|
| 11 | # notice, this list of conditions and the following disclaimer.
|
---|
| 12 | # - Redistributions in binary form must reproduce the above copyright
|
---|
| 13 | # notice, this list of conditions and the following disclaimer in the
|
---|
| 14 | # documentation and/or other materials provided with the distribution.
|
---|
| 15 | # - The name of the author may not be used to endorse or promote products
|
---|
| 16 | # derived from this software without specific prior written permission.
|
---|
| 17 | #
|
---|
| 18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
---|
| 19 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
| 20 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
---|
| 21 | # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
| 22 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
---|
| 23 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
| 24 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
| 25 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
| 26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
| 27 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
| 28 | #
|
---|
| 29 |
|
---|
[200b2113] | 30 | run_target('config',
|
---|
| 31 | command: [
|
---|
| 32 | sh,
|
---|
[095ed4a] | 33 | '-c', 'cd $1 && $2 $3 $4 $5',
|
---|
[200b2113] | 34 | '--',
|
---|
| 35 | meson.build_root(),
|
---|
| 36 | config_py.path(),
|
---|
| 37 | meson.source_root() / 'HelenOS.config',
|
---|
| 38 | meson.source_root() / 'defaults',
|
---|
[095ed4a] | 39 | '--mask-platform',
|
---|
[200b2113] | 40 | ]
|
---|
| 41 | )
|
---|
| 42 |
|
---|
| 43 | # TODO: Check when cross target has changed, since it won't work.
|
---|
| 44 |
|
---|
| 45 | if false
|
---|
| 46 | # TODO: doesn't work because it changes cross target
|
---|
| 47 | run_target('random-config',
|
---|
| 48 | command: [
|
---|
| 49 | sh,
|
---|
| 50 | '-c', 'cd $1 && $2 $3 $4 random',
|
---|
| 51 | '--',
|
---|
| 52 | meson.build_root(),
|
---|
| 53 | config_py.path(),
|
---|
| 54 | meson.source_root() / 'HelenOS.config',
|
---|
| 55 | meson.source_root() / 'defaults',
|
---|
| 56 | ]
|
---|
| 57 | )
|
---|
| 58 | endif
|
---|
| 59 |
|
---|
[127cb7be] | 60 | if doxygen.found()
|
---|
| 61 | _patch_file = files('doxygen.cfg.diff')
|
---|
[eb9c598] | 62 |
|
---|
[127cb7be] | 63 | _gen_cfg = custom_target('doxygen.cfg.gen',
|
---|
| 64 | output: 'doxygen.cfg.gen',
|
---|
| 65 | command: [ doxygen, '-g', '@OUTPUT@' ],
|
---|
| 66 | )
|
---|
[eb9c598] | 67 |
|
---|
[127cb7be] | 68 | _dox_cfg = custom_target('doxygen.cfg',
|
---|
| 69 | output: 'doxygen.cfg',
|
---|
| 70 | input: [ _gen_cfg, _patch_file ],
|
---|
| 71 | command: [ patch, '-o', '@OUTPUT@', '@INPUT@' ],
|
---|
| 72 | )
|
---|
[eb9c598] | 73 |
|
---|
[e18f0c0] | 74 | run_target('doxygen', command: [
|
---|
| 75 | sh,
|
---|
| 76 | '-c', 'cd $1 && $2 $3',
|
---|
| 77 | '--',
|
---|
| 78 | meson.source_root() / 'doxygen',
|
---|
| 79 | doxygen.path(),
|
---|
| 80 | _dox_cfg,
|
---|
| 81 | ])
|
---|
[127cb7be] | 82 | endif
|
---|
[200b2113] | 83 |
|
---|
[6d974a4] | 84 | if cppcheck.found()
|
---|
| 85 | run_target('cppcheck', command: ['cppcheck', '--project=' +
|
---|
| 86 | join_paths(meson.build_root(), 'compile_commands.json'),
|
---|
| 87 | ' -q --force --file-list=*.c* --platform=unix32 --enable=all' ])
|
---|
| 88 | endif
|
---|
| 89 |
|
---|
[200b2113] | 90 | # TODO text-xcw
|
---|
| 91 | #ifeq ($(CONFIG_DEVEL_FILES),y)
|
---|
| 92 | # export PATH=$$PATH:$(abspath tools/xcw/bin) && $(MAKE) -r -C tools/xcw/demo
|
---|
| 93 | #endif
|
---|
| 94 |
|
---|
| 95 | # TODO special target for posix and xcw exports, update coastline for it
|
---|