From 8ac68c95a41eb689f1b08ce8a16912ff594f145f Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Wed, 14 Jun 2023 13:17:16 -0500 Subject: [PATCH] chore: lazily initialize find commands in makefile (#8030) Improves make performance for small targets! --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c113da58bb..a96f216ee0 100644 --- a/Makefile +++ b/Makefile @@ -52,9 +52,9 @@ endif FIND_EXCLUSIONS= \ -not \( \( -path '*/.git/*' -o -path './build/*' -o -path './vendor/*' -o -path './.coderv2/*' -o -path '*/node_modules/*' -o -path './site/out/*' -o -path './coderd/apidoc/*' \) -prune \) # Source files used for make targets, evaluated on use. -GO_SRC_FILES = $(shell find . $(FIND_EXCLUSIONS) -type f -name '*.go') +GO_SRC_FILES := $(shell find . $(FIND_EXCLUSIONS) -type f -name '*.go') # All the shell files in the repo, excluding ignored files. -SHELL_SRC_FILES = $(shell find . $(FIND_EXCLUSIONS) -type f -name '*.sh') +SHELL_SRC_FILES := $(shell find . $(FIND_EXCLUSIONS) -type f -name '*.sh') # All ${OS}_${ARCH} combos we build for. Windows binaries have the .exe suffix. OS_ARCHES := \