aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-08-24 15:55:32 -0300
committerEuAndreh <eu@euandre.org>2024-08-24 15:57:01 -0300
commit1cfe3c88e3a9a840ae8abb6ed6543c5b1845f840 (patch)
tree0c6093f4c6deded1dae31e85c3ae4a06b72c7ef4
parentRe-include "id_rsa.pub" in /etc/ (diff)
downloadserver-1cfe3c88e3a9a840ae8abb6ed6543c5b1845f840.tar.gz
server-1cfe3c88e3a9a840ae8abb6ed6543c5b1845f840.tar.xz
Makefile: Use $(config.txt) variable and document
-rw-r--r--Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index afcde05..478c15c 100644
--- a/Makefile
+++ b/Makefile
@@ -36,16 +36,25 @@ all: $(derived-assets)
$(derived-assets): Makefile
-src/config/tld.txt: Makefile
+
+# Needed by server to reconfigure(8) without running make(1).
+config.txt = \
+ src/config/tld.txt \
+ src/config/offsite-ssh.txt \
+ src/config/root-pubkey.txt \
+
+$(config.txt): Makefile
+
+src/config/tld.txt:
echo '$(TLD)' | ifnew $@
-src/config/offsite-ssh.txt: Makefile
+src/config/offsite-ssh.txt:
echo '$(OFFSITE_SSH)' | ifnew $@
-src/config/root-pubkey.txt: src/keys/SSH/root@$(TLD).id_rsa.pub.txt Makefile
+src/config/root-pubkey.txt: src/keys/SSH/root@$(TLD).id_rsa.pub.txt
cut -d' ' -f8- < src/keys/SSH/root@$(TLD).id_rsa.pub.txt > $@
-system.scm.sentinel: src/guix/system.scm src/config/tld.txt src/config/offsite-ssh.txt src/config/root-pubkey.txt
+system.scm.sentinel: src/guix/system.scm $(config.txt)
rm -f system.scm*
guix build -v3 -r system.scm -Kf src/guix/system.scm
touch $@