summary refs log tree commit diff
path: root/Documentation
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-02-22 18:34:47 +0000
committerAlyssa Ross <hi@alyssa.is>2023-02-22 18:39:09 +0000
commitc3fbeca89c23270314d1a24017160ff6fe7cc497 (patch)
treec5cc8a914335524cb34d28e40cd010a9faae0549 /Documentation
parent136428bf5b46f69ee85d579531b92299f964ba52 (diff)
downloadspectrum-c3fbeca89c23270314d1a24017160ff6fe7cc497.tar
spectrum-c3fbeca89c23270314d1a24017160ff6fe7cc497.tar.gz
spectrum-c3fbeca89c23270314d1a24017160ff6fe7cc497.tar.bz2
spectrum-c3fbeca89c23270314d1a24017160ff6fe7cc497.tar.lz
spectrum-c3fbeca89c23270314d1a24017160ff6fe7cc497.tar.xz
spectrum-c3fbeca89c23270314d1a24017160ff6fe7cc497.tar.zst
spectrum-c3fbeca89c23270314d1a24017160ff6fe7cc497.zip
lib/common.mk: init
We can simplify our Makefiles a bit by moving some things into a
library file.  So far, I've done this for non-component-specific
macros, and inference rules.

Some tar2ext4 rules used a temporary file for the tar2ext4 invocation,
and then moved the file into place when it was done, to prevent a
half-built image sticking around if tar2ext4 died.  According to
POSIX, make should clean up any targets that didn't finish building if
it's interrupted, so we should only end up with a half-built image if
tar2ext4 crashes, e.g. due to running out of disk space.  I think we
should just ignore that possibility, since otherwise we'd have to
write annoying make rules using temporary file names for every target,
and if it does happen recovery is just a make clean away.

With this, I've also made a small reorganisation.  I got rid of the
"nix" directory and created a "lib" directory, where I put
eval-config.nix and the new common.mk file, since both are library
code.  checks.nix isn't really a library though, so I moved it into
the "release" directory, since the only reference to it is in
release.nix.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/default.nix2
-rw-r--r--Documentation/jekyll.nix2
2 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/default.nix b/Documentation/default.nix
index 90f8e88..b0fe341 100644
--- a/Documentation/default.nix
+++ b/Documentation/default.nix
@@ -2,7 +2,7 @@
 # SPDX-FileCopyrightText: 2022 Unikie
 # SPDX-License-Identifier: MIT
 
-import ../nix/eval-config.nix ({ config, src, ... }: config.pkgs.callPackage (
+import ../lib/eval-config.nix ({ config, src, ... }: config.pkgs.callPackage (
 
 { lib, stdenvNoCC, jekyll, drawio-headless }:
 
diff --git a/Documentation/jekyll.nix b/Documentation/jekyll.nix
index fe16186..4b32ebe 100644
--- a/Documentation/jekyll.nix
+++ b/Documentation/jekyll.nix
@@ -1,7 +1,7 @@
 # SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
 # SPDX-License-Identifier: MIT
 
-import ../nix/eval-config.nix ({ config, ... }: config.pkgs.callPackage (
+import ../lib/eval-config.nix ({ config, ... }: config.pkgs.callPackage (
 
 { bundlerApp }: