| Takeshi Abe | b2bd33e | 2011-08-10 02:12:48 +0900 | [diff] [blame] | 1 | # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- |
| Michael Stahl | b0b92d1 | 2012-05-15 14:47:37 +0200 | [diff] [blame] | 2 | # |
| 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 Thiebaud | c857dff | 2012-01-24 15:48:30 -0600 | [diff] [blame] | 9 | |
| Michael Stahl | b0b92d1 | 2012-05-15 14:47:37 +0200 | [diff] [blame] | 10 | # must not be empty so we can have a target for it |
| Norbert Thiebaud | e48d33b | 2012-01-26 16:29:26 -0600 | [diff] [blame] | 11 | ifeq ($(MAKECMDGOALS),) |
| 12 | MAKECMDGOALS:=all |
| 13 | endif |
| 14 | |
| Norbert Thiebaud | c857dff | 2012-01-24 15:48:30 -0600 | [diff] [blame] | 15 | SHELL=/usr/bin/env bash |
| 16 | SRCDIR:=$(patsubst %/,%,$(dir $(realpath $(firstword $(MAKEFILE_LIST))))) |
| 17 | |
| Michael Stahl | b0b92d1 | 2012-05-15 14:47:37 +0200 | [diff] [blame] | 18 | .PHONY : $(filter-out $(SRCDIR)/config_host.mk,$(MAKECMDGOALS)) |
| Norbert Thiebaud | c857dff | 2012-01-24 15:48:30 -0600 | [diff] [blame] | 19 | |
| Michael Stahl | b0b92d1 | 2012-05-15 14:47:37 +0200 | [diff] [blame] | 20 | # recursively invoke Makefile.top, which includes config_host.mk |
| Matúš Kukan | 3947b92 | 2012-07-26 15:49:10 +0200 | [diff] [blame] | 21 | $(filter-out help,$(firstword $(MAKECMDGOALS))) : $(SRCDIR)/config_host.mk |
| Michael Stahl | b0b92d1 | 2012-05-15 14:47:37 +0200 | [diff] [blame] | 22 | $(MAKE) -r -f $(SRCDIR)/Makefile.top $(MAKECMDGOALS) |
| Norbert Thiebaud | c857dff | 2012-01-24 15:48:30 -0600 | [diff] [blame] | 23 | |
| Michael Stahl | b0b92d1 | 2012-05-15 14:47:37 +0200 | [diff] [blame] | 24 | # 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 Thiebaud | 8439990 | 2012-01-26 14:26:49 -0600 | [diff] [blame] | 31 | ./autogen.sh |
| 32 | |
| Michael Stahl | b0b92d1 | 2012-05-15 14:47:37 +0200 | [diff] [blame] | 33 | # dummy rule in case autogen.lastrun does not exist |
| Peter Foley | a26efd7 | 2012-05-28 12:13:19 -0400 | [diff] [blame] | 34 | $(SRCDIR)/autogen.lastrun: |
| Peter Foley | a75873d | 2012-02-26 13:53:09 -0500 | [diff] [blame] | 35 | @true |
| 36 | |
| Matúš Kukan | 3947b92 | 2012-07-26 15:49:10 +0200 | [diff] [blame] | 37 | help: |
| 38 | @cat $(SRCDIR)/solenv/gbuild/gbuild.help.txt |
| 39 | @true |
| 40 | |
| Mathias Bauer | a5dd1ea | 2010-04-17 12:41:17 +0200 | [diff] [blame] | 41 | # vim: set noet sw=4 ts=4: |