#!/bin/sh
# Run this to generate all the initial makefiles, etc.

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

PKG_NAME="gcvs"

# remove unwanted 'macros' folder
#   The original path 'macros' is used for cvsgui macros. 
#   It was easier to use an differnt path for gnome macros,
#   than to move all cvsgui macros to a new place
echo "remove unwanted 'macros' folder"
rm -rf $srcdir/macros

# this entries will be generated automatically by anjuta IDE, but our 'macros' folder is moved to 'am_macros'
echo edit \'macros\' entries
sed -e "s/^macros\/Makefile/am_macros\/Makefile/" -e "s/^AM_ACLOCAL_INCLUDE(macros)/AM_ACLOCAL_INCLUDE(am_macros)/" configure.in > configure.in.tmp
mv configure.in.tmp configure.in

sed -e "s/ macros / am_macros /"  Makefile.am > Makefile.am.tmp
mv Makefile.am.tmp Makefile.am
# end of "macros" stuff

. $srcdir/am_macros/autogen.sh
