[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,
|
---|
| 33 | '-c', 'cd $1 && $2 $3 $4',
|
---|
| 34 | '--',
|
---|
| 35 | meson.build_root(),
|
---|
| 36 | config_py.path(),
|
---|
| 37 | meson.source_root() / 'HelenOS.config',
|
---|
| 38 | meson.source_root() / 'defaults',
|
---|
| 39 | ]
|
---|
| 40 | )
|
---|
| 41 |
|
---|
| 42 | # TODO: Check when cross target has changed, since it won't work.
|
---|
| 43 |
|
---|
| 44 | if false
|
---|
| 45 | # TODO: doesn't work because it changes cross target
|
---|
| 46 | run_target('random-config',
|
---|
| 47 | command: [
|
---|
| 48 | sh,
|
---|
| 49 | '-c', 'cd $1 && $2 $3 $4 random',
|
---|
| 50 | '--',
|
---|
| 51 | meson.build_root(),
|
---|
| 52 | config_py.path(),
|
---|
| 53 | meson.source_root() / 'HelenOS.config',
|
---|
| 54 | meson.source_root() / 'defaults',
|
---|
| 55 | ]
|
---|
| 56 | )
|
---|
| 57 | endif
|
---|
| 58 |
|
---|
[127cb7be] | 59 | if doxygen.found()
|
---|
| 60 | _patch_file = files('doxygen.cfg.diff')
|
---|
[eb9c598] | 61 |
|
---|
[127cb7be] | 62 | _gen_cfg = custom_target('doxygen.cfg.gen',
|
---|
| 63 | output: 'doxygen.cfg.gen',
|
---|
| 64 | command: [ doxygen, '-g', '@OUTPUT@' ],
|
---|
| 65 | )
|
---|
[eb9c598] | 66 |
|
---|
[127cb7be] | 67 | _dox_cfg = custom_target('doxygen.cfg',
|
---|
| 68 | output: 'doxygen.cfg',
|
---|
| 69 | input: [ _gen_cfg, _patch_file ],
|
---|
| 70 | command: [ patch, '-o', '@OUTPUT@', '@INPUT@' ],
|
---|
| 71 | )
|
---|
[eb9c598] | 72 |
|
---|
[127cb7be] | 73 | run_target('doxygen', command: [ doxygen, _dox_cfg ])
|
---|
| 74 | endif
|
---|
[200b2113] | 75 |
|
---|
| 76 | # TODO text-xcw
|
---|
| 77 | #ifeq ($(CONFIG_DEVEL_FILES),y)
|
---|
| 78 | # export PATH=$$PATH:$(abspath tools/xcw/bin) && $(MAKE) -r -C tools/xcw/demo
|
---|
| 79 | #endif
|
---|
| 80 |
|
---|
| 81 | # TODO special target for posix and xcw exports, update coastline for it
|
---|