## kdepim/Makefile.am
## (C) 1997 Stephan Kulow

# these are here to control the compilation order, but are only textual
# hints for the cvs.sh script. If you change something here, you have
# to call Makefile.cvs again
# COMPILE_BEFORE_korganizer = libkdepim libkpimexchange kgantt kalarmd calendarsystem
# COMPILE_BEFORE_kaddressbook = libkdepim 
# COMPILE_BEFORE_kandy = libkdepim
# COMPILE_AFTER_libkcal = kalarm kalarmd kitchensync konsolekalendar korganizer ksync libkpimexchange kpilot
# COMPILE_BEFORE_libkcal = libical
# COMPILE_BEFORE_kaplan = kaddressbook knotes korganizer
# COMPILE_BEFORE_libkpimexchange = kalarmd
# COMPILE_BEFORE_kalarm = kalarmd

AUTOMAKE_OPTIONS = foreign 1.5
DISTCLEANFILES = inst-apps

$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
	@cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
$(top_srcdir)/configure.in: $(top_srcdir)/configure.files $(shell test -f $(top_srcdir)/configure.files && sed -e "s%^%\$(top_srcdir)/%" $(top_srcdir)/configure.files) $(top_srcdir)/subdirs
	cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in
$(top_srcdir)/subdirs:
	cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
$(top_srcdir)/configure.files:
	cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.files

MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 SUBDIRS

cvs-local:
	@echo "*** preparing libical" 
	cp admin/libtool.m4.in libical/acinclude.m4 ;\
	cp admin/config.sub admin/config.guess libical ;\
	cp admin/install-sh admin/mkinstalldirs admin/missing admin/lt* libical ;\
	cd  libical && \
        $(ACLOCAL) && \
        $(AUTOHEADER) && \
        $(AUTOMAKE) && \
        $(AUTOCONF)

cvs-dist-local:
	@cd  libical && $(AUTOMAKE) -i && $(AUTOCONF)

include admin/Doxyfile.am

apidox-am-toplevel-yes: apidox-am-toplevel-kdepim

apidox-am-toplevel-kdepim: $(top_builddir)/apidocs/qt/qt.tag

$(top_builddir)/apidocs/qt/qt.tag:
	@qttag="`find $(DESTDIR)$(kde_htmldir)/en -type f -name qt.tag | head -1`" ; \
	$(mkinstalldirs) $(top_builddir)/apidocs/qt; \
	if test -n "$$qttag" ; then \
		echo "*** Using global Qt tag file at $$qttag" ; \
		cp $$qttag $(top_builddir)/apidocs/qt/qt.tag ; \
	else \
		echo "*** Creating a tag file for the Qt libraries:"; \
		doxytag -t $(top_builddir)/apidocs/qt/qt.tag $(QTDOCDIR) ; \
	fi

install-data-local: install-apidox-kdepim

## install the tag file for the Qt documentation
install-apidox-kdepim:
	if test -f $(top_builddir)/apidocs/qt/qt.tag; then \
		$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/qt ;\
		echo $(INSTALL_DATA) $(top_builddir)/apidocs/qt/qt.tag $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/qt; \
		$(INSTALL_DATA) $(top_builddir)/apidocs/qt/qt.tag $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/qt; \
	fi
SUBDIRS=$(TOPSUBDIRS)
