From de6ecae0f072bb32be95382c536a517eabe4b1f1 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Mon, 12 Oct 2026 22:25:46 +0200 Subject: Fix empty sections in tree-sitter --- rakelib/compiler.rake | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'rakelib') diff --git a/rakelib/compiler.rake b/rakelib/compiler.rake index 4731e1d..5cd19d5 100644 --- a/rakelib/compiler.rake +++ b/rakelib/compiler.rake @@ -9,11 +9,11 @@ require 'rake/clean' CLEAN.include 'build/gcc' Rake.application.add_loader('d', Rake::MakefileLoader.new) -FileList['build/gcc/**/*.d'].each { |file| import file } +FileList['build/gcc/obj/**/*.d'].each { |file| import file } -rule(%r{gcc/.+\.o$} => lambda { |file| +rule(%r{gcc/obj/.+\.o$} => lambda { |file| source = Pathname.new('source') + - Pathname.new(file).relative_path_from('build/gcc').sub_ext('.elna') + Pathname.new(file).relative_path_from('build/gcc/obj').sub_ext('.elna') [source, 'build/host/install/bin/gelna'] }) do |t| @@ -23,9 +23,11 @@ rule(%r{gcc/.+\.o$} => lambda { |file| end sources = FileList['source/**/*.elna'].select { |file| file == file.downcase } -file 'build/gcc/elna' => sources.map { |file| - Pathname.new('build/gcc') + +file 'build/gcc/bin/elna' => sources.map { |file| + Pathname.new('build/gcc/obj') + Pathname.new(file).relative_path_from('source').sub_ext('.o') } do |t| + Pathname.new(t.name).dirname.mkpath + sh 'build/host/install/bin/gcc', '-o', t.name, *t.prerequisites end -- cgit v1.2.3