Kaydet (Commit) 0a45deba authored tarafından Matúš Kukan's avatar Matúš Kukan

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
üst 7b743c96
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,accessibility/bridge,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,accessibility/bridge))
ACBR := $(call gb_CustomTarget_get_workdir,accessibility/bridge)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,accessibility/bridge/inc,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,accessibility/bridge/inc))
ACBI := $(call gb_CustomTarget_get_workdir,accessibility/bridge/inc)
......
......@@ -26,7 +26,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,clucene/source,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,clucene/source))
CLSO := $(call gb_CustomTarget_get_workdir,clucene/source)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,desktop/soffice,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,desktop/soffice))
DESO := $(call gb_CustomTarget_get_workdir,desktop/soffice)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,extensions/source/activex/idl,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,extensions/source/activex/idl))
EXAI := $(call gb_CustomTarget_get_workdir,extensions/source/activex/idl)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,extensions/source/activex,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,extensions/source/activex))
EXSA := $(call gb_CustomTarget_get_workdir,extensions/source/activex)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,filter/source/svg,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,filter/source/svg))
FISS := $(call gb_CustomTarget_get_workdir,filter/source/svg)
......
......@@ -26,7 +26,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,i18npool/breakiterator,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,i18npool/breakiterator))
IPBI := $(call gb_CustomTarget_get_workdir,i18npool/breakiterator)
......
......@@ -26,7 +26,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,i18npool/collator,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,i18npool/collator))
IPCO := $(call gb_CustomTarget_get_workdir,i18npool/collator)
TXTLIST := $(notdir $(wildcard $(SRCDIR)/i18npool/source/collator/data/*.txt))
......
......@@ -26,7 +26,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,i18npool/indexentry,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,i18npool/indexentry))
IPIE := $(call gb_CustomTarget_get_workdir,i18npool/indexentry)
......
......@@ -26,7 +26,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,i18npool/localedata,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,i18npool/localedata))
IPLD := $(call gb_CustomTarget_get_workdir,i18npool/localedata)
......
......@@ -26,7 +26,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,i18npool/textconversion,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,i18npool/textconversion))
IPTC := $(call gb_CustomTarget_get_workdir,i18npool/textconversion)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,jurt/util,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,jurt/util))
JUJL := $(call gb_CustomTarget_get_workdir,jurt/util)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,jurt/test/com/sun/star/lib/uno/protocols/urp,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,jurt/test/com/sun/star/lib/uno/protocols/urp))
JUTU := $(call gb_CustomTarget_get_workdir,jurt/test/com/sun/star/lib/uno/protocols/urp)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,jvmfwk/jreproperties,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,jvmfwk/jreproperties))
JFJP := $(call gb_CustomTarget_get_workdir,jvmfwk/jreproperties)
......
......@@ -29,7 +29,7 @@
OCDIR := $(SRCDIR)/officecfg/registry
include $(OCDIR)/files.mk
$(eval $(call gb_CustomTarget_CustomTarget,officecfg/registry,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,officecfg/registry))
OCRG := $(call gb_CustomTarget_get_workdir,officecfg/registry)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,packimages/images,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,packimages/images))
PIIM := $(call gb_CustomTarget_get_workdir,packimages/images)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,ridljar/javamaker,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,ridljar/javamaker))
RJJM := $(call gb_CustomTarget_get_workdir,ridljar/javamaker)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,sal/generated,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,sal/generated))
SAUT := $(call gb_CustomTarget_get_workdir,sal/generated)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,sdext/pdfimport,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,sdext/pdfimport))
SEPI := $(call gb_CustomTarget_get_workdir,sdext/pdfimport)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,sdext/source/presenter/help/en-US/com.sun.PresenterScreen,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,sdext/source/presenter/help/en-US/com.sun.PresenterScreen))
SEPR := $(call gb_CustomTarget_get_workdir,sdext/source/presenter/help/en-US/com.sun.PresenterScreen)
......
......@@ -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
......
......@@ -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:
......@@ -49,7 +49,6 @@ GBUILDDIR:=$(SRCDIR)/solenv/gbuild
.DELETE_ON_ERROR:
SHELL := /bin/sh
MAKEFLAGS+=-r
true := T
false :=
define NEWLINE
......
# -*- 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:
......@@ -23,7 +23,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,tools/reversemap,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,tools/reversemap))
TLRM := $(call gb_CustomTarget_get_workdir,tools/reversemap)
......
......@@ -27,7 +27,7 @@
include $(SRCDIR)/unoil/climaker/version.txt
$(eval $(call gb_CustomTarget_CustomTarget,unoil/climaker,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,unoil/climaker))
UICM := $(call gb_CustomTarget_get_workdir,unoil/climaker)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,unoil/javamaker,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,unoil/javamaker))
UIJM := $(call gb_CustomTarget_get_workdir,unoil/javamaker)
......
......@@ -23,7 +23,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,vcl/generic/fontmanager,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,vcl/generic/fontmanager))
VCFM := $(call gb_CustomTarget_get_workdir,vcl/generic/fontmanager)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,vcl/unx/kde4,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,vcl/unx/kde4))
VCKM := $(call gb_CustomTarget_get_workdir,vcl/unx/kde4)
......
......@@ -25,7 +25,7 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CustomTarget_CustomTarget,vcl/unx/kde/fpicker,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,vcl/unx/kde/fpicker))
VCKF := $(call gb_CustomTarget_get_workdir,vcl/unx/kde/fpicker)
......
......@@ -27,7 +27,7 @@
#*************************************************************************
$(eval $(call gb_CustomTarget_CustomTarget,writerfilter/source,new_style))
$(eval $(call gb_CustomTarget_CustomTarget,writerfilter/source))
WFSG := $(call gb_CustomTarget_get_workdir,writerfilter/source)
WFDIR := $(SRCDIR)/writerfilter/source/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment