.POSIX: N = `nproc` .SUFFIXES: .SUFFIXES: .in .sentinel .in: sed \ -e "s|@HOSTNAME@|`hostname`|g" \ < $< > $@ if [ -x $< ]; then chmod +x $@; fi test-config-files = \ tests/internet/etc/postfix/main.cf \ tests/internet/etc/dkimproxyout.conf \ tests/internet/etc/dovecot/dovecot.conf \ derived-assets = \ queue.scm.sentinel \ packages.scm.sentinel \ local.scm.sentinel \ internet.scm.sentinel \ maintainer.key.sentinel \ $(test-config-files) \ side-assets = \ queue.scm \ queue.scm-* \ dynamic.scm \ packages.scm \ local.scm \ internet.scm \ all: $(derived-assets) all: maintainer.key.sentinel queue.scm.sentinel: src/org/euandre/queue.scm packages.scm.sentinel: src/org/euandre/queue.scm src/org/euandre/packages.scm local.scm.sentinel: src/org/euandre/queue.scm tests/local/system.scm internet.scm.sentinel: src/org/euandre/queue.scm src/org/euandre/packages.scm \ tests/internet/system.scm queue.scm.sentinel packages.scm.sentinel: Makefile rm -f `basename $@ .sentinel`* guix build -c$N -v3 -Lsrc -r`basename $@ .sentinel` -Kf src/org/euandre/`basename $@ .sentinel` touch $@ local.scm.sentinel internet.scm.sentinel: queue.scm.sentinel packages.scm.sentinel rm -f `basename $@ .sentinel`* guix build -c$N -v3 -Lsrc -r`basename $@ .sentinel` -Kf tests/`basename $@ .scm.sentinel`/system.scm touch $@ maintainer.key.sentinel: meta.capim ID="`awk '$$1 == ":email" && $$0=$$2' meta.capim | tr -d '"'`" && \ gpg --export --armour "$$ID" | ifnew $* touch $@ local-files = \ /etc/postfix/master.cf \ /etc/postfix/main.cf \ internet-files = \ $(local-files) \ /etc/sasl2/smtpd.conf \ /etc/dkimproxyout.conf \ /etc/dovecot/dovecot.conf \ check-guix-static-local: local.scm.sentinel $(test-config-files) for f in $(local-files); do \ diff -U5 local.scm"$$f" tests/local"$$f"; \ done check-guix-static-internet: internet.scm.sentinel $(test-config-files) for f in $(internet-files); do \ diff -U5 internet.scm"$$f" tests/internet"$$f"; \ done check-guix-static: check-guix-static-local check-guix-static-internet check-guix-dynamic: rm -f dynamic.scm* guix build -c$N -v3 -Lsrc -r dynamic.scm -Km tests/internet/tests.scm check-guix: check-guix-static check-guix-dynamic check-unit: check-guix check-integration: ## Run all tests. Each test suite is isolated, so that a parallel ## build can run tests at the same time. The required artifacts ## are created if missing. check: check-unit check-integration ## Remove *all* derived artifacts produced during the build. ## A dedicated test asserts that this is always true. clean: rm -rf $(derived-assets) $(side-assets) ALWAYS: