summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-04-06 00:16:39 +0100
committerVincent Sanders <vince@kyllikki.org>2015-04-06 00:16:39 +0100
commit05c742df09825079be2d21b8e52726f68cc5343c (patch)
tree00cd13145a6bd5d08c11aa724b1c8a4224fc1ea8
parentd3c4eb73631b0f3fb5b08400592f438f0cf71f79 (diff)
downloadnetsurf-05c742df09825079be2d21b8e52726f68cc5343c.tar.gz
netsurf-05c742df09825079be2d21b8e52726f68cc5343c.tar.bz2
Improve the make target validation
-rw-r--r--Makefile28
1 files changed, 8 insertions, 20 deletions
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