aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-04-20 22:16:00 +0200
committerJonas Smedegaard <dr@jones.dk>2025-04-20 22:16:00 +0200
commit648e9063d318024db4eb00d74ec14f632f1d95fb (patch)
treeb7fa23778245533bf83f06a04deaf7269fe235fb
parenta65eaaf76d773abbc9b05f3ff290f553323f4666 (diff)
add make snippet to generate zipfile
-rw-r--r--Makefile3
-rw-r--r--_make/zip.mk14
2 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index f352672..2f783a8 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,9 @@ DOCUMENTS = report
PAD_LIST = report.qmd:mussel
+ZIPNAME = mussel_code
+ZIPFILES += p5.js/*.js Arduino/*
+
# config hints used by helper script hedgedoc
export HEDGEDOC_SERVER = https://pad.degrowth.net/
export HEDGEDOC_CONFIG_DIR = $(CURDIR)/_hedgedoc
diff --git a/_make/zip.mk b/_make/zip.mk
new file mode 100644
index 0000000..be2d268
--- /dev/null
+++ b/_make/zip.mk
@@ -0,0 +1,14 @@
+# GNUMake snippet for generating a zip file with source files
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+# SPDX-FileCopyrightText: 2024-2025 Jonas Smedegaard <dr@jones.dk>
+#
+# Setup:
+# In main Makefile...
+# * set variables ZIPNAME ZIPFILES
+# * include this make snippet
+
+zip: $(ZIPFILES)
+ zip -r $(ZIPNAME).zip $^
+
+.PHONY: zip