Skip to content

Commit aa591a4

Browse files
authored
Improvements to Makefile (#370)
Improvement to `Makefile`. Also see apple/container#822.
1 parent d7814e4 commit aa591a4

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313
# limitations under the License.
1414

1515
# Build configuration variables
16-
# The default version ID 0.0.0 indicates a local development build or PRB
1716
BUILD_CONFIGURATION ?= debug
1817
WARNINGS_AS_ERRORS ?= true
19-
SWIFT_CONFIGURATION = $(if $(filter-out false,$(WARNINGS_AS_ERRORS)),-Xswiftc -warnings-as-errors)
18+
SWIFT_CONFIGURATION := $(if $(filter-out false,$(WARNINGS_AS_ERRORS)),-Xswiftc -warnings-as-errors)
2019

2120
# Commonly used locations
2221
SWIFT := "/usr/bin/swift"

vminitd/Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414

1515
BUILD_CONFIGURATION := debug
1616
WARNINGS_AS_ERRORS ?= true
17-
SWIFT_WARNING_CONFIG = $(if $(filter-out false,$(WARNINGS_AS_ERRORS)),-Xswiftc -warnings-as-errors)
17+
SWIFT_WARNING_CONFIG := $(if $(filter-out false,$(WARNINGS_AS_ERRORS)),-Xswiftc -warnings-as-errors)
1818
SWIFT_CONFIGURATION := --swift-sdk aarch64-swift-linux-musl $(SWIFT_WARNING_CONFIG)
1919

20-
SWIFT_VERSION = 6.2
21-
SWIFT_SDK_URL = https://download.swift.org/swift-6.2-release/static-sdk/swift-6.2-RELEASE/swift-6.2-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz
22-
SWIFT_SDK_PATH = /tmp/$(notdir $(SWIFT_SDK_URL))
20+
SWIFT_VERSION := 6.2
21+
SWIFT_SDK_URL := https://download.swift.org/swift-6.2-release/static-sdk/swift-6.2-RELEASE/swift-6.2-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz
22+
SWIFT_SDK_PATH := /tmp/$(notdir $(SWIFT_SDK_URL))
2323

2424
SWIFTLY_URL := https://download.swift.org/swiftly/darwin/swiftly.pkg
25-
SWIFTLY_FILENAME = $(notdir $(SWIFTLY_URL))
25+
SWIFTLY_FILENAME := $(notdir $(SWIFTLY_URL))
2626
SWIFTLY_BIN_DIR ?= ~/.swiftly/bin
27-
VMINITD_BIN_PATH := $(shell swift build -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) --show-bin-path)
27+
BUILD_BIN_DIR := $(shell swift build -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) --show-bin-path)
2828

2929
MACOS_VERSION := $(shell sw_vers -productVersion)
3030
MACOS_MAJOR := $(shell echo $(MACOS_VERSION) | cut -d. -f1)
@@ -40,8 +40,8 @@ all:
4040
@rm -f ./bin/vmexec
4141
@swift --version
4242
@swift build -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION)
43-
@install "$(VMINITD_BIN_PATH)/vminitd" ./bin/
44-
@install "$(VMINITD_BIN_PATH)/vmexec" ./bin/
43+
@install "$(BUILD_BIN_DIR)/vminitd" ./bin/
44+
@install "$(BUILD_BIN_DIR)/vmexec" ./bin/
4545

4646
.PHONY: cross-prep
4747
cross-prep: linux-sdk macos-sdk

0 commit comments

Comments
 (0)