~lattis/muon

muon/bootstrap.sh -rwxr-xr-x 2.5 KiB
5addc706Stone Tickle remove wk_ prefix to string functions a day ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/bin/sh

# Requirements:
# - c99
# - cat
# - mkdir
# - sh
# Optional requirements:
# - pkgconf
# - libpkgconf

set -eux

dir="$1"
mkdir -p "$dir"

if command -v pkgconf >/dev/null && pkgconf libpkgconf; then
	pkgconf_src="libpkgconf.c"
	pkgconf_cflags="$(pkgconf --cflags libpkgconf)"
	pkgconf_libs="$(pkgconf --libs libpkgconf)"
else
	pkgconf_src="libpkgconf_null.c"
	pkgconf_cflags=""
	pkgconf_libs=""
fi

cat \
	src/args.c \
	src/backend/common_args.c \
	src/backend/ninja.c \
	src/backend/ninja/build_target.c \
	src/backend/ninja/custom_target.c \
	src/backend/ninja/rules.c \
	src/backend/output.c \
	src/coerce.c \
	src/compilers.c \
	src/data/bucket_array.c \
	src/data/darr.c \
	src/data/hash.c \
	src/embedded.c \
	src/error.c \
	src/external/$pkgconf_src \
	src/external/libarchive_null.c \
	src/external/libcurl_null.c \
	src/external/samurai_null.c \
	src/formats/ini.c \
	src/functions/array.c \
	src/functions/boolean.c \
	src/functions/build_target.c \
	src/functions/common.c \
	src/functions/compiler.c \
	src/functions/configuration_data.c \
	src/functions/custom_target.c \
	src/functions/default.c \
	src/functions/default/build_target.c \
	src/functions/default/configure_file.c \
	src/functions/default/custom_target.c \
	src/functions/default/dependency.c \
	src/functions/default/options.c \
	src/functions/default/setup.c \
	src/functions/dependency.c \
	src/functions/dict.c \
	src/functions/disabler.c \
	src/functions/environment.c \
	src/functions/external_library.c \
	src/functions/external_program.c \
	src/functions/feature_opt.c \
	src/functions/file.c \
	src/functions/generator.c \
	src/functions/machine.c \
	src/functions/meson.c \
	src/functions/modules.c \
	src/functions/modules/fs.c \
	src/functions/modules/pkgconfig.c \
	src/functions/modules/python.c \
	src/functions/number.c \
	src/functions/run_result.c \
	src/functions/string.c \
	src/functions/subproject.c \
	src/guess.c \
	src/install.c \
	src/lang/eval.c \
	src/lang/interpreter.c \
	src/lang/lexer.c \
	src/lang/object.c \
	src/lang/parser.c \
	src/lang/serial.c \
	src/lang/string.c \
	src/lang/workspace.c \
	src/log.c \
	src/machine_file.c \
	src/main.c \
	src/opts.c \
	src/platform/dirs.c \
	src/platform/filesystem.c \
	src/platform/mem.c \
	src/platform/path.c \
	src/platform/rpath_fixer.c \
	src/platform/run_cmd.c \
	src/platform/term.c \
	src/platform/uname.c \
	src/sha_256.c \
	src/tests.c \
	src/version.c.in \
	src/wrap.c \
	> "$dir/muon.c"

${CC:-c99} -g -Iinclude $pkgconf_cflags -o "$dir/muon.o" -c "$dir/muon.c"
${CC:-c99} -o "$dir/muon" "$dir/muon.o" $pkgconf_libs