All pastes #422184 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-03 09:44 UTC
rendered paste body
#!/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