How to comment out a line in all files?
you can run the command suggested by anubhava in a find, if you want to run this on hundreds of files.
find <dir> -type f -name makefile.am -exec sed -i.bak 's~^[[:blank:]]*include \$DIR/make/makefile\.am~#&~' {} \;
where is the base directory under which you want to recursively search makefile.am and comment out the include statement.
Hope it helps you.
You can further tweak the command according to your need.