diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2020-01-13 15:58:59 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2020-01-13 15:58:59 +0100 |
commit | 29f5515959de45a7f2971756e3563995c425c2c2 (patch) | |
tree | b59d1b28395ae19ffe8ec570f33a0e92ac8450bb | |
parent | 49eb5405debb49d19c58f966b4fceac9ea9571ae (diff) | |
download | wallabag-29f5515959de45a7f2971756e3563995c425c2c2.tar.gz wallabag-29f5515959de45a7f2971756e3563995c425c2c2.tar.zst wallabag-29f5515959de45a7f2971756e3563995c425c2c2.zip |
Improve check by using list
See https://stackoverflow.com/a/27335439/569101
-rwxr-xr-x | GNUmakefile | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/GNUmakefile b/GNUmakefile index db87c5d2..837f7103 100755 --- a/GNUmakefile +++ b/GNUmakefile | |||
@@ -3,12 +3,9 @@ TMP_FOLDER=/tmp | |||
3 | RELEASE_FOLDER=wllbg-release | 3 | RELEASE_FOLDER=wllbg-release |
4 | 4 | ||
5 | # ensure the ENV variable is well defined | 5 | # ensure the ENV variable is well defined |
6 | ifeq ($(origin ENV), prod) | 6 | AVAILABLE_ENV := prod dev test |
7 | # all good ("prod" is a valid env) | 7 | ifneq ($(filter $(ENV),$(AVAILABLE_ENV)),) |
8 | else ifeq ($(origin ENV), dev) | 8 | # all good |
9 | # all good ("dev" is a valid env) | ||
10 | else ifeq ($(origin ENV), test) | ||
11 | # all good ("test" is a valid env) | ||
12 | else | 9 | else |
13 | # not good, force it to "prod" | 10 | # not good, force it to "prod" |
14 | override ENV = prod | 11 | override ENV = prod |