Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (24 sloc) 518 Bytes
redo-ifchange config.od $OUT/include/wvautoconf.h
. ./config.od
cat >$3 <<EOF
if [ -e "\$2.cc" ]; then
cc="$CXX"
cflags="$CPPFLAGS $CXXFLAGS"
src="\$2.cc"
elif [ -e "\$2.c" ]; then
cc="$CC"
cflags="$CPPFLAGS $CFLAGS"
src="\$2.c"
else
echo "\$0: \$1: no source file found." >&2
exit 1
fi
redo-ifchange "\$src" || exit
\$cc -c "\$src" -o "\$3" \
-Iinclude -I\$OUT/include \$cflags \
-MMD -MF "\$3.d"
read DEPS <\$3.d
redo-ifchange \${DEPS#*:}
rm -f "\$3.d"
EOF
redo-stamp <$3