Experimental new redoconf C/C++ build/autoconfiguration system.
To test it out, try this: ./do -j10 build cd docs/cookbook/c redo -j10 test It should detect all the compilers on your system and make three separate builds for each one: normal, debug, and optimized. Then it tries to run a test program under each one. If there are windows cross compilers and you also have 'wine' installed, it'll try running the test program under wine as well. redoconf currently has no documentation other than the example program. We'll fix that later.
This commit is contained in:
parent
5db883ac58
commit
6dae51f4d2
67 changed files with 1777 additions and 1 deletions
51
redoconf/_all.rc.od
Normal file
51
redoconf/_all.rc.od
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
. ./redoconf.rc
|
||||
|
||||
# replace the placeholder for this function with
|
||||
# one that will save help messages for later.
|
||||
HELP="configure.help.new"
|
||||
rm -f "$HELP"
|
||||
echo '# Automatically generated by redoconf/_all.rc.od - do not edit' >"$HELP"
|
||||
helpmsg() {
|
||||
printf '%-11s %s\n' "$1" "$2" >>"$HELP"
|
||||
rc_hook "$1"
|
||||
}
|
||||
|
||||
# Remember initial set of keys provided by ./configure
|
||||
orig_keys=""
|
||||
rc_hook() {
|
||||
contains_line "$orig_keys" "$1" || orig_keys="$orig_keys$NL$1"
|
||||
}
|
||||
|
||||
# Include the rest of the necessary .rc files
|
||||
keys=""
|
||||
rc_hook() {
|
||||
contains_line "$new_keys" "$1" || new_keys="$new_keys$NL$1"
|
||||
}
|
||||
allrc=
|
||||
if [ -e "$S/all.rc.od" ]; then
|
||||
allrc=all.rc
|
||||
else
|
||||
allrc=
|
||||
redo-ifcreate "$S/all.rc.od"
|
||||
fi
|
||||
rc_include rc/_init.rc rc/CC.rc rc/zdefs.rc $allrc
|
||||
|
||||
rc_helpmsg PREFIX "Change installation prefix (usually /usr/local)"
|
||||
|
||||
IFS="$NL"
|
||||
unused=
|
||||
for d in $orig_keys; do
|
||||
if ! contains_line "$new_keys" "$d"; then
|
||||
unused=1
|
||||
xecho "Error: '$d' was given to ./configure but not used." >&2
|
||||
fi
|
||||
done
|
||||
[ -z "$unused" ] || exit 1
|
||||
|
||||
rc_save
|
||||
|
||||
# Now that all the rc files have run, update $S/configure.help with the
|
||||
# newly-generated help text, so it's available to new users.
|
||||
# Even if multiple output dirs are building at once, this replaces the
|
||||
# file atomically, so it should be safe.
|
||||
mv "$HELP" "$S/configure.help"
|
||||
Loading…
Add table
Add a link
Reference in a new issue