From a1eec0d84f8131a35f39f070371f3a8e853c787f Mon Sep 17 00:00:00 2001 From: Ced Date: Tue, 31 Oct 2023 09:21:42 +0000 Subject: [PATCH] Clean up makefile after BW ebook Accumulated some debts through panic debug as CI was broken... Nothing dramatic but could do with a bit of cleanup. Simplify dependency graph, might also make the whole thing faster when run in parallel --- book/makefile | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/book/makefile b/book/makefile index 7a71ac4..0e8c81c 100644 --- a/book/makefile +++ b/book/makefile @@ -87,33 +87,27 @@ book_serif/book.pdf: $(src_all) book_sans_serif/book_sans_serif.pdf: $(src_all) $(LATEX) -output-directory=book_sans_serif book_sans_serif.tex -.PHONY: bw_epub copy_ebook_files +.PHONY: copy_ebook_files epub/%.epub: %.tex $(src_all) cover/cover-page.xbb $(EBOOK) -f epub $< -bw-book-epub: - mkdir -p bw-book-epub - -bw-book-epub/OEBPS: bw-book-epub - mkdir -p bw-book-epub/OEBPS - -copy_ebook_files: build_ebook | bw-book-epub +copy_ebook_files: build_ebook $(RSYNC) book-epub/ bw-book-epub/ # We not convert SVG to B&W or lower res for now as they are super small # anyway -bw-book-epub/OEBPS/%.jpg: %.jpg copy_ebook_files +bw-book-epub/OEBPS/%.jpg: %.jpg + mkdir -p $(dir $@) $(CONVERT_PIC) $< $(REDUCE_PIC) $@ -bw-book-epub/OEBPS/%.png: %.png copy_ebook_files +bw-book-epub/OEBPS/%.png: %.png + mkdir -p $(dir $@) $(CONVERT_PIC) $< $(REDUCE_PIC) $@ epub/bw_book.epub: copy_ebook_files $(bw_images) cd bw-book-epub; zip -q9XrD ../epub/bw_book.epub ./ -bw_epub: epub/bw_book.epub | bw-book-epub - # Now with the rules # Expected usual rules first .PHONY: all @@ -279,9 +273,10 @@ website: html ../website/_bundle_install_done $(ruby_src) cd ../website && ruby modify_build.rb # Debug Stuff from now on -.PHONY: quick show_tools_version printvars +.PHONY: quick quick_ebook show_tools_version printvars # Those 2 targets allow fast debug cycles but not resolving references etc +# They also ignore dependencies and run each time you call them. quick: # run latex only once no biber, no references etc... $(LATEX) -e '$$max_repeat=1' -output-directory=book_serif book.tex