+# generate automake Makefile.am
+automakefile="$tmpdir/Makefile.am"
+if [ "$build_type" = "automake" ]
+then
+ (
+ echo "noinst_LIBRARIES = libccan.a"
+ echo "libccan_a_SOURCES = \\"
+ cd "$tmpdir"
+ find ccan -maxdepth 2 -name '*.[ch]' |
+ sed -e 's,^,\t,;$!s,$, \\,'
+ ) > "$automakefile"
+fi
+