Files
elna/Rakefile

27 lines
742 B
Ruby

# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.
require 'pathname'
require 'rake/clean'
TMP = Pathname.new('./build')
HOST_INSTALL = TMP + 'host/install'
CLOBBER.include TMP
directory(TMP + 'tools')
directory HOST_INSTALL
task default: ['source.elna', TMP + 'elna'] do |t|
sources, compiler = t.prerequisites.partition { |f| f.end_with? '.elna' }
sh *compiler, '--parse', *sources
end
file TMP + 'elna' => ['source.elna', HOST_INSTALL + 'bin/gelna'] do |t|
sources, compiler = t.prerequisites.partition { |f| f.end_with? '.elna' }
sh *compiler, '-o', t.name, *sources
end