From c9b83c506c6dd416070674c76a57acaaa7636afa Mon Sep 17 00:00:00 2001
From: Jeromy <jeromyj@gmail.com>
Date: Fri, 5 Feb 2016 15:50:40 -0800
Subject: [PATCH] makefile fixes

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
---
 Makefile          |  4 ++--
 cmd/ipfs/Makefile | 17 ++++-------------
 2 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile
index a59934ecd..11bf6403f 100644
--- a/Makefile
+++ b/Makefile
@@ -27,10 +27,10 @@ deps: gx
 vendor: godep
 	godep save -r ./...
 
-install: deps
+install: build
 	cd cmd/ipfs && go install -ldflags=$(ldflags)
 
-build:
+build: deps
 	cd cmd/ipfs && go build -i -ldflags=$(ldflags)
 
 nofuse:
diff --git a/cmd/ipfs/Makefile b/cmd/ipfs/Makefile
index 8a03b102d..e0ce5f4d2 100644
--- a/cmd/ipfs/Makefile
+++ b/cmd/ipfs/Makefile
@@ -1,16 +1,7 @@
 all: install
-commit = $(shell git rev-parse --short HEAD 2> /dev/null || echo unknown)
-ldflags = "-X "github.com/ipfs/go-ipfs/repo/config".CurrentCommit=$(commit)"
 
-gx:
-	go get -u github.com/whyrusleeping/gx
-	go get -u github.com/whyrusleeping/gx-go
+build:
+	cd ../../ && make build
 
-deps: gx
-	gx --verbose install --global
-
-build: deps
-	go build -ldflags=$(ldflags)
-
-install: build
-	go install
+install:
+	cd ../../ && make install