>> make install recipes

> fix title in man page
This commit is contained in:
Thomas Lindop 2025-05-28 12:27:19 +01:00
parent 18f16bae58
commit b20e1286d6
2 changed files with 15 additions and 2 deletions

View file

@ -1,5 +1,11 @@
SOURCES=*.go SOURCES=*.go
LINKER_FLAGS=-X main.OwlVersion=`git describe --tags --dirty` LINKER_FLAGS=-X main.OwlVersion=`git describe --tags --dirty`
ifeq (${XDG_DATA_HOME},)
XDG_DATA_HOME=${HOME}/.local/share
endif
MAN_DIR=${XDG_DATA_HOME}/man/man1
BIN_DIR=${HOME}/.local/bin
owl: ${SOURCES} owl: ${SOURCES}
go build -o owl -ldflags "${LINKER_FLAGS}" -- ${SOURCES} go build -o owl -ldflags "${LINKER_FLAGS}" -- ${SOURCES}
owl.1: man.md owl.1: man.md
@ -7,4 +13,11 @@ owl.1: man.md
build: owl owl.1 build: owl owl.1
test: *.go test: *.go
go test -v . go test -v .
.PHONY: build test install: build
install -m 0777 owl ${BIN_DIR}
mkdir -p ${MAN_DIR}
install owl.1 ${MAN_DIR}
uninstall:
rm -I ${BIN_DIR}/owl ${MAN_DIR}/owl.1
.PHONY: build test install uninstall

2
man.md
View file

@ -1,4 +1,4 @@
# owl(1) # OWL(1)
*The moon is bright. The owls are ready for the hunt.* *The moon is bright. The owls are ready for the hunt.*