aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2023-07-22 21:30:53 -0230
committerSam Anthony <sam@samanthony.xyz>2023-07-22 21:30:53 -0230
commit4e17a27eb8d36868bcf7e1edf32affd84412a1f4 (patch)
tree2411be41f24f4ba697577147df14efebf2c11f9b /Makefile
parenteb3dd36c4229241aad610b8ed812cc12d8f87c2b (diff)
downloadpfc-4e17a27eb8d36868bcf7e1edf32affd84412a1f4.zip
init go module
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 7 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index c6695e2..dd45c4c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,29 +1,21 @@
include config.mk
build:
- cargo fmt --all
- cargo test
- cargo build
-
-run: build
- target/debug/pfc
-
-doc:
- cargo doc --open
+ go mod tidy
+ gofmt -l -s -w ./**/*.go
clean:
- rm -r target
+ rm -f pfc
-install:
- cargo build --release
- cp target/release/pfc ${DESTDIR}${PREFIX}/bin
+install: build
+ cp pfc ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/pfc
mkdir -p ${DESTDIR}${MANPREFIX}/man1
sed "s/VERSION/${VERSION}/g" < pfc.1 > ${DESTDIR}${MANPREFIX}/man1/pfc.1
chmod 644 ${DESTDIR}${MANPREFIX}/man1/pfc.1
uninstall:
- rm -f ${DESTDIR}${PREFIX}/bin/pfc\
+ rm -f ${DESTDIR}${PREFIX}/bin/pfc \
${DESTDIR}${MANPREFIX}/man1/pfc.1
-.PHONY: build run doc clean install uninstall
+.PHONY: build install uninstall