8 ESCAPED_OUTPUT
=`sed 's/\//\\\\\//g' <<<"$1"`
11 echo '#! /usr/bin/env bash'
12 grep '^\(CXXFLAGS\|INCPATH\|DEFINES\)' ${INPUT} \
14 -e 's/$(\([^)]\+\))/${\1}/g' \
16 -e 's/^\([^ ]\+\) *= *\(.\+\)/\1="\2"/'
19 grep '^.$(CXX)' ${INPUT} \
22 -e 's/^\t\$(CXX)\(.\+\)$/makedepend \1 -w 1000000 -f '${DEPFILE}' -p "" -a -o .o 2>\/dev\/null/' \
23 -e 's/$(\([^)]\+\))/${\1}/g' \
33 while read makefile
; do
34 dir
=`dirname "${makefile}"`
35 if [ `find "${dir}" -maxdepth 1 -name '*.cpp' | wc -l 2>/dev/null` -ge 1 ]; then
36 echo "Directory: $dir"
39 write_deps_file Makefile
42 sed 's/^.\+\/\([^\/]\+.o:\)/\1/' "${DEPFILE}" > "${TEMPFILE}"
43 mv "${TEMPFILE}" "${DEPFILE}"
47 echo "include ${DEPFILE}" >> "${makefile}"
49 done < <(find src
-name 'Makefile')