mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Improve the Makefile
Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
parent
5a6424839d
commit
746ead5747
11
Makefile
11
Makefile
@ -1,4 +1,4 @@
|
||||
.PHONY: build clean contrib_check coverage help install isntall binary_msg lint run size test uninstall
|
||||
.PHONY: build clean contrib_check coverage help install isntall lint run size test uninstall
|
||||
|
||||
# detect GOPATH if not set
|
||||
ifndef $(GOPATH)
|
||||
@ -26,15 +26,12 @@ THIS_FILE := $(lastword $(MAKEFILE_LIST))
|
||||
|
||||
APP=wtfutil
|
||||
|
||||
binary_msg:
|
||||
@echo "Install path: "
|
||||
|
||||
# -------------------- Actions -------------------- #
|
||||
|
||||
## build: builds a local version
|
||||
build:
|
||||
go build -o bin/${APP}
|
||||
@$(MAKE) -f $(THIS_FILE) binary_msg
|
||||
@echo "Done"
|
||||
|
||||
## clean: removes old build cruft
|
||||
clean:
|
||||
@ -65,8 +62,8 @@ install:
|
||||
@go clean
|
||||
@go install -ldflags="-s -w -X main.version=$(shell git describe --always --abbrev=6) -X main.date=$(shell date +%FT%T%z)"
|
||||
@mv ~/go/bin/wtf ~/go/bin/${APP}
|
||||
@$(MAKE) -f $(THIS_FILE) binary_msg
|
||||
@which ${APP} || echo "Could not find ${APP} in PATH" && exit 0
|
||||
$(eval INSTALLPATH = $(shell which ${APP}))
|
||||
@echo "${APP} installed into ${INSTALLPATH}"
|
||||
|
||||
## lint: runs a number of code quality checks against the source code
|
||||
lint:
|
||||
|
Loading…
x
Reference in New Issue
Block a user