
#aclocal
#autoconf


cd src/
  cp Makefile.am.template Makefile.am
  ls --width=100000 -C *.cpp >> Makefile.am
  echo "EXTRA_DIST = Makefile.am.template \\" >> Makefile.am
  ls --width=100000 -C *.h >> Makefile.am

  cd interfaces/
    cp Makefile.am.template Makefile.am
    ls --width=100000 -C *.cpp >> Makefile.am
    echo "EXTRA_DIST = Makefile.am.template \\" >> Makefile.am
    ls --width=100000 -C *.h >> Makefile.am

    cd lunatic/
      cp Makefile.am.template Makefile.am
      ls --width=100000 -C *.cpp >> Makefile.am
      echo "EXTRA_DIST = Makefile.am.template \\" >> Makefile.am
      ls --width=100000 -C *.h >> Makefile.am
    cd ..
  cd ..
cd ..

cd rsrc/
  rm Makefile.am 2> /dev/null
  echo -n "EXTRA_DIST = \\\t" >> Makefile.am
  ls --width=100000 -C -d * | sed 's/Makefile.am//' >> Makefile.am
  echo "" >> Makefile.am
  echo "SUBDIRS = lunatic lunatrix" >> Makefile.am

  cd lunatic/
    rm Makefile.am 2> /dev/null
    echo -n "EXTRA_DIST = \\\t" >> Makefile.am
    ls --width=100000 -C * | sed 's/Makefile.am//' >> Makefile.am
  cd ..
  cd lunatrix/
    rm Makefile.am 2> /dev/null
    echo -n "EXTRA_DIST = \\\t" >> Makefile.am
    ls --width=100000 -C * | sed 's/Makefile.am//' >> Makefile.am
  cd ..
cd ..

autoreconf -vfi

automake

