Generate top-level code from symbol tables
This commit is contained in:
8
Rakefile
8
Rakefile
@ -20,13 +20,15 @@ task default: ['source/main.elna', TMP + 'boot/elna'] do |t|
|
||||
end
|
||||
|
||||
rule(/boot\/.+\.o$/ => ->(file) {
|
||||
Pathname.new('source') +
|
||||
source = Pathname.new('source') +
|
||||
Pathname.new(file).relative_path_from(TMP + 'boot').sub_ext('.elna')
|
||||
|
||||
[HOST_INSTALL + 'bin/gelna', source]
|
||||
}) do |t|
|
||||
Pathname.new(t.name).dirname.mkpath
|
||||
compiler = HOST_INSTALL + 'bin/gelna'
|
||||
sources, compiler = t.prerequisites.partition { |source| source.end_with? '.elna' }
|
||||
|
||||
sh compiler.to_path, '-c', '-o', t.name, *t.prerequisites
|
||||
sh *compiler, '-c', '-O0', '-g', '-o', t.name, *sources
|
||||
end
|
||||
|
||||
file TMP + 'boot/elna' => FileList['source/**/*.elna'].reject { |file|
|
||||
|
Reference in New Issue
Block a user