aboutsummaryrefslogtreecommitdiff
path: root/_make
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-03-11 20:13:56 +0100
committerJonas Smedegaard <dr@jones.dk>2025-03-11 20:14:36 +0100
commiteea83bcd7cdcf87045ca274c9772b567c5c6310c (patch)
treedc702d272862cb2f354089ae41f203f37452b56c /_make
parent02876f961fc8b68f2cb43a23a1d98d89fce11858 (diff)
add make targets for generating/updating zip archives
Diffstat (limited to '_make')
-rw-r--r--_make/_zip.mk22
1 files changed, 22 insertions, 0 deletions
diff --git a/_make/_zip.mk b/_make/_zip.mk
new file mode 100644
index 0000000..b610802
--- /dev/null
+++ b/_make/_zip.mk
@@ -0,0 +1,22 @@
+# Make snippet for generating/updating zip archive of a directory
+#
+# Copyright 2025, Jonas Smedegaard <dr@jones.dk>
+# SPDX-License-Identifier: GPL-3+
+#
+# Setup:
+# In main Makefile...
+# * set variable ZIP_DIRS
+# * include this make snippet
+#
+# Dependencies:
+# * zip
+
+# list of relative paths to PDF documents
+#ZIP_DIRS = \
+# subdir \
+# deep/subdir
+
+$(ZIP_DIRS:%=zip-of-%): zip-of-%:
+ zip -r $*.zip $*
+
+.PHONY: $(ZIP_DIRS:%=zip-of-%)