mirror of
https://github.com/Threnklyn/jira.git
synced 2026-06-07 13:33:32 +02:00
fix build under Cygwin on Windows
This commit is contained in:
@@ -13,14 +13,24 @@ PLATFORMS= \
|
|||||||
darwin-amd64 \
|
darwin-amd64 \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
DIST=$(shell pwd)/dist
|
OS=$(shell uname -s)
|
||||||
|
ifeq ($(filter CYGWIN%,$(OS)),$(OS))
|
||||||
|
export CWD=$(shell cygpath -wa .)
|
||||||
|
export SEP=\\
|
||||||
|
export CYGWIN=winsymlinks:native
|
||||||
|
else
|
||||||
|
export CWD=$(shell pwd)
|
||||||
|
export SEP=/
|
||||||
|
endif
|
||||||
|
|
||||||
export GOPATH=$(shell pwd)
|
export GOPATH=$(CWD)
|
||||||
|
|
||||||
GOBIN ?= $(shell pwd)
|
DIST=$(CWD)$(SEP)dist
|
||||||
|
|
||||||
|
GOBIN ?= $(CWD)
|
||||||
NAME=jira
|
NAME=jira
|
||||||
|
|
||||||
BIN ?= $(GOBIN)/$(NAME)
|
BIN ?= $(GOBIN)$(SEP)$(NAME)
|
||||||
|
|
||||||
CURVER ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags || grep ^\#\# CHANGELOG.md | awk '{print $$2; exit}')
|
CURVER ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags || grep ^\#\# CHANGELOG.md | awk '{print $$2; exit}')
|
||||||
LDFLAGS:=-X jira.VERSION=$(patsubst v%,%,$(CURVER)) -w
|
LDFLAGS:=-X jira.VERSION=$(patsubst v%,%,$(CURVER)) -w
|
||||||
@@ -34,11 +44,11 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
build: src/github.com/Netflix-Skunkworks/go-jira
|
build: src/github.com/Netflix-Skunkworks/go-jira
|
||||||
$(GOBUILD) -o $(BIN) main/main.go
|
$(GOBUILD) -o '$(BIN)' main/main.go
|
||||||
|
|
||||||
src/%:
|
src/%:
|
||||||
mkdir -p $(@D)
|
mkdir -p $(@D)
|
||||||
test -L $@ || ln -sf ../../.. $@
|
test -L $@ || ln -sf '$(GOPATH)' $@
|
||||||
go get -v $* $*/main
|
go get -v $* $*/main
|
||||||
|
|
||||||
cross-setup:
|
cross-setup:
|
||||||
|
|||||||
Reference in New Issue
Block a user