Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

Commit

Permalink
leave build dir until clean
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishvananda Ishaya Abrams committed Jul 24, 2017
1 parent 12aef95 commit 5e57a3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build
smith
rpm
.idea/
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ id = $(shell head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')
# if it is cloned outside of the gopath. Go's vendor support only works if
# the project is inside the gopath
$(NAME): $(call gofiles,$(DIRS))
rm -rf build
mkdir -p build/src/$(REMOTE)
rm -f build/src/$(REMOTE)/$(NAME) && ln -s ../../../../ build/src/$(REMOTE)/$(NAME)
cd build/src/$(REMOTE)/$(NAME) && CGO_ENABLED=0 GOPATH=$(CURDIR)/build \
GO15VENDOREXPERIMENT=1 go build -a -x -v \
-ldflags '-X "main.ver=$(VERSION)" -X "main.sha=$(sha)" -B 0x$(id)' \
-o $(NAME) . || ( rm -rf build && false )
rm -rf build
-o $(NAME) .

.PHONY: $(call testdirs,$(DIRS))
$(call testdirs,$(DIRS)):
Expand All @@ -51,6 +51,7 @@ test: fmt $(call testdirs,$(DIRS))

clean:
rm -f $(NAME)
rm -rf build
rm -rf rpm

install: all
Expand Down

0 comments on commit 5e57a3d

Please sign in to comment.