Skip to content

Commit e369507

Browse files
committed
- Reworked Makefile to allow explicitly specifying "default" as possible value for the VARIANT environment variable
- Disabled travis-ci
1 parent 69856e1 commit e369507

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed
File renamed without changes.

Makefile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,22 @@ do_default=true
1212
do_alpine=true
1313

1414
# The following logic evaluates VERSION and VARIANT variables that may have
15-
# been previously specified, and unsets the "do" flags depending on the values.
15+
# been previously specified, and modifies the "do" flags depending on the values.
1616
# The VERSIONS variable is also set to contain the version(s) to be processed.
1717
ifdef VERSION
18-
VERSIONS=$(VERSION) # If a version was speciefied, VERSIONS only contains the specified version
19-
ifdef VARIANT
20-
do_default=false # If a variant was specified as an environment variable, don't process the default
21-
ifneq ($(VARIANT),alpine)
22-
do_alpine=false # If alpine variant was specified as an environment variable, process the alpine variant
18+
VERSIONS=$(VERSION) # If a version was specified, VERSIONS only contains the specified version
19+
ifdef VARIANT # If a variant is specified, unset all do flags and allow subsequent logic to set them again where appropriate
20+
do_default=false
21+
do_alpine=false
22+
ifeq ($(VARIANT),default)
23+
do_default=true
24+
endif
25+
ifeq ($(VARIANT),alpine)
26+
do_alpine=true
2327
endif
24-
else
25-
do_alpine=false # If no variant was specified, don't process the alpine variant
2628
endif
27-
ifeq ("$(wildcard $(VERSION)/alpine)","")
28-
do_alpine=false # If no alpine subdirectory exists, don't process the alpine version
29+
ifeq ("$(wildcard $(VERSION)/alpine)","") # If no alpine subdirectory exists, don't process the alpine version
30+
do_alpine=false
2931
endif
3032
else # If no version was specified, VERSIONS should contain all versions
3133
VERSIONS = $(foreach df,$(wildcard */Dockerfile),$(df:%/Dockerfile=%))

0 commit comments

Comments
 (0)