summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2025-11-25 16:20:48 +0100
committerEugen Wissner <belka@caraus.de>2025-11-25 16:20:48 +0100
commitb5b129a90c9d6bec1d58fe42d4fd374be8e2cf65 (patch)
tree8a58de38a80622148a4714f3201e4092893ade49 /Rakefile
parentc20d9b7240033b462b33030ba4946135bc7d7fef (diff)
downloadelna-b5b129a90c9d6bec1d58fe42d4fd374be8e2cf65.tar.gz
Build documentation
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 9edd271..da58e7c 100644
--- a/Rakefile
+++ b/Rakefile
@@ -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'