blob: 4d97e71920a85e639e089f4f6d6e480731475f37 [file] [log] [blame]
Takeshi Abeb2bd33e2011-08-10 02:12:48 +09001# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
Michael Stahlb0b92d12012-05-15 14:47:37 +02002#
3# Copyright 2012 LibreOffice contributors.
4#
5# This Source Code Form is subject to the terms of the Mozilla Public
6# License, v. 2.0. If a copy of the MPL was not distributed with this
7# file, You can obtain one at http://mozilla.org/MPL/2.0/.
8#
Norbert Thiebaudc857dff2012-01-24 15:48:30 -06009
Michael Stahlb0b92d12012-05-15 14:47:37 +020010# must not be empty so we can have a target for it
Norbert Thiebaude48d33b2012-01-26 16:29:26 -060011ifeq ($(MAKECMDGOALS),)
12MAKECMDGOALS:=all
13endif
14
Norbert Thiebaudc857dff2012-01-24 15:48:30 -060015SHELL=/usr/bin/env bash
16SRCDIR:=$(patsubst %/,%,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))
17
Michael Stahlb0b92d12012-05-15 14:47:37 +020018.PHONY : $(filter-out $(SRCDIR)/config_host.mk,$(MAKECMDGOALS))
Norbert Thiebaudc857dff2012-01-24 15:48:30 -060019
Michael Stahlb0b92d12012-05-15 14:47:37 +020020# recursively invoke Makefile.top, which includes config_host.mk
Matúš Kukana2361412012-07-26 15:49:10 +020021$(filter-out help,$(firstword $(MAKECMDGOALS))) : $(SRCDIR)/config_host.mk
Michael Stahlb0b92d12012-05-15 14:47:37 +020022 $(MAKE) -r -f $(SRCDIR)/Makefile.top $(MAKECMDGOALS)
Norbert Thiebaudc857dff2012-01-24 15:48:30 -060023
Michael Stahlb0b92d12012-05-15 14:47:37 +020024# run configure in an environment not polluted by config_host.mk
25$(SRCDIR)/config_host.mk : \
26 $(SRCDIR)/config_host.mk.in \
27 $(SRCDIR)/bin/repo-list.in \
28 $(SRCDIR)/ooo.lst.in \
29 $(SRCDIR)/configure.in \
30 $(SRCDIR)/autogen.lastrun
Norbert Thiebaud84399902012-01-26 14:26:49 -060031 ./autogen.sh
32
Michael Stahlb0b92d12012-05-15 14:47:37 +020033# dummy rule in case autogen.lastrun does not exist
Peter Foleya26efd72012-05-28 12:13:19 -040034$(SRCDIR)/autogen.lastrun:
Peter Foleya75873d2012-02-26 13:53:09 -050035 @true
36
Matúš Kukana2361412012-07-26 15:49:10 +020037help:
38 @cat $(SRCDIR)/solenv/gbuild/gbuild.help.txt
39 @true
40
Mathias Bauera5dd1ea2010-04-17 12:41:17 +020041# vim: set noet sw=4 ts=4: