# Bluefish HTML Editor
# Copyright (C) 1998-1999 Olivier Sessink and Chris Mazuc
# Copyright (C) 2000-2001 Olivier Sessink
#
# This program 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 2 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


SHELL = /bin/sh
VPATH = @srcdir@

PACKAGE = @PACKAGE@
VERSION = @VERSION@

srcdir = src

prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
datadir = @datadir@
pkgdatadir = @pkgdatadir@
pixmapsdir = @prefix@/share/pixmaps

INSTALL = @INSTALL@

#make -C is a GNU extension, BSD make doesn't have it
#use cd dir ; make all instead

bluefish:all
all:
	@cd intl; $(MAKE) all
	@cd po; $(MAKE) all
	@cd man; $(MAKE) all
	@cd data; $(MAKE) all
	@cd ${srcdir}/ && $(MAKE) all

clean:
	@cd intl; $(MAKE) clean
	@cd po; $(MAKE) clean
	@cd man; $(MAKE) clean
	@cd data; $(MAKE) clean
	rm -f core *~
	@cd ${srcdir}/ && $(MAKE) clean

patchclean: clean
	rm -f *.orig *.rej
	@cd ${srcdir}/ && $(MAKE) patchclean  

distclean:
	@cd intl; $(MAKE) distclean
	@cd po; $(MAKE) distclean
	@cd man; $(MAKE) distclean
	@cd ${srcdir}/ && $(MAKE) distclean
	rm -f Makefile ${srcdir}/Makefile ${srcdir}/.depends config.status config.cache config.log
	rm -f *.orig *.rej

install:
	@cd intl; $(MAKE) install
	@cd po; $(MAKE) install
	@cd man; $(MAKE) install
	@cd data; $(MAKE) install
	$(INSTALL) -d -m 755 $(DESTDIR)$(pixmapsdir)
	$(INSTALL) -m 644 ./pixmaps/bluefish_icon.xpm $(DESTDIR)$(pixmapsdir)
	@cd ${srcdir}/ && $(MAKE) install


uninstall:
	@$(MAKE) -C man uninstall
	@$(MAKE) -C po uninstall
	@$(MAKE) -C data uninstall
	rm -f $(install_location)
	@cd ${srcdir}/ && $(MAKE) uninstall

depend:
	@cd ${srcdir} && $(MAKE) depend
