-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
42 lines (32 loc) · 929 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Makefile for csvtable
#
# (c) 2024 Wolfgang Friebel
VERSION=$(shell grep "VERSION=" csvtable | sed 's/.*=//;s/;//')
.PHONY: help clean install
PREFIX ?= $(DESTDIR)/usr/local
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/man/man1
help:
@echo Usage:
@echo "make install - install binaries into the official directories"
@echo "make uninstall - uninstall binaries from the official directories"
@echo "make help - prints this help"
@echo "make dist - makes a distribution tarball"
@echo "make test - shows test output
@echo
test: csvtable
./csvtable test/num.csv
./csvtable test/utf8.csv
install:
install -m 755 -d $(BINDIR) $(MANDIR)
install -m 755 csvtable $(BINDIR)
install -m 644 csvtable.1 $(MANDIR)
uninstall:
rm $(BINDIR)/csvtable
rm $(MANDIR)/csvtable.1
clean:
rm -f *.tar.gz
dist: clean
@git archive --format=tar.gz --prefix=csvtable-$(VERSION)/ \
-o csvtable-$(VERSION).tar.gz HEAD
@echo "Done."