# -- updatedd: Makefile.in --
#
# Copyright (C) 2002, 2003, 2004 Philipp Benner
#
# 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.

TOPDIR := $(shell pwd)
SUBDIRS = Documentation src src/plugins scripts updatedd-wrapper
MAKE = make

# *BSD compatible, the ugly way of recursive make
all:
	for dir in $(SUBDIRS); do	\
		cd $$dir && $(MAKE) $@ && cd $(TOPDIR);	\
	done

install: all
	for dir in $(SUBDIRS); do	\
		cd $$dir && $(MAKE) $@ && cd $(TOPDIR);	\
	done

uninstall:
	for dir in $(SUBDIRS); do	\
		cd $$dir && $(MAKE) $@ && cd $(TOPDIR); \
	done

clean:
	for dir in $(SUBDIRS); do	\
		cd $$dir && $(MAKE) $@ && cd $(TOPDIR);	\
	done

proper: clean
	rm -f Makefile
	rm -f build
	rm -f config.status
	rm -f config.log
	rm -f include/config.h
	for dir in $(SUBDIRS); do	\
		cd $$dir && $(MAKE) $@ && cd $(TOPDIR);	\
	done

buildpackage:
	fakeroot dpkg-buildpackage

distclean: proper
	rm -rf debian/tmp
	rm -rf debian/updatedd-doc
