summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@beefcake.parabola.nu>2018-05-18 23:06:08 -0400
committerLuke Shumaker <lukeshu@beefcake.parabola.nu>2018-05-18 23:06:08 -0400
commit1fd8e694c26a05069da7c660f1c4b95395bfea59 (patch)
treed30d61b2899f75bda04daa06e6ed441fd217eaf1
parent9018cb140b386582a1c0f19e7dbd8026960b3803 (diff)
use a go workspace
-rw-r--r--Makefile7
-rw-r--r--go/.gitignore2
-rw-r--r--go/src/cow-dedupe/dedupe.go (renamed from dedupe.go)0
3 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 9693ea4..fe3d2ca 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,7 @@ CPPFLAGS += -O2 -D_FORTIFY_SOURCE=2
all: cow-dedupe-range
all: cow-extent-map
+all: cow-dedupe
.PHONY: all
%: src/%.o
@@ -18,5 +19,11 @@ all: cow-extent-map
cow-dedupe-range: lib/dedupe-range.o
cow-extent-map: lib/extent-map.o lib/strextentflags.o
+cow-dedupe: go/bin/cow-dedupe
+ cp $< $@
+go/bin/cow-dedupe: FORCE
+ GOPATH=$(CURDIR)/go go install $(@F)
+
.SECONDARY:
.DELETE_ON_ERROR:
+.PHONY: FORCE
diff --git a/go/.gitignore b/go/.gitignore
new file mode 100644
index 0000000..4ce8181
--- /dev/null
+++ b/go/.gitignore
@@ -0,0 +1,2 @@
+/bin/
+/pkg/
diff --git a/dedupe.go b/go/src/cow-dedupe/dedupe.go
index f28d2f4..f28d2f4 100644
--- a/dedupe.go
+++ b/go/src/cow-dedupe/dedupe.go