summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-04-07 08:40:35 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2012-04-09 21:04:39 +0200
commit0a45deba2be4a77db7540bd050b25bd6c26d7513 (patch)
tree828e305e131e24bddfe0d9c8a41c7a02a8a300b2 /solenv
parent7b743c9628d9479ee3fe2650a43eee5a9a02b8a4 (diff)
enforce only one possible use of gb_CustomTarget
This brings two changes: - no more recursive calling of make - gbuild_simple is now not used => removed
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/CustomTarget.mk51
-rw-r--r--solenv/gbuild/Package.mk7
-rw-r--r--solenv/gbuild/gbuild.mk1
-rw-r--r--solenv/gbuild/gbuild_simple.mk109
4 files changed, 4 insertions, 164 deletions
diff --git a/solenv/gbuild/CustomTarget.mk b/solenv/gbuild/CustomTarget.mk
index c2456c0f5278..31c5e9caa456 100644
--- a/solenv/gbuild/CustomTarget.mk
+++ b/solenv/gbuild/CustomTarget.mk
@@ -26,66 +26,23 @@
#
#*************************************************************************
-# N.B.: putting the "+" there at the start activates the GNU make job server
-define gb_CustomTarget__command
-+$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(call gb_CustomTarget_get_workdir,$(2)) && \
- O='$(OUTDIR)' S='$(SRCDIR)' W='$(WORKDIR)' gb_AWK='$(gb_AWK)' \
- gb_XSLTPROC='$(gb_XSLTPROC)' GBUILDDIR='$(GBUILDDIR)' SRCDIR='$(SRCDIR)' \
- $(MAKE) -C $(call gb_CustomTarget_get_workdir,$(2)) -f $< && \
- touch $(1))
-
-endef
-
# the .dir is for make 3.81, which ignores trailing /
$(call gb_CustomTarget_get_workdir,%)/.dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
$(call gb_CustomTarget_get_target,%) :
- $(call gb_Output_announce,$*,$(true),MAK,3)
- $(if $(NEW_STYLE),touch $@,\
- $(call gb_CustomTarget__command,$@,$*))
+ $(call gb_Output_announce,$*,$(true),CUS,3)
+ touch $@
.PHONY: $(call gb_CustomTarget_get_clean_target,%)
$(call gb_CustomTarget_get_clean_target,%) :
- $(call gb_Output_announce,$*,$(false),MAK,3)
+ $(call gb_Output_announce,$*,$(false),CUS,3)
$(call gb_Helper_abbreviate_dirs,\
rm -rf $(call gb_CustomTarget_get_workdir,$*) && \
rm -f $(call gb_CustomTarget_get_target,$*))
-define gb_CustomTarget__get_makefile
-$(SRCDIR)/$(1)/Makefile
-endef
-
define gb_CustomTarget_CustomTarget
-$(call gb_CustomTarget_get_target,$(1)) : NEW_STYLE := $(2)
-ifeq ($(2),)
-$(call gb_CustomTarget_get_target,$(1)) : \
- $(call gb_CustomTarget__get_makefile,$(1))
-else
-$$(eval $$(call gb_Module_register_target,$(call gb_CustomTarget_get_target,$(1)),$(call gb_CustomTarget_get_clean_target,$(1))))
-endif
-
-endef
-
-
-define gb_CustomTarget_add_dependency
-$(call gb_CustomTarget_get_target,$(1)) : $(SRCDIR)/$(2)
-
-endef
-
-define gb_CustomTarget_add_dependencies
-$(foreach dependency,$(2),$(call gb_CustomTarget_add_dependency,$(1),$(dependency)))
-
-endef
-
-define gb_CustomTarget_add_outdir_dependency
-$(call gb_CustomTarget_get_target,$(1)) : $(2)
-
-endef
-
-define gb_CustomTarget_add_outdir_dependencies
-$(foreach dependency,$(2),$(call gb_CustomTarget_add_outdir_dependency,$(1),$(dependency)))
+$(eval $(call gb_Module_register_target,$(call gb_CustomTarget_get_target,$(1)),$(call gb_CustomTarget_get_clean_target,$(1))))
endef
diff --git a/solenv/gbuild/Package.mk b/solenv/gbuild/Package.mk
index 1a4bf52e39c9..62d82bd408a9 100644
--- a/solenv/gbuild/Package.mk
+++ b/solenv/gbuild/Package.mk
@@ -83,11 +83,4 @@ $(call gb_PackagePart_PackagePart,$(2),$$(gb_Package_SOURCEDIR_$(1))/$(3),$(call
endef
-define gb_Package_add_customtarget
-$(call gb_Package_get_preparation_target,$(1)) : $(call gb_CustomTarget_get_target,$(2))
-$(call gb_Package_get_clean_target,$(1)) : $(call gb_CustomTarget_get_clean_target,$(2))
-$(eval $(call gb_CustomTarget_CustomTarget,$(2)))
-
-endef
-
# vim: set noet sw=4:
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 45d3b4ad0b69..b12c88fd9c02 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -49,7 +49,6 @@ GBUILDDIR:=$(SRCDIR)/solenv/gbuild
.DELETE_ON_ERROR:
SHELL := /bin/sh
-MAKEFLAGS+=-r
true := T
false :=
define NEWLINE
diff --git a/solenv/gbuild/gbuild_simple.mk b/solenv/gbuild/gbuild_simple.mk
deleted file mode 100644
index 6ee9e09f4034..000000000000
--- a/solenv/gbuild/gbuild_simple.mk
+++ /dev/null
@@ -1,109 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-GBUILDDIR:=$(SRC_ROOT)/solenv/gbuild
-
-# this is a subset of gbuild functionality, for use in custom makefiles
-
-COMMA :=,
-
-include $(GBUILDDIR)/Output.mk
-
-# BuildDirs overrides *DIR variables for Windows
-include $(GBUILDDIR)/BuildDirs.mk
-
-# Presumably the common parts in gbuild.mk and gbuild_simple.mk should
-# be factored out into one file instead of duplicating, but... perhaps
-# wait until this stabilizes a bit and we know with more certainty
-# what is needed in both.
-
-# Or alternatively: Just mark these variables for export in gbuild.mk?
-# I think any use of gbuild_simple.mk is in a sub-make under one that
-# uses gbuild.mk anyway.
-
-ifneq ($(strip $(PRODUCT)$(product)),)
-gb_PRODUCT := $(true)
-else
-gb_PRODUCT := $(false)
-endif
-
-# These are useful, too, for stuff built in "custom" Makefiles
-ifneq ($(strip $(ENABLE_SYMBOLS)$(enable_symbols)),)
-gb_SYMBOL := $(true)
-else
-gb_SYMBOL := $(false)
-endif
-
-gb_DEBUGLEVEL := 0
-ifneq ($(strip $(DEBUG)$(debug)),)
-gb_DEBUGLEVEL := 1
-endif
-
-ifneq ($(strip $(DBGLEVEL)$(dbglevel)),)
-ifneq ($(strip $(dbglevel)),)
-gb_DEBUGLEVEL := $(strip $(dbglevel))
-else
-gb_DEBUGLEVEL := $(strip $(DBGLEVEL))
-endif
-endif
-
-ifneq ($(gb_DEBUGLEVEL),0)
-gb_SYMBOL := $(true)
-endif
-
-include $(GBUILDDIR)/Helper.mk
-include $(GBUILDDIR)/Tempfile.mk
-
-# Include platform/cpu/compiler specific config/definitions
-include $(GBUILDDIR)/platform/$(OS)_$(CPUNAME)_$(COM).mk
-
-ifeq ($(CROSS_COMPILING),YES)
-# We can safely Assume all cross-compilation is from Unix systems.
-gb_Executable_EXT_for_build :=
-else
-gb_Executable_EXT_for_build := $(gb_Executable_EXT)
-endif
-
-ifeq ($(SYSTEM_PYTHON),YES)
-gb_PYTHONTARGET :=
-gb_PYTHON := $(PYTHON)
-else ifeq ($(OS),MACOSX)
-#fixme: remove this MACOSX ifeq branch by filling in gb_PYTHON_PRECOMMAND in
-#gbuild/platform/macosx.mk correctly for mac, e.g. PYTHONPATH and PYTHONHOME
-#dirs for in-tree internal python
-gb_PYTHONTARGET :=
-gb_PYTHON := $(PYTHON)
-else ifeq ($(DISABLE_PYTHON),TRUE)
-# Build-time python
-gb_PYTHON := python
-else
-gb_PYTHONTARGET := $(OUTDIR)/bin/python
-gb_PYTHON := $(gb_PYTHON_PRECOMMAND) $(gb_PYTHONTARGET)
-endif
-
-# vim: set noet sw=4 ts=4: