2009050
[gdash.git] / caves / create_makefile.sh
blob9258ff6d39c142dc1e2a63ee1ceec5a7a25016c5
1 #!/bin/bash
2 SUBDIRS=$(find . -type d -printf "%f\n"|grep -v "\.$")
3 echo "# Automatically generated Makefile.am! Check $0" >Makefile.am
4 echo >>Makefile.am
6 for a in $SUBDIRS; do
7 CAVES=$(find $a -type f)
8 echo ${a}dir = '$(pkgdatadir)'/caves/${a} >> Makefile.am
9 echo ${a}_CAVES = $CAVES >>Makefile.am
10 DIST=$DIST\ \$\(${a}_CAVES\)
11 echo ${a}_DATA = \$\(${a}_CAVES\) >>Makefile.am
12 echo >>Makefile.am
13 done
14 echo EXTRA_DIST = $0 $DIST >>Makefile.am