Fix Makefile and install script for the new project layout
This commit is contained in:
parent
83e9af6601
commit
34f16e5b7d
20
Makefile
20
Makefile
@ -92,16 +92,16 @@ release-all: clean test
|
|||||||
|
|
||||||
$(SRC_LINK):
|
$(SRC_LINK):
|
||||||
mkdir -p $(shell dirname $(SRC_LINK))
|
mkdir -p $(shell dirname $(SRC_LINK))
|
||||||
ln -s $(ROOT_DIR)/src $(SRC_LINK)
|
ln -sf $(ROOT_DIR)/src $(SRC_LINK)
|
||||||
|
|
||||||
$(VENDOR_LINK):
|
$(VENDOR_LINK):
|
||||||
mkdir -p $(shell dirname $(VENDOR_LINK))
|
mkdir -p $(shell dirname $(VENDOR_LINK))
|
||||||
ln -s $(ROOT_DIR)/vendor $(VENDOR_LINK)
|
ln -sf $(ROOT_DIR)/vendor $(VENDOR_LINK)
|
||||||
|
|
||||||
$(GLIDE_LOCK): $(GLIDE_YAML)
|
vendor: $(GLIDE_YAML)
|
||||||
go get -u github.com/Masterminds/glide && $(GOPATH)/bin/glide install && touch $@
|
go get -u github.com/Masterminds/glide && $(GOPATH)/bin/glide install && touch $@
|
||||||
|
|
||||||
test: $(SOURCES)
|
test: $(SOURCES) vendor
|
||||||
SHELL=/bin/sh GOOS= go test -v -tags "$(TAGS)" \
|
SHELL=/bin/sh GOOS= go test -v -tags "$(TAGS)" \
|
||||||
github.com/junegunn/fzf/src \
|
github.com/junegunn/fzf/src \
|
||||||
github.com/junegunn/fzf/src/algo \
|
github.com/junegunn/fzf/src/algo \
|
||||||
@ -113,23 +113,23 @@ install: bin/fzf
|
|||||||
clean:
|
clean:
|
||||||
rm -rf target
|
rm -rf target
|
||||||
|
|
||||||
target/$(BINARY32): $(SOURCES)
|
target/$(BINARY32): $(SOURCES) vendor
|
||||||
GOARCH=386 go build $(BUILD_FLAGS) -o $@
|
GOARCH=386 go build $(BUILD_FLAGS) -o $@
|
||||||
|
|
||||||
target/$(BINARY64): $(SOURCES)
|
target/$(BINARY64): $(SOURCES) vendor
|
||||||
GOARCH=amd64 go build $(BUILD_FLAGS) -o $@
|
GOARCH=amd64 go build $(BUILD_FLAGS) -o $@
|
||||||
|
|
||||||
# https://github.com/golang/go/wiki/GoArm
|
# https://github.com/golang/go/wiki/GoArm
|
||||||
target/$(BINARYARM5): $(SOURCES)
|
target/$(BINARYARM5): $(SOURCES) vendor
|
||||||
GOARCH=arm GOARM=5 go build $(BUILD_FLAGS) -o $@
|
GOARCH=arm GOARM=5 go build $(BUILD_FLAGS) -o $@
|
||||||
|
|
||||||
target/$(BINARYARM6): $(SOURCES)
|
target/$(BINARYARM6): $(SOURCES) vendor
|
||||||
GOARCH=arm GOARM=6 go build $(BUILD_FLAGS) -o $@
|
GOARCH=arm GOARM=6 go build $(BUILD_FLAGS) -o $@
|
||||||
|
|
||||||
target/$(BINARYARM7): $(SOURCES)
|
target/$(BINARYARM7): $(SOURCES) vendor
|
||||||
GOARCH=arm GOARM=7 go build $(BUILD_FLAGS) -o $@
|
GOARCH=arm GOARM=7 go build $(BUILD_FLAGS) -o $@
|
||||||
|
|
||||||
target/$(BINARYARM8): $(SOURCES)
|
target/$(BINARYARM8): $(SOURCES) vendor
|
||||||
GOARCH=arm64 go build $(BUILD_FLAGS) -o $@
|
GOARCH=arm64 go build $(BUILD_FLAGS) -o $@
|
||||||
|
|
||||||
bin/fzf: target/$(BINARY) | bin
|
bin/fzf: target/$(BINARY) | bin
|
||||||
|
4
install
4
install
@ -169,12 +169,12 @@ if [ -n "$binary_error" ]; then
|
|||||||
echo " - $binary_error !!!"
|
echo " - $binary_error !!!"
|
||||||
fi
|
fi
|
||||||
if command -v go > /dev/null; then
|
if command -v go > /dev/null; then
|
||||||
echo -n "Building binary (go get -u github.com/junegunn/fzf/src/fzf) ... "
|
echo -n "Building binary (go get -u github.com/junegunn/fzf) ... "
|
||||||
if [ -z "${GOPATH-}" ]; then
|
if [ -z "${GOPATH-}" ]; then
|
||||||
export GOPATH="${TMPDIR:-/tmp}/fzf-gopath"
|
export GOPATH="${TMPDIR:-/tmp}/fzf-gopath"
|
||||||
mkdir -p "$GOPATH"
|
mkdir -p "$GOPATH"
|
||||||
fi
|
fi
|
||||||
if go get -u github.com/junegunn/fzf/src/fzf; then
|
if go get -u github.com/junegunn/fzf; then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
cp "$GOPATH/bin/fzf" "$fzf_base/bin/"
|
cp "$GOPATH/bin/fzf" "$fzf_base/bin/"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user