Skip to content
Snippets Groups Projects
Commit de4e34d2 authored by Thomas Gardner's avatar Thomas Gardner
Browse files

Makefile: add PHONY targets and a help message


License: MIT
Signed-off-by: default avatarThomas Gardner <tmg@fastmail.com>
parent 081c6d92
Branches
No related tags found
1 merge request!1New
ifeq ($(TEST_NO_FUSE),1)
go_test=go test -tags nofuse
go_test=go test -tags nofuse
else
go_test=go test
go_test=go test
endif
commit = `git rev-parse --short HEAD`
ldflags = "-X "github.com/ipfs/go-ipfs/repo/config".CurrentCommit=$(commit)"
COMMIT := $(shell git rev-parse --short HEAD)
ldflags = "-X "github.com/ipfs/go-ipfs/repo/config".CurrentCommit=$(COMMIT)"
MAKEFLAGS += --no-print-directory
all:
# no-op. try:
# make install
# make test
all: help
godep:
go get github.com/tools/godep
......@@ -31,6 +29,14 @@ build:
nofuse:
cd cmd/ipfs && go install -tags nofuse -ldflags=$(ldflags)
clean:
cd cmd/ipfs && go clean -ldflags=$(ldflags)
uninstall:
cd cmd/ipfs && go clean -i -ldflags=$(ldflags)
PHONY += all help godep install build nofuse clean uninstall
##############################################################
# tests targets
......@@ -76,3 +82,46 @@ test_all_commits_travis:
windows_build_check:
GOOS=windows GOARCH=amd64 go build -o .test.ipfs.exe ./cmd/ipfs
rm .test.ipfs.exe
PHONY += test test_short test_expensive
##############################################################
# A semi-helpful help message
help:
@echo 'DEPENDENCY TARGETS:'
@echo ''
@echo ' vendor - Create a Godep workspace of 3rd party dependencies'
@echo ''
@echo 'BUILD TARGETS:'
@echo ''
@echo ' all - print this help message'
@echo ' build - Build binary at ./cmd/ipfs/ipfs'
@echo ' nofuse - Build binary with no fuse support'
@echo ' install - Build binary and install into $$GOPATH/bin'
# @echo ' dist_install - TODO: c.f. ./cmd/ipfs/dist/README.md'
@echo ''
@echo 'CLEANING TARGETS:'
@echo ''
@echo ' clean - Remove binary from build directory'
@echo ' uninstall - Remove binary from $$GOPATH/bin'
@echo ''
@echo 'TESTING TARGETS:'
@echo ''
@echo ' test - Run expensive tests and Window$$ check'
@echo ' test_short - Run short tests and sharness tests'
@echo ' test_expensive - Run a few extras'
@echo ' test_3node'
@echo ' test_go_short'
@echo ' test_go_expensive'
@echo ' test_go_race'
@echo ' test_sharness_short'
@echo ' test_sharness_expensive'
@echo ' test_all_commits'
@echo " test_all_commits_travis - DON'T USE: takes way too long"
@echo ' windows_build_check'
@echo ''
PHONY += help
.PHONY: $(PHONY)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment