#!/bin/sh
# FNT - cleanup source tree
#
# Copyright (C) 2009 Free Software Foundation, Inc.
#
# Written by:
#	Slava Zanko <slavazanko@gmail.com>
#
#
# This file is part of the FIDO New Technology.
#
# FIDO New Technology is free software: you can redistribute it and/or 
# modify it under the terms of the GNU General Public License as published 
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

#*** include section (source functions, for example) *******************

#*** file scope functions **********************************************

#*** main code *********************************************************

srcdir=$(dirname $0); test -z "$srcdir" && srcdir=.

[ -f Makefile ] && make distclean

find ${srcdir} -name 'Makefile' | xargs rm -f
find ${srcdir} -name 'Makefile.in' | xargs rm -f
find -name '*~' | xargs rm -f

find ${srcdir} -type d -name '.deps' | xargs rm -fR
find ${srcdir} -type d -name '.libs' | xargs rm -fR

find ${srcdir}/lib -name '*.la' | xargs rm -f
find ${srcdir}/lib -name '*.lo' | xargs rm -f
find ${srcdir}/lib -name '*.o' | xargs rm -f
find ${srcdir}/lib -name '*.loT' | xargs rm -f

rm -fR ${srcdir}/{\
autom4te.cache,\
build_root,\
build_mingw32_root,\
config,\
intl,\
m4\
}

rm -f ${srcdir}/po/{\
boldquot.sed,\
en@boldquot.header,\
en@quot.header,\
fnt.pot,\
insert-header.sin,\
Makefile.in.in,\
Makevars.template,\
POTFILES,\
POTFILES.in,\
quot.sed,\
remove-potcdate.sin,\
Rules-quot,\
stamp-po\
}

rm -f ${srcdir}/config.* ${srcdir}/{\
ABOUT-NLS,\
aclocal.m4,\
configure,\
libfnt.pc,\
stamp-h1\
}
