diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-02-12 21:17:32 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-02-12 23:44:22 +0100 |
| commit | d7c27f1c6328198d0513d94bfd6462ad8ac7d2d5 (patch) | |
| tree | f7b37300b32db45fd1d9b5c954d0c0e8a17328d6 /rakelib | |
| parent | b37eb0690c9905b84c224cc693bbf1cab84f55fd (diff) | |
| download | elna-d7c27f1c6328198d0513d94bfd6462ad8ac7d2d5.tar.gz | |
Split documentation chapters into files
Diffstat (limited to 'rakelib')
| -rw-r--r-- | rakelib/doc.rake | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/rakelib/doc.rake b/rakelib/doc.rake index d719c80..54f5d35 100644 --- a/rakelib/doc.rake +++ b/rakelib/doc.rake @@ -7,17 +7,26 @@ require 'pathname' require 'rake/clean' CLEAN.include 'build/doc' - directory 'build/doc' -rule /build\/doc\/\w+.pdf/ => lambda { |t| - [ - Pathname.new(t).relative_path_from('build').sub_ext('.tex').to_path, - 'build/doc' - ] -} do |t| - sh 'pdflatex', '--output-directory', 'build/doc', t.prerequisites.first +rule '.bbl' => '.bcf' do |t| + task_target = Pathname.new t.name + chdir = 'doc' + output_directory = task_target.dirname.relative_path_from(chdir).to_path + source = task_target.basename('.bbl').to_path + + sh 'biber', '-output-directory', output_directory, source, chdir: +end + +namespace :doc do + task :tex do + sh 'pdflatex', '-output-directory', '../build/doc', 'report', chdir: 'doc' + end end desc 'Generate documentation' -task doc: 'build/doc/language.pdf' +task doc: 'doc:tex' do + Rake::Task['build/doc/report.bbl'].invoke + Rake::Task['doc:tex'].reenable + Rake::Task['doc:tex'].invoke +end |
