poe

Уређивач .po фајлова
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување c969e73bd4760f7e9389520c9c7724fde804b694
родитељ 51e447f7217fc1c52cf6fd43e13e17a84944fdcd
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Sun,  9 Apr 2023 14:03:59 +0200

Add config.redo, a persistent build configuration file

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

Diffstat:
M.gitignore | 1+
MINSTALL | 10++++++++++
Mdefault.o.do | 3+++
Minstall.do | 3+++
Mpoe.do | 3+++
Muninstall.do | 3+++
измењених датотека: 6, додавања: 23(+), брисања: 0(-)

diff --git a/.gitignore b/.gitignore @@ -18,6 +18,7 @@ nohup.out *.pdf *.1 *.pkg.tar.zst +config.redo src PKGBUILD _config.h diff --git a/INSTALL b/INSTALL @@ -4,6 +4,7 @@ Prerequisites * C compiler (GCC-compatible) - ${POE_CC:-gcc -g} * gzip + Install ------- @@ -18,3 +19,12 @@ If you have djb redo: if you don't: # ./do install + + +Persistent build configuration file +----------------------------------- + +If a file config.redo exists in the build directory, it will be sourced when +building targets which also accept configuration through environment variables. +For example, POE_CC and PREFIX can be specified in config.redo, eliminating the +need to pass them with each build. diff --git a/default.o.do b/default.o.do @@ -1,4 +1,7 @@ sed -n '/^#include "/s/^#include "\([^"]*\)"/\1/p' ${2%.o}.c | \ xargs redo-ifchange redo-ifchange $2.c +if [ -r config.redo ]; then + . config.redo +fi ${POE_CC:-gcc -g} -Wall -std=c99 -c $2.c -o $3 diff --git a/install.do b/install.do @@ -1,4 +1,7 @@ redo-ifchange all +if [ -r config.redo ]; then + . config.redo +fi PREFIX=${PREFIX:-/usr/local} BINDIR=$PREFIX/bin #DOCDIR=$PREFIX/share/doc/poe diff --git a/poe.do b/poe.do @@ -1,2 +1,5 @@ redo-ifchange po.o poe.o draw.o util.o +if [ -r config.redo ]; then + . config.redo +fi ${POE_CC:-gcc -g} -Wall -std=c99 -o $3 po.o poe.o draw.o util.o >/dev/null diff --git a/uninstall.do b/uninstall.do @@ -1,4 +1,7 @@ redo-always +if [ -r config.redo ]; then + . config.redo +fi PREFIX=${PREFIX:-/usr/local} BINDIR=$PREFIX/bin #DOCDIR=$PREFIX/share/doc/poe