On second thought, makefile turns out to be a poor fit for golang.
This commit is contained in:
parent
3bbffa9325
commit
61fe5208e6
2 changed files with 5 additions and 30 deletions
25
Makefile
25
Makefile
|
@ -1,25 +0,0 @@
|
||||||
DESTDIR=/
|
|
||||||
PREFIX=${HOME}/
|
|
||||||
BINDIR=bin/
|
|
||||||
|
|
||||||
.PHONY: default build test install uninstall clean
|
|
||||||
|
|
||||||
default: build
|
|
||||||
|
|
||||||
build:
|
|
||||||
go build -o build/ ./...
|
|
||||||
|
|
||||||
test:
|
|
||||||
go test ./...
|
|
||||||
|
|
||||||
install:
|
|
||||||
mkdir -p ${DESTDIR}/${PREFIX}/${BINDIR}
|
|
||||||
cp build/evinfo ${DESTDIR}/${PREFIX}/${BINDIR}/
|
|
||||||
cp build/joyful ${DESTDIR}/${PREFIX}/${BINDIR}/
|
|
||||||
|
|
||||||
uninstall:
|
|
||||||
rm ${DESTDIR}/${PREFIX}/${BINDIR}/evinfo
|
|
||||||
rm ${DESTDIR}/${PREFIX}/${BINDIR}/joyful
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -rf build/
|
|
10
readme.md
10
readme.md
|
@ -67,15 +67,15 @@ cd joyful
|
||||||
Then, to build and install, run:
|
Then, to build and install, run:
|
||||||
|
|
||||||
```
|
```
|
||||||
make
|
go build -o build/ ./...
|
||||||
make install
|
cp build/* ~/bin/
|
||||||
```
|
```
|
||||||
|
|
||||||
By default this will install into `~/bin`. If you want to install Joyful system-wide, you can instead do:
|
If you want to install Joyful system-wide, you can instead do:
|
||||||
|
|
||||||
```
|
```
|
||||||
make
|
go build -o build/ ./...
|
||||||
sudo make PREFIX=/usr/local install
|
sudo cp build/* /usr/local/bin/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue