diff options
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -6,6 +6,7 @@ require 'open3' require 'pathname' require 'rake/clean' +require 'asciidoctor-pdf' STAGES = Dir.glob('boot/stage*') .collect { |stage| File.basename stage } @@ -13,6 +14,7 @@ STAGES = Dir.glob('boot/stage*') .drop(1) # First assembly stage does not count. CLEAN.include 'build/boot', 'build/valid' +CLEAN.include 'doc/*.pdf' def compile(*arguments) sh(ENV.fetch('CC', 'gcc'), '-fpie', '-g', *arguments) @@ -126,3 +128,10 @@ file 'build/boot/stage1/cl' => ['build/boot/stage1', 'boot/stage1.s'] do |t| compile('-nostdlib', '-o', t.name, *source) end + +rule '.pdf' => '.adoc' do |t| + Asciidoctor.convert_file t.source, backend: 'pdf', safe: :safe +end + +desc 'Generate documentation' +task doc: 'doc/language.pdf' |
