apenwarr-redo/docs/cookbook/c/hello world.list.od
Avery Pennarun 2bea74df35 Work around ancient shells where >$3 does not implicitly quote $3.
Also add an entry in shelltest.od to reject any shell exhibiting that
bug.

Reported-by: Wayne Scott <wsc9tt@gmail.com>
2019-03-03 20:56:17 -05:00

28 lines
584 B
Text

# This script is run from the output dir.
# The source dir is at $S.
rc_include all.rc
redo-ifchange "$S/sources"
(
cd "$S"
echo "main.c"
echo "monotime.c"
echo "when.c" # auto-generated source
echo "flagtest.c" # source with different compiler flags
if [ -n "$CXX" ]; then
echo "slow.cc"
fi
# This is unnecessarily fancy.
# We're just using it as an example of
# how to dynamically generate a .list
# file.
for d in lib*/*.list lib*/*.list.od; do
[ -e "$d" ] && echo "${d%%.*}.so"
done | uniq
printf '%s\n' "$LIBGTK2" "$LIBQT4"
) >"$3"
redo-stamp <"$3"