From 1cfe3c88e3a9a840ae8abb6ed6543c5b1845f840 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 24 Aug 2024 15:55:32 -0300 Subject: Makefile: Use $(config.txt) variable and document --- Makefile | 17 +++++++++++++---- 1 file 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 $@ -- cgit v1.2.3