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
31
redoconf/default.precompile.od
Normal file
31
redoconf/default.precompile.od
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Run the extra steps necessary before compiling
|
||||
# C/C++ programs of the specified type.
|
||||
#
|
||||
# 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
|
||||
cc) pch_files="$PRE_CC_TARGETS" ;;
|
||||
cc-fpic) pch_files="$PRE_CC_TARGETS_FPIC" ;;
|
||||
cxx) pch_files="$PRE_CXX_TARGETS" ;;
|
||||
cxx-fpic) pch_files="$PRE_CXX_TARGETS_FPIC" ;;
|
||||
*) exit 42 ;;
|
||||
esac
|
||||
|
||||
IFS="$NL"
|
||||
set -f
|
||||
redo-ifchange "redoconf.h" $pch_files
|
||||
|
||||
# Subtle:
|
||||
# Don't consider this target to have changed unless
|
||||
# the precompiled header's stamp has changed.
|
||||
# We generate redoconf.h, in case
|
||||
# a C program wants to include it, but we
|
||||
# don't care if it has changed, because the C program
|
||||
# will have its own dependency on that file.
|
||||
for d in $t; do
|
||||
cat "$d.stamp"
|
||||
done | redo-stamp
|
||||
Loading…
Add table
Add a link
Reference in a new issue