summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2023-10-25 03:02:09 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2023-10-25 03:02:09 -0500
commitfcd49f12493d6d47c128693e14b3f29ebe7bba42 (patch)
treec44cac6eef89ddfb0f55f95d2f794dee1723c994
parente812deef64ecb7abd63926929145aa061a540657 (diff)
downloadimage-fcd49f12493d6d47c128693e14b3f29ebe7bba42.tar.gz
image-fcd49f12493d6d47c128693e14b3f29ebe7bba42.tar.bz2
image-fcd49f12493d6d47c128693e14b3f29ebe7bba42.tar.xz
image-fcd49f12493d6d47c128693e14b3f29ebe7bba42.zip
Makefile: Use pattern matching for DE media
This drastically simplifies adding new DEs and removes a lot of repetitive rules.
-rw-r--r--Makefile21
1 files changed, 2 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index 0d25c38..00315dd 100644
--- a/Makefile
+++ b/Makefile
@@ -18,14 +18,6 @@ help:
@printf "\nYou must set ARCH to a supported architecture.\n"
@printf "Note that if you don't set ARCH to the native arch of your host,\nyou probably need qemu-user installed.\n"
-# This target only exists so the ARCH check runs before any other Make code.
-check-env:
- @printf "Please choose something to build!\n\nTry 'inst', 'iso', 'world', or 'help' for a complete list.\n"
-
-ifndef ARCH
- $(error Set ARCH first)
-endif
-
adelie-inst-firmware-$(ARCH)-$(VERSION).iso: configs/horizon/$(ARCH)-horizon-fw.installfile configs/horizon/firmware.installfile configs/horizon/horizon.installfile configs/arch/$(ARCH).installfile configs/base/base.installfile
hscript-image -t iso -o adelie-inst-firmware-$(ARCH)-$(VERSION).iso configs/horizon/$(ARCH)-horizon-fw.installfile
@@ -34,17 +26,8 @@ adelie-inst-$(ARCH)-$(VERSION).iso: configs/horizon/$(ARCH)-horizon.installfile
inst: adelie-inst-firmware-$(ARCH)-$(VERSION).iso adelie-inst-$(ARCH)-$(VERSION).iso
-adelie-live-kde-$(ARCH)-$(VERSION).iso: configs/live/$(ARCH)-kde.installfile configs/base/kde.installfile configs/arch/$(ARCH).installfile configs/base/base.installfile
- hscript-image -t iso -o adelie-live-kde-$(ARCH)-$(VERSION).iso configs/live/$(ARCH)-kde.installfile
-
-adelie-live-lxqt-$(ARCH)-$(VERSION).iso: configs/live/$(ARCH)-lxqt.installfile configs/base/lxqt.installfile configs/arch/$(ARCH).installfile configs/base/base.installfile
- hscript-image -t iso -o adelie-live-lxqt-$(ARCH)-$(VERSION).iso configs/live/$(ARCH)-lxqt.installfile
-
-adelie-live-mate-$(ARCH)-$(VERSION).iso: configs/live/$(ARCH)-mate.installfile configs/base/mate.installfile configs/arch/$(ARCH).installfile configs/base/base.installfile
- hscript-image -t iso -o adelie-live-mate-$(ARCH)-$(VERSION).iso configs/live/$(ARCH)-mate.installfile
-
-adelie-live-xfce-$(ARCH)-$(VERSION).iso: configs/live/$(ARCH)-xfce.installfile configs/base/xfce.installfile configs/arch/$(ARCH).installfile configs/base/base.installfile
- hscript-image -t iso -o adelie-live-xfce-$(ARCH)-$(VERSION).iso configs/live/$(ARCH)-xfce.installfile
+adelie-live-%-$(ARCH)-$(VERSION).iso: configs/live/$(ARCH)-%.installfile configs/base/%.installfile configs/arch/$(ARCH).installfile configs/base/base.installfile
+ hscript-image -t iso -o adelie-live-$*-$(ARCH)-$(VERSION).iso configs/live/$(ARCH)-$*.installfile
kde: adelie-live-kde-$(ARCH)-$(VERSION).iso
lxqt: adelie-live-lxqt-$(ARCH)-$(VERSION).iso