diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2023-01-27 10:41:16 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2023-01-27 10:41:16 -0500 |
commit | 5e3fa3bc9c7f551c33a96b1ff34c8a82331be6b3 (patch) | |
tree | fb1ee2c68527c8143f9fbd2b4b6b6eb6a9382503 | |
parent | d0ba7baac942960857515b9ef02cc02746c223fc (diff) | |
download | makefile_templates-5e3fa3bc9c7f551c33a96b1ff34c8a82331be6b3.tar.gz makefile_templates-5e3fa3bc9c7f551c33a96b1ff34c8a82331be6b3.zip |
made make file to process xournal files and convert them to pdf
-rw-r--r-- | xournal.mk | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/xournal.mk b/xournal.mk new file mode 100644 index 0000000..2ac2009 --- /dev/null +++ b/xournal.mk @@ -0,0 +1,41 @@ +# -*- make -*- +# Started in 2023 by Eugeniy Mikhailov, <evgmik@gmail.com> +# Processing of xournal files + +CLEAN_TARGETS += clean_xournal +REAL_CLEAN_TARGETS += real_clean_xournal + +dest_dir_xournal ?= $(dest_dir) +destination_dirs += $(dest_dir_xournal) + +xournal_files = $(wildcard *.xopp) +pdf_from_xournal = $(xournal_files:%.xopp=%.pdf) + +xournal_src_dest_targets = $(xournal_files:%=$(dest_dir_xournal)/%) +pdf_from_xournal_dest_targets = $(pdf_from_xournal:%=$(dest_dir_xournal)/%) + +XORNAL = xournalpp + +pdf_xournal: $(pdf_from_xournal) +$(pdf_from_xournal): %.pdf : %.xopp + $(XORNAL) $< --create-pdf=$@ + +install_xournal_src: $(xournal_src_dest_targets) +$(xournal_src_dest_targets): $(dest_dir_xournal)/% : % | $(dest_dir_xournal) +ifneq ($(strip $(xournal_files)),) + $(INSTALL) -m 0644 '$<' '$@' +endif + +install_pdf_xournal: $(pdf_from_xournal_dest_targets) +$(pdf_from_xournal_dest_targets): $(dest_dir_xournal)/% : % | $(dest_dir_xournal) +ifneq ($(strip $(pdf_from_xournal)),) + $(INSTALL) -m 0644 '$<' '$@' +endif + +clean_xournal: + +real_clean_xournal: +ifneq ($(strip $(pdf_from_xournal)),) + rm -f $(pdf_from_xournal) +endif + |