commit 8994d950b605ce0f04c57ce53b919ef53c31d9f2
parent a8de07b07ea0acd775ed4355a3f101cfbd79f374
Author: pyratebeard <root@pyratebeard.net>
Date: Fri, 23 Sep 2022 21:39:24 +0100
if else
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
@@ -6,13 +6,17 @@ ifeq (draft,$(firstword $(MAKECMDGOALS)))
DRAFT_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(DRAFT_ARGS):;@:)
-else (preview,$(firstword $(MAKECMDGOALS)))
+else
+ifeq (preview,$(firstword $(MAKECMDGOALS)))
VIEW_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(VIEW_ARGS):;@:)
-else (publish,$(firstword $(MAKECMDGOALS)))
+else
+ifeq (publish,$(firstword $(MAKECMDGOALS)))
PUB_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(PUB_ARGS):;@:)
endif
+endif
+endif
prog: # ...
# ...