From 8bb4f68fa670e2f99bc1d347ae4643096c4ca101 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 9 Jul 2018 17:02:56 +0100 Subject: [PATCH] Majorly simplify Makefile targets around easyjson It's easy to not to do stupid stuff when you're actually away ^_^ --- Makefile | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 37f4d79..23a4a3b 100644 --- a/Makefile +++ b/Makefile @@ -4,10 +4,6 @@ NAME = rbheap BINARY = bin/${NAME} VERSION ?= $(shell cat VERSION) -# -# Main targets. -# - SOURCES = $(shell find . -name '*.go' -o -name 'Makefile' -o -name 'VERSION') all: bootstrap generate build @@ -37,22 +33,8 @@ test: generate: dev-deps go generate ./... -# -# EasyJSON targets. -# - -EASYJSON_FILES = $(shell find . -name '*_easyjson.go' -not -path '*/vendor/*') - -define easyjson_file -$(1): $(subst _easyjson.go,.go,$(1)) - easyjson -all $$^ -endef - -$(foreach file,$(EASYJSON_FILES),$(eval $(call easyjson_file,$(file)))) - -# -# Dependency targets. -# +%_easyjson.go: %.go + easyjson -all $^ .PHONY: dep-ensure dep-ensure: