mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-10 05:52:20 +08:00
Merge pull request #2593 from kevina/refactor-makefile
Refactor Makefile.
This commit is contained in:
15
Makefile
15
Makefile
@ -5,11 +5,6 @@ else
|
|||||||
go_test=go test
|
go_test=go test
|
||||||
endif
|
endif
|
||||||
|
|
||||||
COMMIT := $(shell git rev-parse --short HEAD)
|
|
||||||
ldflags = "-X "github.com/ipfs/go-ipfs/repo/config".CurrentCommit=$(COMMIT)"
|
|
||||||
MAKEFLAGS += --no-print-directory
|
|
||||||
|
|
||||||
|
|
||||||
export IPFS_API ?= v04x.ipfs.io
|
export IPFS_API ?= v04x.ipfs.io
|
||||||
|
|
||||||
all: help
|
all: help
|
||||||
@ -45,19 +40,19 @@ vendor: godep
|
|||||||
godep save -r ./...
|
godep save -r ./...
|
||||||
|
|
||||||
install: deps
|
install: deps
|
||||||
cd cmd/ipfs && go install -ldflags=$(ldflags)
|
make -C cmd/ipfs install
|
||||||
|
|
||||||
build: deps
|
build: deps
|
||||||
cd cmd/ipfs && go build -i -ldflags=$(ldflags)
|
make -C cmd/ipfs build
|
||||||
|
|
||||||
nofuse: deps
|
nofuse: deps
|
||||||
cd cmd/ipfs && go install -tags nofuse -ldflags=$(ldflags)
|
make -C cmd/ipfs nofuse
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
cd cmd/ipfs && go clean -ldflags=$(ldflags)
|
make -C cmd/ipfs clean
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
cd cmd/ipfs && go clean -i -ldflags=$(ldflags)
|
make -C cmd/ipfs uninstall
|
||||||
|
|
||||||
PHONY += all help godep toolkit_upgrade gx_upgrade gxgo_upgrade gx_check
|
PHONY += all help godep toolkit_upgrade gx_upgrade gxgo_upgrade gx_check
|
||||||
PHONY += go_check deps vendor install build nofuse clean uninstall
|
PHONY += go_check deps vendor install build nofuse clean uninstall
|
||||||
|
@ -1,7 +1,19 @@
|
|||||||
|
COMMIT := $(shell git rev-parse --short HEAD)
|
||||||
|
ldflags = "-X "github.com/ipfs/go-ipfs/repo/config".CurrentCommit=$(COMMIT)"
|
||||||
|
|
||||||
all: install
|
all: install
|
||||||
|
|
||||||
build:
|
|
||||||
cd ../../ && make build
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
cd ../../ && make install
|
go install -ldflags=$(ldflags)
|
||||||
|
|
||||||
|
build:
|
||||||
|
go build -i -ldflags=$(ldflags)
|
||||||
|
|
||||||
|
nofuse:
|
||||||
|
go install -tags nofuse -ldflags=$(ldflags)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
go clean -ldflags=$(ldflags)
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
go clean -i -ldflags=$(ldflags)
|
||||||
|
Reference in New Issue
Block a user