Skip to content

Commit

Permalink
fix(build): mock target
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Fossati <[email protected]>
  • Loading branch information
thomas-fossati committed Aug 24, 2024
1 parent 5158c86 commit 9a84b9b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ endif
COVER_THRESHOLD := $(shell grep '^name: cover' .github/workflows/ci-go-cover.yml | cut -c13-)

define MOCK_template
mock_$(1): $(1)
$$(MOCKGEN) -source=$$< -destination=cmd/mocks/$$$$(basename $$@) -package=$$(MOCKPKG)
cmd/mocks/$(notdir $(1)): $(1)
$$(MOCKGEN) -source=$$< -destination=$$@ -package=$$(MOCKPKG)
endef

$(foreach m,$(INTERFACES),$(eval $(call MOCK_template,$(m))))
MOCK_FILES := $(foreach m,$(INTERFACES),$(join mock_,$(m)))
MOCK_FILES := $(foreach m,$(INTERFACES),$(join cmd/mocks/,$(notdir $(m))))
CLEANFILES := $(MOCK_FILES)

_mocks: $(MOCK_FILES)
Expand Down

0 comments on commit 9a84b9b

Please sign in to comment.