3 test $# -ge 2 || exit 1
14 src="$srctree/$d/Kbuild.src"
16 if test -f "$src"; then
19 s=`grep -h '^//kbuild:' "$srctree/$d"/*.c | sed 's^//kbuild:^^'`
21 test x"$REPLY" = x"INSERT" && REPLY="$s"
22 printf "%s\n" "$REPLY"
23 done <"$src" >"$dst.$$.tmp"
25 if test -f "$dst" && cmp -s "$dst.$$.tmp" "$dst"; then
29 mv "$dst.$$.tmp" "$dst"
33 src="$srctree/$d/Config.src"
35 if test -f "$src"; then
38 s=`grep -h '^//config:' "$srctree/$d"/*.c | sed 's^//config:^^'`
40 test x"$REPLY" = x"INSERT" && REPLY="$s"
41 printf "%s\n" "$REPLY"
42 done <"$src" >"$dst.$$.tmp"
44 if test -f "$dst" && cmp -s "$dst.$$.tmp" "$dst"; then
48 mv "$dst.$$.tmp" "$dst"
54 # Last read failed. This is normal. Don't exit with its error code: