From 05c742df09825079be2d21b8e52726f68cc5343c Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 6 Apr 2015 00:16:39 +0100 Subject: Improve the make target validation --- Makefile | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 332108656..d54bfd409 100644 --- a/Makefile +++ b/Makefile @@ -114,29 +114,17 @@ ifeq ($(TARGET),) TARGET := gtk endif -SUBTARGET = -RESOURCES = +# valid values for the TARGET +VLDTARGET := riscos gtk beos amiga amigaos3 framebuffer windows atari cocoa monkey -ifneq ($(TARGET),riscos) - ifneq ($(TARGET),gtk) - ifneq ($(TARGET),beos) - ifneq ($(findstring amiga,$(TARGET)),amiga) - ifneq ($(TARGET),framebuffer) - ifneq ($(TARGET),windows) - ifneq ($(TARGET),atari) - ifneq ($(TARGET),cocoa) - ifneq ($(TARGET),monkey) - $(error Unknown TARGET "$(TARGET)", should either be "riscos", "gtk", "beos", "amiga", "framebuffer", "windows", "atari" or "cocoa" or "monkey") - endif - endif - endif - endif - endif - endif - endif - endif +# Check for valid TARGET +ifeq ($(filter $(VLDTARGET),$(TARGET)),) + $(error Unknown TARGET "$(TARGET)", Must be one of $(VLDTARGET)) endif +SUBTARGET = +RESOURCES = + PERL=perl MKDIR=mkdir TOUCH=touch -- cgit v1.2.3