summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-12-11 07:49:24 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-12-11 14:26:30 +0000
commitae4e327739112ba326a2945fc0d5550739f3083d (patch)
treed8430835484c045cd334fc596dcc627cf98aa430 /Makefile.in
parent8532cbd3e685d7a1e4e26bf7c2b7bf0b1c38c5be (diff)
Prepare for read-only source build
This patch allows to do mkdir <build_dir> cd <build_dir> <src_root>/autogen.sh make Only the remaining dmake modules are poluting the <src_root>... which will get eventually convererd to gmake... Change-Id: Iefd64732fa12e096d554cff4eee6b777deb92338 Reviewed-on: https://gerrit.libreoffice.org/1273 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in42
1 files changed, 42 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 000000000000..bd06c200f098
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,42 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# Copyright 2012 LibreOffice contributors.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+# must not be empty so we can have a target for it
+ifeq ($(MAKECMDGOALS),)
+MAKECMDGOALS:=all
+endif
+
+SHELL=/usr/bin/env bash
+export SRCDIR:=@SRC_ROOT@
+export BUILD_DIR:=$(patsubst %/,%,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))
+
+.PHONY : $(filter-out $(BUILD_DIR)/config_host.mk,$(MAKECMDGOALS))
+
+# recursively invoke Makefile.top, which includes config_host.mk
+$(filter-out help,$(firstword $(MAKECMDGOALS))) : $(BUILD_DIR)/config_host.mk
+ $(MAKE) -r -f $(SRCDIR)/Makefile.top $(MAKECMDGOALS)
+
+# run configure in an environment not polluted by config_host.mk
+$(BUILD_DIR)/config_host.mk : \
+ $(SRCDIR)/config_host.mk.in \
+ $(SRCDIR)/Makefile.in \
+ $(SRCDIR)/configure.ac \
+ $(BUILD_DIR)/autogen.lastrun
+ $(SRCDIR)/autogen.sh
+
+# dummy rule in case autogen.lastrun does not exist
+$(BUILD_DIR)/autogen.lastrun:
+ @true
+
+help:
+ @cat $(SRCDIR)/solenv/gbuild/gbuild.help.txt
+ @true
+
+# vim: set noet sw=4 ts=4:
+