poe

Уређивач .po фајлова
git clone https://git.sr.ht/~strahinja/poe
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување ceb551430a5cb662660aba007976106347d3509b
родитељ fae7b07a27ca40ad79c9095cc5b8a1f4916f0e54
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Fri, 29 Sep 2023 20:14:13 +0200

Change build scripts to make .gz optional; OpenBSD build and instructions

Signed-off-by: Страхиња Радић <contact@strahinja.org>

Diffstat:
MINSTALL | 21++++++++++++++++++++-
Mall.do | 3++-
Mclean.do | 3++-
Mconfig.redo | 17+++++++++++++++++
Minstall.do | 17++++++++++-------
Muninstall.do | 14+++++++++-----
измењених датотека: 6, додавања: 60(+), брисања: 15(-)

diff --git a/INSTALL b/INSTALL @@ -2,7 +2,12 @@ Prerequisites ============= * C compiler - defaults in config.redo -* gzip + + +Optional +-------- + +* gzip (autodetected, for manpage compression) Install @@ -27,3 +32,17 @@ Persistent build configuration file The file config.redo will be sourced when building targets which also accept configuration through environment variables. For example, CC and PREFIX are specified in config.redo. + + +OpenBSD +------- + +Replace gcc in CC with cc and add -D_BSD_SOURCE, eg: + + # CC='cc -g -Wall -pedantic -std=c99 -D_POSIX_C_SOURCE=200809L + -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_DEFAULT_SOURCE}' \ + ./do install + +and change MANDIR to + + MANDIR=$PREFIX/man/man1 diff --git a/all.do b/all.do @@ -1 +1,2 @@ -redo-ifchange poe poe.1.gz +. ./config.redo +redo-ifchange poe poe.1"$MANSUFFIX" diff --git a/clean.do b/clean.do @@ -1 +1,2 @@ -rm -f *~ *.o poe poe.1.gz poe.1 version date version.h _config.h +. ./config.redo +rm -f *~ *.o poe poe.1"$MANSUFFIX" poe.1 version.h version date _config.h diff --git a/config.redo b/config.redo @@ -1,4 +1,21 @@ PREFIX=${PREFIX:-/usr/local} + +BINDIR=$PREFIX/bin +DOCDIR=$PREFIX/share/doc/poe +MANDIR=$PREFIX/share/man/man1 + +# OpenBSD +#MANDIR=$PREFIX/man/man1 + +PROGS=poe +DOCS="README LICENSE" +MANSUFFIX=${MANSUFFIX-$(command -v gzip >/dev/null && printf ".gz")} +MANPAGES="poe.1${MANSUFFIX}" + CC=${CC:-gcc -g -Wall -pedantic -std=c99 -D_POSIX_C_SOURCE=200809L \ -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE} STRIP=${STRIP:-:} + +# OpenBSD +#CC=${CC:-cc -g -Wall -pedantic -std=c99 -D_POSIX_C_SOURCE=200809L \ +#-D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_DEFAULT_SOURCE} diff --git a/install.do b/install.do @@ -1,9 +1,12 @@ redo-ifchange all . ./config.redo -BINDIR=$PREFIX/bin -#DOCDIR=$PREFIX/share/doc/poe -MANDIR=$PREFIX/share/man/man1 -#install -d $DOCDIR -install -d $BINDIR $MANDIR -install -m 0755 poe $BINDIR -install -m 0644 poe.1.gz $MANDIR +install -d "$DOCDIR" "$BINDIR" "$MANDIR" +for docfile in $DOCS; do + install -Dm 0644 "${docfile}" "${DOCDIR}/${docfile}" +done +for binfile in $PROGS; do + install -Dm 0755 "${binfile}" "${BINDIR}/${binfile}" +done +for manfile in $MANPAGES; do + install -Dm 0644 "${manfile}" "${MANDIR}/${manfile}" +done diff --git a/uninstall.do b/uninstall.do @@ -1,6 +1,10 @@ -redo-always . ./config.redo -BINDIR=$PREFIX/bin -#DOCDIR=$PREFIX/share/doc/poe -MANDIR=$PREFIX/share/man/man1 -rm -f $BINDIR/poe $MANDIR/poe.1.gz +for docfile in README LICENSE; do + rm -f "${DOCDIR}/${docfile}" +done +for binfile in $PROGS; do + rm -f "${BINDIR}/${binfile}" +done +for manfile in $MANPAGES; do + rm -f "${MANDIR}/${manfile}" +done