redoconf: a stub rc_include() now sources ./redoconf.rc automatically.

This lets us remove the awkward ". ./redoconf.rc" line from zillions
of .od scripts, without paying the price of *always* including that
whole file every time default.do.sh is used.
This commit is contained in:
Avery Pennarun 2019-03-02 04:23:05 -05:00
commit 1a3c11f220
34 changed files with 5 additions and 34 deletions

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include _all.rc
redo-ifchange _compile

View file

@ -14,6 +14,11 @@ die() {
exit 99
}
rc_include() {
. ./redoconf.rc || exit 1 # redefines rc_include
rc_include "$@"
}
_mkdir_of() {
local dir="${1%/*}"
[ "$dir" = "$1" ] ||

View file

@ -4,7 +4,6 @@
# Notably, we have to precompile any precompiled
# headers. We also generate redoconf.h in case
# programs want to include it.
. ./redoconf.rc
rc_include _all.rc
case ${1%.precompile} in

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include _all.rc
# Tricky quoting: see _compile.od for details.

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include _all.rc
# Tricky quoting: see _compile.od for details.

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include
rc_helpmsg ARCH "Architecture prefix for output (eg. i686-w64-mingw32-)"

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc
rc_helpmsg CXX "C++ compiler name (c++)"

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc
rc_appendln CPPFLAGS "-Wall"

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc
rc_appendln CPPFLAGS "-Wextra"

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc
base="${1#*/}"

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc
base="${1#rc/}"

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc
base="${1#*/}"

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CXX.rc
base="${1#rc/}"

View file

@ -1,5 +1,3 @@
. ./redoconf.rc
base=${1%.required.rc}
name=${base#*/}
NAME=$(echo "$name" | tr 'a-z.' 'A-Z_')

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc rc/pkg-config.rc
prog='

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc rc/pkg-config.rc
prog='

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc rc/pkg-config.rc
prog='

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc rc/pkg-config.rc
prog='

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CXX.rc rc/pkg-config.rc
prog='

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc rc/pkg-config.rc
prog='

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc rc/pkg-config.rc
prog="

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc rc/pkg-config.rc
prog='

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include
for d in "$PKG_CONFIG" pkg-config; do

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc rc/windows.h.rc
consider() {

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc
prog='

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/CC.rc
x="-Wl,-z,defs"

View file

@ -1,4 +1,3 @@
. ./redoconf.rc
rc_include rc/run.rc
if [ -n "$CAN_RUN" ]; then