From f49be770170a93f29e380d8bc834ed23ac5a37ed Mon Sep 17 00:00:00 2001 From: Jade Guiton Date: Mon, 18 Nov 2024 17:50:54 +0100 Subject: [PATCH] Revert superfluous changes --- Makefile | 2 +- Makefile.Common | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 1cd97b27a1f4..7fb147ae8968 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ PKG_MODS := $(shell find ./pkg/* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) CMD_MODS_0 := $(shell find ./cmd/[a-m]* $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) CMD_MODS_1 := $(shell find ./cmd/[n-z]* $(FIND_MOD_ARGS) -not -path "./cmd/otel*col/*" -exec $(TO_MOD_DIR) ) CMD_MODS := $(CMD_MODS_0) $(CMD_MODS_1) -OTHER_MODS := $(shell find . $(EX_COMPONENTS) $(EX_INTERNAL) $(EX_PKG) $(EX_CMD) $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) . +OTHER_MODS := $(shell find . $(EX_COMPONENTS) $(EX_INTERNAL) $(EX_PKG) $(EX_CMD) $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) ) $(PWD) ALL_MODS := $(RECEIVER_MODS) $(PROCESSOR_MODS) $(EXPORTER_MODS) $(EXTENSION_MODS) $(CONNECTOR_MODS) $(INTERNAL_MODS) $(PKG_MODS) $(CMD_MODS) $(OTHER_MODS) CGO_MODS := ./receiver/hostmetricsreceiver diff --git a/Makefile.Common b/Makefile.Common index e2be36d87c7d..7d8bb4244aaa 100644 --- a/Makefile.Common +++ b/Makefile.Common @@ -83,29 +83,29 @@ TESTIFYLINT_OPT?= --enable-all --disable=float-compare,require-error,suite-subte # BUILD_TYPE should be one of (dev, release). BUILD_TYPE?=release -ALL_PKG_DIRS = $(shell $(GOCMD) list -f '{{ .Dir }}' ./... | $(NORMALIZE_DIRS)) +ALL_PKG_DIRS := $(shell $(GOCMD) list -f '{{ .Dir }}' ./... | $(NORMALIZE_DIRS)) -ALL_SRC = $(shell find $(ALL_PKG_DIRS) -name '*.go' \ +ALL_SRC := $(shell find $(ALL_PKG_DIRS) -name '*.go' \ -not -path '*/third_party/*' \ -not -path '*/local/*' \ -type f | sort) -ALL_SRC_AND_SHELL = find . -type f \( -iname '*.go' -o -iname "*.sh" \) ! -path '**/third_party/*' | sort +ALL_SRC_AND_SHELL := find . -type f \( -iname '*.go' -o -iname "*.sh" \) ! -path '**/third_party/*' | sort # All source code and documents. Used in spell check. -ALL_SRC_AND_DOC_CMD = find $(ALL_PKG_DIRS) -name "*.md" -o -name "*.go" -o -name "*.yaml" -not -path '*/third_party/*' -type f | sort +ALL_SRC_AND_DOC_CMD := find $(ALL_PKG_DIRS) -name "*.md" -o -name "*.go" -o -name "*.yaml" -not -path '*/third_party/*' -type f | sort ifeq ($(UNIX_SHELL_ON_WINDOWS),true) # Windows has a low limit, 8192 chars, to create a process. Workaround it by breaking it in smaller commands. - MISSPELL_CMD = $(ALL_SRC_AND_DOC_CMD) | xargs -n 20 $(MISSPELL) - MISSPELL_CORRECTION_CMD = $(ALL_SRC_AND_DOC_CMD) | xargs -n 20 $(MISSPELL_CORRECTION) + MISSPELL_CMD := $(ALL_SRC_AND_DOC_CMD) | xargs -n 20 $(MISSPELL) + MISSPELL_CORRECTION_CMD := $(ALL_SRC_AND_DOC_CMD) | xargs -n 20 $(MISSPELL_CORRECTION) else - ALL_SRC_AND_DOC = $(shell $(ALL_SRC_AND_DOC_CMD)) - MISSPELL_CMD = $(MISSPELL) $(ALL_SRC_AND_DOC) - MISSPELL_CORRECTION_CMD = $(MISSPELL_CORRECTION) $(ALL_SRC_AND_DOC) + ALL_SRC_AND_DOC := $(shell $(ALL_SRC_AND_DOC_CMD)) + MISSPELL_CMD := $(MISSPELL) $(ALL_SRC_AND_DOC) + MISSPELL_CORRECTION_CMD := $(MISSPELL_CORRECTION) $(ALL_SRC_AND_DOC) endif # ALL_PKGS is used with 'go cover' -ALL_PKGS = $(shell $(GOCMD) list $(sort $(dir $(ALL_SRC)))) +ALL_PKGS := $(shell $(GOCMD) list $(sort $(dir $(ALL_SRC)))) ADDLICENSE_CMD := $(ADDLICENSE) -s=only -y "" -c "The OpenTelemetry Authors"