mirror of
https://github.com/jimeh/rbheap.git
synced 2026-02-19 12:56:46 +00:00
Majorly simplify Makefile targets around easyjson
It's easy to not to do stupid stuff when you're actually away ^_^
This commit is contained in:
22
Makefile
22
Makefile
@@ -4,10 +4,6 @@ NAME = rbheap
|
|||||||
BINARY = bin/${NAME}
|
BINARY = bin/${NAME}
|
||||||
VERSION ?= $(shell cat VERSION)
|
VERSION ?= $(shell cat VERSION)
|
||||||
|
|
||||||
#
|
|
||||||
# Main targets.
|
|
||||||
#
|
|
||||||
|
|
||||||
SOURCES = $(shell find . -name '*.go' -o -name 'Makefile' -o -name 'VERSION')
|
SOURCES = $(shell find . -name '*.go' -o -name 'Makefile' -o -name 'VERSION')
|
||||||
|
|
||||||
all: bootstrap generate build
|
all: bootstrap generate build
|
||||||
@@ -37,22 +33,8 @@ test:
|
|||||||
generate: dev-deps
|
generate: dev-deps
|
||||||
go generate ./...
|
go generate ./...
|
||||||
|
|
||||||
#
|
%_easyjson.go: %.go
|
||||||
# EasyJSON targets.
|
easyjson -all $^
|
||||||
#
|
|
||||||
|
|
||||||
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.
|
|
||||||
#
|
|
||||||
|
|
||||||
.PHONY: dep-ensure
|
.PHONY: dep-ensure
|
||||||
dep-ensure:
|
dep-ensure:
|
||||||
|
|||||||
Reference in New Issue
Block a user