diff options
| author | Eugen Wissner <belka@caraus.de> | 2025-09-01 09:57:18 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2025-09-01 14:53:05 +0200 |
| commit | 44fa14076985405d8390d50b92f6a2fdbcb7f751 (patch) | |
| tree | 81b50337b8eba3bd9d34f6ad52b0d7e2f3b764b7 /Rakefile | |
| parent | 627975775c941130975ce0f9dbef08c723e69794 (diff) | |
| download | elna-44fa14076985405d8390d50b92f6a2fdbcb7f751.tar.gz | |
Support simple variable assignment
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 20 |
1 files changed, 6 insertions, 14 deletions
@@ -44,13 +44,15 @@ task :convert do end end +rule /^build\/[[:alpha:]]+\/stage[[:digit:]]+$/ => ->(match) { + "#{match}.s" +} do |t| + sh CROSS_GCC, '-nostdlib', '-o', t.name, *t.prerequisites +end + STAGES.each do |stage| previous = stage.delete_prefix('stage').to_i.pred - file "build/valid/#{stage}" => "build/valid/#{stage}.s" do |t| - sh CROSS_GCC, '-nostdlib', '-o', t.name, *t.prerequisites - end - file "build/valid/#{stage}.s" => ["build/boot/#{stage}", "boot/#{stage}.elna"] do |t| exe, source = t.prerequisites @@ -61,10 +63,6 @@ STAGES.each do |stage| IO.copy_stream last_stdout, t.name end - file "build/boot/#{stage}" => "build/boot/#{stage}.s" do |t| - sh CROSS_GCC, '-nostdlib', '-o', t.name, *t.prerequisites - end - file "build/boot/#{stage}.s" => ["build/valid/stage#{previous}", "boot/#{stage}.elna"] do |t| exe, source = t.prerequisites @@ -80,12 +78,6 @@ end # Stage 1. # -file 'build/valid/stage1' => ['build/valid', 'build/valid/stage1.s'] do |t| - source = t.prerequisites.select { |prerequisite| prerequisite.end_with? '.s' } - - sh CROSS_GCC, '-nostdlib', '-o', t.name, *source -end - file 'build/valid/stage1.s' => ['build/boot/stage1', 'boot/stage1.s', 'build/valid'] do |t| source, exe, = t.prerequisites.partition { |prerequisite| prerequisite.end_with? '.s' } |
