Miscellany
public text v1 · immutable#!/bin/sh
# Find all directories in the current directory, and add them to Makefile.am
# if they themselves contain Makefile.am.
Dirs=`find . -maxdepth 1 -type d | cut -f 2 -d /`
for dir in ${Dirs}
do
if [ "$dir" != "." ] && [ -e "$dir/Makefile.am" ]; then
SubDirs="${SubDirs} $dir"
fi
done
echo "SUBDIRS =${SubDirs}" > Makefile.am
echo >> Makefile.am
echo "MAINTAINERCLEANFILES = Makefile.in" >> Makefile.am