b0b92d1e5f
The top-level Makefile invokes autogen.sh (and thereby configure) in an environment which is polluted by config_host.mk; this causes at least the problem that following a "make clean", the bootstrap script will not copy dmake to its destination because BUILD_DMAKE=NO is set from config_host.mk, which is apparently due to the PATH being polluted from config_host.mk, so configure finds the dmake in the build tree. So split up top-level Makefile into Makefile, which invokes autogen.sh, and Makefile.top, which does everything else.
37 lines
1.1 KiB
Makefile
37 lines
1.1 KiB
Makefile
# -*- 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
|
|
SRCDIR:=$(patsubst %/,%,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))
|
|
|
|
.PHONY : $(filter-out $(SRCDIR)/config_host.mk,$(MAKECMDGOALS))
|
|
|
|
# recursively invoke Makefile.top, which includes config_host.mk
|
|
$(firstword $(MAKECMDGOALS)) : $(SRCDIR)/config_host.mk
|
|
$(MAKE) -r -f $(SRCDIR)/Makefile.top $(MAKECMDGOALS)
|
|
|
|
# run configure in an environment not polluted by config_host.mk
|
|
$(SRCDIR)/config_host.mk : \
|
|
$(SRCDIR)/config_host.mk.in \
|
|
$(SRCDIR)/bin/repo-list.in \
|
|
$(SRCDIR)/ooo.lst.in \
|
|
$(SRCDIR)/configure.in \
|
|
$(SRCDIR)/autogen.lastrun
|
|
./autogen.sh
|
|
|
|
# dummy rule in case autogen.lastrun does not exist
|
|
autogen.lastrun:
|
|
@true
|
|
|
|
# vim: set noet sw=4 ts=4:
|