чување 571241c3b5f4b41fe75ca86718e619d65aed70b0
родитељ 1c523d1245087a32d62ed63a1cdc47fdfd9d4481
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Mon, 2 Oct 2023 20:12:51 +0200
Migrate from using MANDIR to MANPREFIX
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 5, додавања: 10(+), брисања: 10(-)
diff --git a/INSTALL b/INSTALL
@@ -43,6 +43,6 @@ Replace gcc in CC with cc and add -D_BSD_SOURCE, eg:
-D_XOPEN_SOURCE=700 -D_BSD_SOURCE}' \
./do install
-and change MANDIR to
+and change MANPREFIX to
- MANDIR=$PREFIX/man/man1
+ MANPREFIX=$PREFIX/man
diff --git a/config.redo b/config.redo
@@ -2,10 +2,10 @@ PREFIX=${PREFIX:-/usr/local}
BINDIR=$PREFIX/bin
DOCDIR=$PREFIX/share/doc/table
-MANDIR=$PREFIX/share/man/man1
+MANPREFIX=$PREFIX/share/man
# OpenBSD
-#MANDIR=$PREFIX/man/man1
+#MANPREFIX=$PREFIX/man
PROGS="table"
DOCS="README LICENSE $(find examples -type f -print)"
diff --git a/default.o.do b/default.o.do
@@ -1,5 +1,5 @@
-sed -n 's/^#include "\([^"]*\)"/\1/p' ${2%.o}.c | \
+sed -n 's/^#include "\([^"]*\)"/\1/p' ${2%.o}.c |
xargs redo-ifchange
redo-ifchange $2.c
. ./config.redo
-${CC} -o $3 -c $2.c
+${CC} -c $2.c -o $3
diff --git a/install.do b/install.do
@@ -1,6 +1,6 @@
redo-ifchange all
. ./config.redo
-install -d "$DOCDIR" "$BINDIR" "$MANDIR"
+install -d "$DOCDIR" "$BINDIR" "${MANPREFIX}/man1"
for docfile in $DOCS; do
install -Dm 0644 "${docfile}" "${DOCDIR}/${docfile}"
done
@@ -11,8 +11,8 @@ for synonym in tablep tsvtable; do
ln -sf table "${BINDIR}/${synonym}"
done
for manfile in $MANPAGES; do
- install -Dm 0644 "${manfile}" "${MANDIR}/${manfile}"
+ install -Dm 0644 "${manfile}" "${MANPREFIX}/man1/${manfile}"
done
for synonym in tablep tsvtable; do
- ln -sf table.1"$MANSUFFIX" "${MANDIR}/${synonym}.1${MANSUFFIX}"
+ ln -sf table.1"$MANSUFFIX" "${MANPREFIX}/man1/${synonym}.1${MANSUFFIX}"
done
diff --git a/uninstall.do b/uninstall.do
@@ -6,7 +6,7 @@ for binfile in $PROGS; do
rm -f "${BINDIR}/${binfile}"
done
for manfile in $MANPAGES; do
- rm -f "${MANDIR}/${manfile}"
+ rm -f "${MANPREFIX}/man1/${manfile}"
done
for synonym in tablep tsvtable; do
rm -f "${MANDIR}/${synonym}.1${MANSUFFIX}" "${BINDIR}/${synonym}"