aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-06-25 00:10:52 +0900
committerFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-06-25 11:37:49 +0900
commit744bb2b8d146eaba4d073cf58e35a60903e06de8 (patch)
tree15d5c79f4e62428b3c427d0ce15e0076a92139de /Makefile
parent44ae8cfdc153dd1a209b16453d5dbaa8b4f199d7 (diff)
downloadkati-744bb2b8d146eaba4d073cf58e35a60903e06de8.tar.gz
go gettable for github.com/google/kati
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 12 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 57e82c5..1641884 100644
--- a/Makefile
+++ b/Makefile
@@ -41,8 +41,18 @@ CXXFLAGS:=-g -W -Wall -MMD # -O
all: kati para ckati $(CXX_TEST_EXES)
-kati: $(GO_SRCS)
- env $(shell go env) go build -o $@ *.go
+kati: go_src_stamp
+ GOPATH=$$(pwd)/out go install github.com/google/kati/cmd/kati
+ cp out/bin/kati $@
+
+go_src_stamp: $(GO_SRCS) cmd/*/*.go
+ -rm -rf out/src/github.com/google/kati
+ mkdir -p out/src/github.com/google/kati
+ cp -a $(GO_SRCS) cmd out/src/github.com/google/kati
+ touch $@
+
+go_test: $(GO_SRCS) para
+ go test *.go
ckati: $(CXX_OBJS)
$(CXX) -std=c++11 $(CXXFLAGS) -o $@ $(CXX_OBJS)
@@ -54,9 +64,6 @@ $(CXX_TEST_EXES): $(filter-out main.o,$(CXX_OBJS))
$(CXX_TEST_EXES): %: %.o
$(CXX) $^ -o $@
-go_test: $(GO_SRCS) para
- env $(shell go env) go test *.go
-
para: para.cc
$(CXX) -std=c++11 -g -O -W -Wall -MMD -o $@ $<