Skip to content

Commit

Permalink
Add install target in Makefile, move old behavior to go-install
Browse files Browse the repository at this point in the history
  • Loading branch information
iofq authored and Wondertan committed Jul 5, 2022
1 parent 2685070 commit d8d80fb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
SHELL=/usr/bin/env bash
PROJECTNAME=$(shell basename "$(PWD)")
LDFLAGS="-X 'main.buildTime=$(shell date)' -X 'main.lastCommit=$(shell git rev-parse HEAD)' -X 'main.semanticVersion=$(shell git describe --tags --dirty=-dev)'"
ifeq (${PREFIX},)
PREFIX := /usr/local
endif

## help: Get more info on make commands.
help: Makefile
Expand All @@ -19,12 +22,18 @@ clean:
@echo "--> Cleaning up ./build"
@rm -rf build/*

## install: Build and install the celestia-node binary into the GOBIN directory.
install:
## install: Build and install the celestia-node binary into the $PREFIX (/usr/local/ by default) directory.
install: build
@echo "--> Installing Celestia"
@go install -ldflags ${LDFLAGS} ./cmd/celestia
@install -v ./build/* -t ${PREFIX}/bin/
.PHONY: install

## go-install: Build and install the celestia-node binary into the GOBIN directory.
go-install:
@echo "--> Installing Celestia"
@go install -ldflags ${LDFLAGS} ./cmd/celestia
.PHONY: go-install

## shed: Build cel-shed binary.
cel-shed:
@echo "--> Building cel-shed"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ See the official docs page for system requirements per node type:
```sh
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node
make install
make build
sudo make install
```

For more information on setting up a node and the hardware requirements needed, go visit our docs at <https://docs.celestia.org>.
Expand Down

0 comments on commit d8d80fb

Please sign in to comment.