source: mainline/meson/part/tools/meson.build@ c21d4d6

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since c21d4d6 was c21d4d6, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 6 years ago

Add copyright headers for new files

Most are a copy of the headers that were present in original Makefiles.

  • Property mode set to 100644
File size: 3.6 KB
Line 
1#
2# Copyright (c) 2019 Jiří Zárevúcky
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8#
9# - Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11# - Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution.
14# - The name of the author may not be used to endorse or promote products
15# derived from this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28
29# Find all the programs and tools used by meson.
30# Whenever you use an external command anywhere,
31# first find and assign it to a variable here. Don't use its name directly.
32# This way it's obvious what programs are used, and for some we can use
33# the same argument list everywhere.
34
35_tools_dir = meson.source_root() / 'tools'
36
37basename = find_program('basename')
38cc = meson.get_compiler('c')
39config_py = find_program(_tools_dir / 'config.py')
40cp = find_program('cp')
41dirname = find_program('dirname')
42doxygen = find_program('doxygen')
43find = find_program('find')
44grep = find_program('grep')
45mkarray = find_program(_tools_dir / 'mkarray_for_meson.sh')
46mkext4 = find_program(_tools_dir / 'mkext4.py')
47mkfat = find_program(_tools_dir / 'mkfat.py')
48mkuimage = find_program(_tools_dir / 'mkuimage.py')
49objcopy = find_program('objcopy')
50objdump = find_program('objdump')
51patch = find_program('patch')
52sed = find_program('sed')
53unzip = find_program('unzip')
54which = find_program('which')
55cpc = find_program(_tools_dir / 'cc.sh')
56
57sh = [ find_program('sh'), '-u', '-e' ]
58if debug_shell_scripts
59 sh += '-x'
60endif
61
62genisoimage = find_program('genisoimage', required: false)
63
64if not genisoimage.found()
65 genisoimage = find_program('mkisofs', required: false)
66endif
67
68if not genisoimage.found()
69 xorriso = find_program('xorriso', required: false)
70
71 if xorriso.found()
72 genisoimage = [ xorriso, '-as', 'genisoimage' ]
73 else
74 error('Need genisoimage, mkisofs or xorriso.')
75 endif
76endif
77
78
79autocheck = generator(find_program(_tools_dir / 'autocheck.awk'),
80 arguments: [ '@INPUT@' ],
81 output: '@PLAINNAME@.check.c',
82 capture: true,
83)
84
85# TODO: bug in Meson
86#gzip = generator(find_program('gzip'),
87# arguments: [ '--no-name', '-9', '--stdout', '@INPUT@' ],
88# output: '@PLAINNAME@.gz',
89# capture: true,
90#)
91
92gzip = [ find_program('gzip'), '--no-name', '-9', '--stdout', '@INPUT@' ]
93
94# Tar's arguments make sure that the archive is reproducible.
95tar = [
96 find_program('tar'),
97 '-c',
98 '-f', '@OUTPUT@',
99 '--mtime=1970-01-01 00:00:00Z',
100 '--group=0',
101 '--owner=0',
102 '--numeric-owner',
103 '--mode=go=rX,u+rw,a-s',
104 '--no-acls',
105 '--no-selinux',
106 '--no-xattrs',
107 '--format=ustar',
108 '--transform', 's:@OUTDIR@/::',
109 '@INPUT@',
110]
Note: See TracBrowser for help on using the repository browser.