commit 424d9a592e4dc5b6a8bf3b1cb5ac0034de42c6fc parent 9cfc795ae78f82e9be70d963ab937fe4fc21faf3 Auteur: Selve <selve@asteride.xyz> Date: Sun, 21 Jan 2024 16:04:09 -0500 installation des pages du manuel par la Makefile Diffstat:
M | Makefile | | | 24 | +++++++++++++++++------- |
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile @@ -1,7 +1,9 @@ PREFIX = /usr/local/bin +MAN_DOS = /usr/local/man I18N_DOS = /usr/local/share/locale DOS_PO = po +DOS_MAN = man CC = cc COPT_SPCL = -O2 -DNDEBUG @@ -35,24 +37,32 @@ maj_trad: msgmerge -qo "$$F" "$$F" "${DOS_PO}/modele.pot" ; \ done -install: all +inst_aplat: mkdir -p "${PREFIX}" install -m 755 aplat "${PREFIX}"/aplat + +inst_trad: for F in ${FCH_MO} ; \ do \ LANGUE="$$(echo "$$F" | sed 's|.*/\(.*\)\..*|\1|')" ; \ mkdir -p "${I18N_DOS}/$$LANGUE/LC_MESSAGES" ; \ - install -m 755 $$F \ + cp $$F \ "${I18N_DOS}/$$LANGUE/LC_MESSAGES/aplat.mo" ; \ done +inst_man: + mkdir -p ${MAN_DOS}/fr/man1 + cp "${DOS_MAN}/fr/aplat.1" "${MAN_DOS}/fr/man1" + mkdir -p ${MAN_DOS}/fr/man5 + cp "${DOS_MAN}/fr/aplat.5" "${MAN_DOS}/fr/man5 + cp "${DOS_MAN}/fr/plat.5" "${MAN_DOS}/fr/man5 + +install: all inst_aplat inst_trad inst_man + uninstall: rm -f ${PREFIX}/aplat - for F in ${FCH_MO} ; \ - do \ - LANGUE="$$(echo "$$F" | sed 's|.*/\(.*\)\..*|\1|')" ; \ - rm -f "${I18N_DOS}/$$LANGUE/LC_MESSAGES/aplat.mo" ; \ - done + find "${I18N_DOS}" -type f -name 'aplat.mo' | xargs rm -f + find "${MAN_DOS}" -type f -name 'a?plat.[123456789]' | xargs rm -f clean: rm -f aplat *.o *.core po/*.mo