-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
32 lines (23 loc) · 780 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
PROJECT := gitlab2gogs
SCRIPTDIR := $(shell pwd)
GOBUILDDIR := $(SCRIPTDIR)/.gobuild
SRCDIR := $(SCRIPTDIR)
BINDIR := $(SCRIPTDIR)
ORGPATH := github.com/ewoutp
ORGDIR := $(GOBUILDDIR)/src/$(ORGPATH)
REPONAME := $(PROJECT)
REPODIR := $(ORGDIR)/$(REPONAME)
BIN := $(BINDIR)/$(PROJECT)
GOPATH := $(GOBUILDDIR)
SOURCES := $(shell find $(SRCDIR) -name '*.go')
.PHONY: clean test
all: $(BIN)
clean:
rm -Rf $(BIN) $(GOBUILDDIR)
.gobuild:
mkdir -p $(ORGDIR)
rm -f $(REPODIR) && ln -s ../../../../src $(REPODIR)
git clone [email protected]:ewoutp/go-gitlab-client.git $(GOBUILDDIR)/src/github.com/ewoutp/go-gitlab-client
git clone [email protected]:gogits/go-gogs-client.git $(GOBUILDDIR)/src/github.com/gogits/go-gogs-client
$(BIN): .gobuild $(SOURCES)
go build -a -o $(PROJECT)