summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAnders Damsgaard <anders@adamsgaard.dk>2021-01-06 11:49:43 +0100
committerKatolaZ <katolaz@freaknet.org>2021-01-06 15:45:42 +0000
commitf7457cb90397ac1c6df8c4bc05ebbf2cf4334a68 (patch)
treea831110555df02b518c53fb8fba6061a29109cc9 /Makefile
parent60c249ec24ab865c4a55759c7ffde2da99530b1d (diff)
install/uninstall xml2tsv(1) man page
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1b64931..bbd9fe0 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,8 @@ include config.mk
SRC = xml.c xml2tsv.c
INC = config.h xml.h
OBJ = ${SRC:.c=.o}
-DISTFILES = ${SRC} ${INC} Makefile config.mk
+MAN1 = xml2tsv.1
+DISTFILES = ${SRC} ${INC} Makefile config.mk ${MAN1}
all: options xml2tsv
@@ -35,10 +36,16 @@ install: all
@mkdir -p "${DESTDIR}${BINDIR}"
@cp -f xml2tsv "${DESTDIR}${BINDIR}"
@chmod 755 "${DESTDIR}${BINDIR}/xml2tsv"
+ @echo installing man page to ${DESTDIR}${MANPREFIX}
+ @mkdir -p ${DESTDIR}${MANPREFIX}/man1
+ @cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1
+ @for f in ${MAN1}; do chmod 644 ${DESTDIR}${MANPREFIX}/man1/$$f; done
uninstall:
@echo removing executable file from ${DESTDIR}${BINDIR}
@rm -f "${DESTDIR}${BINDIR}/xml2tsv"
+ @echo removing man pages ${DESTDIR}${MANPREFIX}
+ @for f in ${MAN1}; do rm -f ${DESTDIR}${MANPREFIX}/man1/$$f; done
dist: clean
@echo "making a tarball"