github.com/alde/glide@v0.0.0-20160309204240-d5fc6b676a75/Makefile (about)

     1  VERSION := $(shell git describe --tags)
     2  DIST_DIRS := find * -type d -exec
     3  
     4  build:
     5  	go build -o glide -ldflags "-X main.version=${VERSION}" glide.go
     6  
     7  install: build
     8  	install -d ${DESTDIR}/usr/local/bin/
     9  	install -m 755 ./glide ${DESTDIR}/usr/local/bin/glide
    10  
    11  test:
    12  	go test . ./gb ./path ./action ./tree ./util ./godep ./gpm ./cfg ./dependency ./importer ./msg ./repo
    13  
    14  clean:
    15  	rm -f ./glide.test
    16  	rm -f ./glide
    17  	rm -rf ./dist
    18  
    19  bootstrap:
    20  	mkdir ./vendor
    21  	git clone https://github.com/Masterminds/vcs vendor/github.com/Masterminds/vcs
    22  	git clone https://gopkg.in/yaml.v2 vendor/gopkg.in/yaml.v2
    23  	git clone https://github.com/codegangsta/cli vendor/github.com/codegangsta/cli
    24  	git clone https://github.com/Masterminds/semver vendor/github.com/Masterminds/semver
    25  
    26  bootstrap-dist:
    27  	go get -u github.com/mitchellh/gox
    28  
    29  build-all:
    30  	gox -verbose \
    31  	-ldflags "-X main.version=${VERSION}" \
    32  	-os="linux darwin windows " \
    33  	-arch="amd64 386" \
    34  	-output="dist/{{.OS}}-{{.Arch}}/{{.Dir}}" .
    35  
    36  dist: build-all
    37  	cd dist && \
    38  	$(DIST_DIRS) cp ../LICENSE {} \; && \
    39  	$(DIST_DIRS) cp ../README.md {} \; && \
    40  	$(DIST_DIRS) tar -zcf glide-${VERSION}-{}.tar.gz {} \; && \
    41  	$(DIST_DIRS) zip -r glide-${VERSION}-{}.zip {} \; && \
    42  	cd ..
    43  
    44  
    45  .PHONY: build test install clean bootstrap bootstrap-dist build-all dist