summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-12-03 14:25:45 +0000
committerAlyssa Ross <hi@alyssa.is>2021-12-12 00:37:00 +0000
commitc03c0313416c532151d84367498d9e4d09229db4 (patch)
tree70027c4c13fea67322998b0db17b1671cd88de37 /Makefile
parent0c2b68c25c86aa419acd8f5728b65b7e57bf52a3 (diff)
downloadspectrum-c03c0313416c532151d84367498d9e4d09229db4.tar
spectrum-c03c0313416c532151d84367498d9e4d09229db4.tar.gz
spectrum-c03c0313416c532151d84367498d9e4d09229db4.tar.bz2
spectrum-c03c0313416c532151d84367498d9e4d09229db4.tar.lz
spectrum-c03c0313416c532151d84367498d9e4d09229db4.tar.xz
spectrum-c03c0313416c532151d84367498d9e4d09229db4.tar.zst
spectrum-c03c0313416c532151d84367498d9e4d09229db4.zip
Switch to fstab
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6621ba8..05369df 100644
--- a/Makefile
+++ b/Makefile
@@ -7,10 +7,15 @@ CPIOFLAGS = --reproducible -R +0:+0 -H newc
 build/initramfs: build/local.cpio $(PACKAGES_CPIO)
 	cat build/local.cpio $(PACKAGES_CPIO) | gzip -9n > $@
 
+# etc/init isn't included in ETC_FILES, because it gets installed to
+# the root.
+ETC_FILES = etc/checkesp etc/fstab etc/mdev.conf
 MOUNTPOINTS = dev mnt proc sys tmp
 
-build/local.cpio: etc/checkesp etc/init etc/mdev.conf build/mountpoints
-	printf "%s\n" etc etc/checkesp etc/mdev.conf | \
+build/local.cpio: $(ETC_FILES) etc/init build/mountpoints
+	printf "%s\n" $(ETC_FILES) | \
+	    awk '{while (length) { print; sub("/?[^/]*$$", "") }}' | \
+	    sort -u | \
 	    $(CPIO) -o $(CPIOFLAGS) > $@
 	cd etc && echo init | $(CPIO) -o $(CPIOFLAGS) -AF ../$@
 	cd build/mountpoints && \