# Makefile.  Generated from Makefile.in by configure.

SHELL=/usr/bin/env bash

ifeq ($(USE_GMAKE),)
GBUILD_OPT:=
else
GBUILD_OPT:=--gmake
endif

prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib

all: Makefile dmake/dmake src.downloaded

	@. ./*[Ee]nv.[Ss]et.sh && \
        cd instsetoo_native && \
        build.pl $(GBUILD_OPT) -P2 --all -- -P1

install:
	@. ./*[Ee]nv.[Ss]et.sh && \
	echo "Installing in /usr/local/lib/libreoffice..." && \
	ooinstall "/usr/local/lib/libreoffice" && \
	echo "" && \
	echo "Installation finished, you can now execute:" && \
	echo "/usr/local/lib/libreoffice/program/soffice"

distro-pack-install: install
	./bin/distro-install-clean-up
	./bin/distro-install-desktop-integration
	./bin/distro-install-sdk
	./bin/distro-install-file-lists

dev-install:
	@. ./*[Ee]nv.[Ss]et.sh && \
        ooinstall -l /prace/lo/build/libreoffice-3-4/build/bootstrap/install && \
        echo "" && \
        echo "Developer installation finished, you can now execute:" && \
        echo "/prace/lo/build/libreoffice-3-4/build/bootstrap/install/program/soffice"

distclean: dmake/dmake
	@. ./*[Ee]nv.[Ss]et.sh && \
        dmake distclean

clean: dmake/dmake
	@. ./*[Ee]nv.[Ss]et.sh && \
        dmake clean && \
        if [ -n "$$USE_GMAKE" ] ; then make -f GNUmakefile.mk -sr clean ; fi

dmake/dmake:
	@. ./*[Ee]nv.[Ss]et.sh && \
        ./bootstrap

src.downloaded: ooo.lst download
ifeq (,YES)
	@. ./*[Ee]nv.[Ss]et.sh && \
	$$SRC_ROOT/download $$SRC_ROOT/ooo.lst && touch $@
else
	@echo "Automatic fetching of external tarballs is disabled."
endif

fetch: src.downloaded

Makefile: configure.in set_soenv.in Makefile.in
	./autogen.sh

check: Makefile dmake/dmake fetch
	@. ./*[Ee]nv.[Ss]et.sh && \
	cd smoketestoo_native && \
	export SAL_USE_VCLPLUGIN="svp" && \
        build.pl $(GBUILD_OPT) -P2 --all -- -P1

id:
	@. ./*[Ee]nv.[Ss]et.sh && \
		create-ids

tags:
	@. ./*[Ee]nv.[Ss]et.sh && \
		create-tags

docs:
	@. ./*[Ee]nv.[Ss]et.sh && \
		mkdocs.sh $$SRC_ROOT/docs $$SOLARENV/inc/doxygen.cfg
