commit cd65c4a
hovercats
·
2026-04-18 05:01:08 +0000 UTC
parent d7d5416
muon: sync gen.lua with upstream
1 files changed,
+80,
-77
+80,
-77
1@@ -1,14 +1,12 @@
2 cflags{
3- '-Wall',
4 '-std=c99',
5- '-pedantic',
6+ '-Wall', '-Wpedantic', '-Wno-missing-braces',
7 '-D MUON_PLATFORM_posix',
8 '-D MUON_ENDIAN=0',
9 '-D MUON_STATIC',
10 '-D MUON_BOOTSTRAPPED',
11 '-I $outdir',
12 '-I $srcdir/include',
13- '-I $srcdir/subprojects/tinyjson',
14 }
15
16 sub('tools.ninja', function()
17@@ -17,9 +15,9 @@ sub('tools.ninja', function()
18 exe('embedder', {'tools/embedder.c'})
19 end)
20
21-rule('embedder', '$outdir/embedder $args >$out')
22+rule('embedder', '$outdir/embedder $args >$out')
23
24-local embedded_files = {
25+local embed = {
26 'commands/copyfile.meson',
27 'commands/coverage.meson',
28 'commands/delete_suffix.meson',
29@@ -38,89 +36,94 @@ local embedded_files = {
30 }
31
32 local args = {}
33-for _, file in ipairs(embedded_files) do
34+for _, file in ipairs(embed) do
35 table.insert(args, '$srcdir/src/script/'..file)
36 table.insert(args, file)
37 end
38
39-build('embedder', '$outdir/embedded_files.h', {expand{'$srcdir/src/script', embedded_files}, '|', '$outdir/embedder'}, {args=args})
40+build('embedder', '$outdir/embedded_files.h', {expand{'$srcdir/src/script', embed}, '|', '$outdir/embedder'}, {args=args})
41
42-build('copy', '$outdir/version.c', '$dir/version.c')
43+build('sed', '$outdir/version.c', '$srcdir/src/version.c.in', {
44+ expr={
45+ '-e s,@version@,0.5.0,',
46+ '-e s,@vcs_tag@,,',
47+ '-e s,@meson_compat@,1.7,',
48+ },
49+})
50
51 pkg.deps = {
52 '$outdir/embedded_files.h',
53 }
54
55 exe('muon', [[
56-$outdir/version.c
57-src/(
58- args.c cmd_install.c cmd_subprojects.c cmd_test.c
59- coerce.c compilers.c embedded.c
60- error.c guess.c install.c log.c
61- machine_file.c machines.c main.c
62- memmem.c meson_opts.c options.c
63- opts.c rpmvercmp.c sha_256.c
64- vsenv.c wrap.c ui_null.c
65- backend/(
66- backend.c common_args.c introspect.c ninja.c output.c xcode.c
67- ninja/(
68- alias_target.c coverage.c build_target.c
69- custom_target.c rules.c
70- )
71- )
72- datastructures/(
73- arr.c bucket_arr.c hash.c stack.c
74- )
75- formats/(
76- editorconfig.c ini.c json.c
77- lines.c tap.c xml.c
78- )
79- functions/(
80- array.c boolean.c both_libs.c
81- build_target.c compiler.c
82- configuration_data.c custom_target.c
83- dependency.c dict.c disabler.c
84- environment.c external_program.c
85- feature_opt.c file.c generator.c
86- kernel.c modules.c machine.c meson.c
87- number.c run_result.c
88- source_configuration.c source_set.c
89- string.c subproject.c
90- kernel/(
91- build_target.c configure_file.c
92- custom_target.c dependency.c
93- install.c options.c subproject.c
94- )
95- modules/(
96- curl.c fs.c getopt.c keyval.c pkgconfig.c
97- python.c sourceset.c subprojects.c toolchain.c
98- json.c
99- )
100- )
101- lang/(
102- analyze.c compiler.c eval.c
103- fmt.c func_lookup.c lexer.c lsp.c
104- object.c object_iterators.c parser.c
105- serial.c string.c typecheck.c
106- vm.c workspace.c
107- )
108- platform/(
109- assert.c filesystem.c os.c mem.c
110- path.c run_cmd.c uname.c
111- posix/(
112- filesystem.c init.c log.c
113- os.c path.c rpath_fixer.c
114- run_cmd.c term.c timer.c
115- uname.c
116- )
117- )
118- external/(
119- libarchive_null.c libcurl_null.c
120- samurai_null.c readline_builtin.c
121- pkgconfig.c pkgconfig_exec.c
122- )
123-)
124-libtinyjson.a
125+ src/(
126+ args.c cmd_install.c cmd_subprojects.c cmd_test.c
127+ coerce.c compilers.c embedded.c
128+ error.c guess.c install.c log.c
129+ machine_file.c machines.c main.c
130+ memmem.c meson_opts.c options.c
131+ opts.c rpmvercmp.c sha_256.c
132+ vsenv.c wrap.c ui_null.c
133+ backend/(
134+ backend.c common_args.c introspect.c ninja.c output.c xcode.c
135+ ninja/(
136+ alias_target.c coverage.c build_target.c
137+ custom_target.c rules.c
138+ )
139+ )
140+ datastructures/(
141+ arr.c bucket_arr.c hash.c stack.c
142+ )
143+ formats/(
144+ editorconfig.c ini.c json.c
145+ lines.c tap.c xml.c
146+ )
147+ functions/(
148+ array.c boolean.c both_libs.c
149+ build_target.c compiler.c
150+ configuration_data.c custom_target.c
151+ dependency.c dict.c disabler.c
152+ environment.c external_program.c
153+ feature_opt.c file.c generator.c
154+ kernel.c modules.c machine.c meson.c
155+ number.c run_result.c
156+ source_configuration.c source_set.c
157+ string.c subproject.c
158+ kernel/(
159+ build_target.c configure_file.c
160+ custom_target.c dependency.c
161+ install.c options.c subproject.c
162+ )
163+ modules/(
164+ curl.c fs.c getopt.c keyval.c pkgconfig.c
165+ python.c sourceset.c subprojects.c toolchain.c
166+ json.c
167+ )
168+ )
169+ lang/(
170+ analyze.c compiler.c eval.c
171+ fmt.c func_lookup.c lexer.c lsp.c
172+ object.c object_iterators.c parser.c
173+ serial.c string.c typecheck.c
174+ vm.c workspace.c
175+ )
176+ platform/(
177+ assert.c filesystem.c os.c mem.c
178+ path.c run_cmd.c uname.c
179+ posix/(
180+ filesystem.c init.c log.c
181+ os.c path.c rpath_fixer.c
182+ run_cmd.c term.c timer.c
183+ uname.c
184+ )
185+ )
186+ external/(
187+ libarchive_null.c libcurl_null.c
188+ samurai_null.c readline_builtin.c
189+ pkgconfig.c pkgconfig_exec.c
190+ )
191+ )
192+ $outdir/version.c
193 ]])
194
195 file('bin/muon', '755', '$outdir/muon')