Transpile type section

This commit is contained in:
2025-05-27 07:53:39 +02:00
parent 4c1b66f99e
commit 3d401e7dac
6 changed files with 198 additions and 33 deletions

View File

@ -13,13 +13,13 @@ directory 'build/self'
CLEAN.include 'build'
rule(/build\/stage1\/.+\.o$/ => ->(file) {
path = Pathname.new('source') + Pathname.new(file).basename
path = Pathname.new('boot/stage1/source') + Pathname.new(file).basename
['build/stage1', path.sub_ext('.def'), path.sub_ext('.elna')]
}) do |t|
sources = t.prerequisites.filter { |f| f.end_with? '.elna' }
sh M2C, '-fmod=.elna', '-c', '-I', 'source', '-o', t.name, *sources
sh M2C, '-fmod=.elna', '-c', '-I', 'boot/stage1/source', '-o', t.name, *sources
end
file 'build/stage1/elna' => FileList['boot/stage1/source/*'].map { |file|
@ -28,7 +28,7 @@ file 'build/stage1/elna' => FileList['boot/stage1/source/*'].map { |file|
sh M2C, '-o', t.name, *t.prerequisites
end
file 'build/stage1/Compiler.o' => ['build/stage1', 'source/Compiler.elna'] do |t|
file 'build/stage1/Compiler.o' => ['build/stage1', 'boot/stage1/source/Compiler.elna'] do |t|
sources = t.prerequisites.filter { |f| f.end_with? '.elna' }
sh M2C, '-fscaffold-main', '-fmod=.elna', '-c', '-I', 'boot/stage1/source', '-o', t.name, *sources