summaryrefslogtreecommitdiff
path: root/Makefile.d/build.mk
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.d/build.mk')
-rw-r--r--Makefile.d/build.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile.d/build.mk b/Makefile.d/build.mk
new file mode 100644
index 0000000..478fdc5
--- /dev/null
+++ b/Makefile.d/build.mk
@@ -0,0 +1,17 @@
+define rule_grub_cfg
+tmp/grub_%(keymap)_%(romtype).cfg: \
+ resources/grub/config/extra/common.cfg resources/grub/config/menuentries/common.cfg \
+ resources/grub/config/extra/%(romtype).cfg resources/grub/config/menuentries/%(romtype).cfg ;
+ echo 'keymap %(keymap)' | cat \
+ resources/grub/config/extra/common.cfg \
+ resources/grub/config/extra/%(romtype).cfg \
+ - \
+ resources/grub/config/menuentries/common.cfg \
+ resources/grub/config/menuentries/%(romtype).cfg \
+ > $@
+endef
+$(eval $(call multiglob,grub_cfg,keymap romtype))
+
+# % = $(keymap)_$(romtype)
+tmp/grub_%_test.cfg: tmp/grub_%.cfg
+ sed 's/grubtest.cfg/grub.cfg/' < $< > $@