@@ -370,13 +370,13 @@ hack-test-%: ## Runs the specified script in ./hack/test with well known environ
370
370
371
371
.PHONY : generate
372
372
generate : # # Generates code from protobuf service definitions and machinery config.
373
- @$(MAKE ) local-$@ DEST=./ PLATFORM=linux/amd64 EMBED_TARGET=embed-abbrev
373
+ @$(MAKE ) local-$@ DEST=./ PLATFORM=$( OPERATING_SYSTEM ) / $( ARCH ) EMBED_TARGET=embed-abbrev
374
374
375
375
.PHONY : docs
376
376
docs : # # Generates the documentation for machine config, and talosctl.
377
377
@rm -rf docs/configuration/*
378
378
@rm -rf docs/talosctl/*
379
- @$(MAKE ) local-$@ DEST=./ PLATFORM=linux/amd64
379
+ @$(MAKE ) local-$@ DEST=./ PLATFORM=$( OPERATING_SYSTEM ) / $( ARCH )
380
380
381
381
.PHONY : docs-preview
382
382
docs-preview : # # Starts a local preview of the documentation using Hugo in docker
@@ -456,7 +456,7 @@ image-%: ## Builds the specified image. Valid options are aws, azure, digital-oc
456
456
@docker pull $(REGISTRY_AND_USERNAME ) /imager:$(IMAGE_TAG_IN )
457
457
@for platform in $(subst $(, ) ,$(space ) ,$(PLATFORM ) ) ; do \
458
458
arch=$$(basename "$${platform}") && \
459
- docker run --rm -t -v /dev:/dev -v $(PWD ) /$(ARTIFACTS ) :/secureboot:ro -v $(PWD ) /$(ARTIFACTS ) :/out -e SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH ) --network=host --privileged $(REGISTRY_AND_USERNAME ) /imager:$(IMAGE_TAG_IN ) $* --arch $$ arch $(IMAGER_ARGS ) ; \
459
+ docker run --rm -t -v /dev:/dev -v $(PWD ) /$(ARTIFACTS ) :/secureboot:ro -v $(PWD ) /$(ARTIFACTS ) :/out -e SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH ) --network=host --privileged $(REGISTRY_AND_USERNAME ) /imager:$(IMAGE_TAG_IN ) $* --arch $$ arch --base-installer-image $( REGISTRY_AND_USERNAME ) /installer-base: $( IMAGE_TAG_IN ) $(IMAGER_ARGS ) ; \
460
460
done
461
461
462
462
.PHONY : images-essential
@@ -530,19 +530,19 @@ cache-create: installer imager ## Generate image cache.
530
530
# Code Quality
531
531
532
532
api-descriptors : # # Generates API descriptors used to detect breaking API changes.
533
- @$(MAKE ) local-api-descriptors DEST=./ PLATFORM=linux/amd64
533
+ @$(MAKE ) local-api-descriptors DEST=./ PLATFORM=$( OPERATING_SYSTEM ) / $( ARCH )
534
534
535
535
fmt-go : # # Formats the source code.
536
536
@docker run --rm -it -v $(PWD ) :/src -w /src -e GOTOOLCHAIN=local golang:$(GO_VERSION ) bash -c " go install golang.org/x/tools/cmd/goimports@$( GOIMPORTS_VERSION) && goimports -w -local github.com/siderolabs/talos . && go install mvdan.cc/gofumpt@$( GOFUMPT_VERSION) && gofumpt -w ."
537
537
538
538
fmt-protobuf : # # Formats protobuf files.
539
- @$(MAKE ) local-fmt-protobuf DEST=./ PLATFORM=linux/amd64
539
+ @$(MAKE ) local-fmt-protobuf DEST=./ PLATFORM=$( OPERATING_SYSTEM ) / $( ARCH )
540
540
541
541
fmt : # # Formats the source code and protobuf files.
542
542
@$(MAKE ) fmt-go fmt-protobuf
543
543
544
544
lint-% : # # Runs the specified linter. Valid options are go, protobuf, and markdown (e.g. lint-go).
545
- @$(MAKE ) target-lint-$* PLATFORM=linux/amd64
545
+ @$(MAKE ) target-lint-$* PLATFORM=$( OPERATING_SYSTEM ) / $( ARCH )
546
546
547
547
lint : # # Runs linters on go, vulncheck, protobuf, and markdown file types.
548
548
@$(MAKE ) lint-go lint-vulncheck lint-protobuf lint-markdown
@@ -551,17 +551,17 @@ check-dirty: ## Verifies that source tree is not dirty
551
551
@if test -n " ` git status --porcelain` " ; then echo " Source tree is dirty" ; git status; git diff; exit 1 ; fi
552
552
553
553
go-mod-outdated : # # Runs the go-mod-oudated to show outdated dependencies.
554
- @$(MAKE ) target-go-mod-outdated PLATFORM=linux/amd64
554
+ @$(MAKE ) target-go-mod-outdated PLATFORM=$( OPERATING_SYSTEM ) / $( ARCH )
555
555
556
556
# Tests
557
557
558
558
.PHONY : unit-tests
559
559
unit-tests : # # Performs unit tests.
560
- @$(MAKE ) local-$@ DEST=$(ARTIFACTS ) TARGET_ARGS=" --allow security.insecure" PLATFORM=linux/amd64
560
+ @$(MAKE ) local-$@ DEST=$(ARTIFACTS ) TARGET_ARGS=" --allow security.insecure" PLATFORM=$( OPERATING_SYSTEM ) / $( ARCH )
561
561
562
562
.PHONY : unit-tests-race
563
563
unit-tests-race : # # Performs unit tests with race detection enabled.
564
- @$(MAKE ) target-$@ TARGET_ARGS=" --allow security.insecure" PLATFORM=linux/amd64
564
+ @$(MAKE ) target-$@ TARGET_ARGS=" --allow security.insecure" PLATFORM=$( OPERATING_SYSTEM ) / $( ARCH )
565
565
566
566
$(ARTIFACTS ) /$(INTEGRATION_TEST_DEFAULT_TARGET ) -amd64 :
567
567
@$(MAKE ) local-$(INTEGRATION_TEST_DEFAULT_TARGET ) -amd64 DEST=$(ARTIFACTS ) PLATFORM=linux/amd64 WITH_RACE=true PUSH=false
@@ -711,8 +711,8 @@ sign-images: ## Run cosign to sign all images built by this Makefile.
711
711
.PHONY : reproducibility-test
712
712
reproducibility-test :
713
713
@$(MAKE ) reproducibility-test-local-initramfs
714
- @$(MAKE ) reproducibility-test-docker-installer-base INSTALLER_ARCH=targetarch PLATFORM=linux/amd64
715
- @$(MAKE ) reproducibility-test-docker-talos reproducibility-test-docker-imager reproducibility-test-docker-talosctl PLATFORM=linux/amd64
714
+ @$(MAKE ) reproducibility-test-docker-installer-base INSTALLER_ARCH=targetarch PLATFORM=$( OPERATING_SYSTEM ) / $( ARCH )
715
+ @$(MAKE ) reproducibility-test-docker-talos reproducibility-test-docker-imager reproducibility-test-docker-talosctl PLATFORM=$( OPERATING_SYSTEM ) / $( ARCH )
716
716
717
717
reproducibility-test-docker-% :
718
718
@rm -rf _out1/ _out2/
0 commit comments