Enforcing execution order of files

There are a few files that are generated by a script:

all.mc, foo.mc, bar.mc

all.mc:
const ALL = [null, null, null, FOO, null, BAR];

foo.mc:
const FOO = [...];
bar.mc:
const BAR = [...];
I get a compilation warning:
WARNING: fenix6: all.mc:4,6: Trying to access member '$.FOO', which may not be initialized.
WARNING: fenix6: all.mc:4,6: Trying to access member '$.BAR', which may not be initialized.
and indeed the app crashes, as all elements in ALL are null.
If I rename all.mc to zzz.mc then I still get the warnings, but it "works" (at least when I try it in the simulator)
Is there a way to make sure that all.mc knows to execute foo.mc and bar.mc beforehand?