Skip to content

Commit 21408d3

Browse files
committed
Revert "Provides explicit makefile targets for files (#167)"
This reverts commit f9198d6.
1 parent e274a79 commit 21408d3

File tree

2 files changed

+20
-36
lines changed

2 files changed

+20
-36
lines changed

Makefile

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -40,39 +40,33 @@ release: BUILD_CONFIGURATION = release
4040
release: all
4141

4242
.PHONY: containerization
43-
containerization: bin/cctl bin/containerization-integration
44-
45-
.PHONY: swift-build
46-
swift-build:
43+
containerization:
4744
@echo Building containerization binaries...
45+
@mkdir -p bin
4846
@$(SWIFT) build -c $(BUILD_CONFIGURATION)
4947

50-
$(BUILD_BIN_DIR)/cctl $(BUILD_BIN_DIR)/containerization-integration:
51-
@"$(MAKE)" swift-build
48+
@echo Copying containerization binaries...
49+
@install $(BUILD_BIN_DIR)/cctl ./bin/
50+
@install $(BUILD_BIN_DIR)/containerization-integration ./bin/
5251

53-
bin/%: $(BUILD_BIN_DIR)/%
54-
@mkdir -p bin/
55-
@install $< bin/
56-
@codesign --force --sign - --timestamp=none --entitlements=signing/vz.entitlements $@
52+
@echo Signing containerization binaries...
53+
@codesign --force --sign - --timestamp=none --entitlements=signing/vz.entitlements bin/cctl
54+
@codesign --force --sign - --timestamp=none --entitlements=signing/vz.entitlements bin/containerization-integration
5755

58-
init := bin/init.rootfs.tar.gz
5956
.PHONY: init
60-
init: $(init)
61-
62-
$(init): vminitd/bin/vminitd vminitd/bin/vmexec bin/cctl
57+
init: vminitd
6358
@echo Creating init.ext4...
64-
@rm -f $(init) bin/init.block
65-
@./bin/cctl rootfs create --vminitd vminitd/bin/vminitd --labels org.opencontainers.image.source=https://github.com/apple/containerization --vmexec vminitd/bin/vmexec $(init) vminit:latest
59+
@rm -f bin/init.rootfs.tar.gz bin/init.block
60+
@./bin/cctl rootfs create --vminitd vminitd/bin/vminitd --labels org.opencontainers.image.source=https://github.com/apple/containerization --vmexec vminitd/bin/vmexec bin/init.rootfs.tar.gz vminit:latest
6661

6762
.PHONY: cross-prep
6863
cross-prep:
6964
@"$(MAKE)" -C vminitd cross-prep
7065

7166
.PHONY: vminitd
72-
vminitd: vminitd/bin/vminitd vminitd/bin/vmexec
73-
74-
vminitd/bin/%:
75-
@"$(MAKE)" -C vminitd BUILD_CONFIGURATION=$(BUILD_CONFIGURATION) bin/$*
67+
vminitd:
68+
@mkdir -p ./bin
69+
@"$(MAKE)" -C vminitd BUILD_CONFIGURATION=$(BUILD_CONFIGURATION)
7670

7771
.PHONY: update-libarchive-source
7872
update-libarchive-source:
@@ -94,10 +88,6 @@ ifeq (,$(wildcard bin/vmlinux))
9488
@echo No bin/vmlinux kernel found. See fetch-default-kernel target.
9589
@exit 1
9690
endif
97-
@"$(MAKE)" integration-kernel-checked
98-
99-
.PHONY: integration-kernel-checked
100-
integration-kernel-checked: $(init) bin/containerization-integration
10191
@echo Running the integration tests...
10292
@./bin/containerization-integration --bootlog ./bin/boot.log
10393

vminitd/Makefile

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,14 @@ MACOS_RELEASE_TYPE := $(shell sw_vers | grep ReleaseType)
3131
.DEFAULT_GOAL := all
3232

3333
.PHONY: all
34-
all: bin/vminitd bin/vmexec
35-
36-
.PHONY: swift-build
37-
swift-build:
34+
all:
3835
@echo Building vminitd and vmexec...
36+
@mkdir -p ./bin/
37+
@rm -f ./bin/vminitd
38+
@rm -f ./bin/vmexec
3939
@swift build -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION)
40-
41-
$(VMINITD_BIN_PATH)/vminitd $(VMINITD_BIN_PATH)/vmexec:
42-
@$(MAKE) swift-build
43-
44-
bin/%: $(VMINITD_BIN_PATH)/%
45-
@mkdir -p bin/
46-
@rm -f $@
47-
@install $< bin/
40+
@install $(VMINITD_BIN_PATH)/vminitd ./bin/vminitd
41+
@install $(VMINITD_BIN_PATH)/vmexec ./bin/vmexec
4842

4943
.PHONY: cross-prep
5044
cross-prep: linux-sdk macos-sdk

0 commit comments

Comments
 (0)