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.
18 lines
314 B
Text
18 lines
314 B
Text
. ./redoconf.rc
|
|
rc_include rc/CC.rc
|
|
|
|
base="${1#*/}"
|
|
lib="${base%.autolib.rc}"
|
|
LIB=$(echo "$lib" | tr 'a-z.' 'A-Z_')
|
|
|
|
x="-l$lib"
|
|
rc_appendln "LIB$LIB" "$x"
|
|
appendln LIBS "$x"
|
|
if rc_compile cc link ""; then
|
|
rc_replaceln "HAVE_$LIB" 1
|
|
else
|
|
rc_undo
|
|
rc_replaceln "HAVE_$LIB" ""
|
|
rc_replaceln "LIB$LIB" ""
|
|
fi
|
|
rc_save
|