gbuild: avoid unnecessary Packages while processing scp2 files

This is first in do-not-duplicate-stuff-in-solver patch series.
Adds direct include path for gb_ScpPreprocessTarget.
Avoids copying .par files by using gb_InstallScriptTarget__get_dirs
for include paths.

Change-Id: I0a2b76accbbe7f33c83816fb8ad69cc29590e9e2
This commit is contained in:
Matúš Kukan
2012-08-21 21:34:46 +02:00
parent 2855009f8f
commit 69a98d23e4
42 changed files with 12 additions and 291 deletions

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/accessories))
$(eval $(call gb_InstallModule_use_packages,scp2/accessories,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_localized_scpfiles,scp2/accessories,\
scp2/source/accessories/module_accessories \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/activex))
$(eval $(call gb_InstallModule_use_packages,scp2/activex,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_define_if_set,scp2/activex,\
BUILD_X64 \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/base))
$(eval $(call gb_InstallModule_use_packages,scp2/base,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_define_if_set,scp2/base,\
ENABLE_REPORTBUILDER \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/binfilter))
$(eval $(call gb_InstallModule_use_packages,scp2/binfilter,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_scpfiles,scp2/binfilter,\
scp2/source/binfilter/file_binfilter \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/calc))
$(eval $(call gb_InstallModule_use_packages,scp2/calc,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_define_if_set,scp2/calc,\
SYSTEM_LPSOLVE \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/canvas))
$(eval $(call gb_InstallModule_use_packages,scp2/canvas,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_scpfiles,scp2/canvas,\
scp2/source/canvas/canvascommons \
scp2/source/canvas/mtfrenderer \

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/crashrep))
$(eval $(call gb_InstallModule_use_packages,scp2/crashrep,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_scpfiles,scp2/crashrep,\
scp2/source/crashrep/file_crashrep \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/draw))
$(eval $(call gb_InstallModule_use_packages,scp2/draw,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_templates,scp2/draw,\
scp2/source/templates/module_langpack_draw \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/extensions))
$(eval $(call gb_InstallModule_use_packages,scp2/extensions,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_define_if_set,scp2/extensions,\
SYSTEM_BSH \
SYSTEM_RHINO \

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/gnome))
$(eval $(call gb_InstallModule_use_packages,scp2/gnome,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_define_if_set,scp2/gnome,\
ENABLE_EVOAB2 \
ENABLE_GCONF \

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/graphicfilter))
$(eval $(call gb_InstallModule_use_packages,scp2/graphicfilter,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_scpfiles,scp2/graphicfilter,\
scp2/source/graphicfilter/file_graphicfilter \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/impress))
$(eval $(call gb_InstallModule_use_packages,scp2/impress,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_define_if_set,scp2/impress,\
ENABLE_OPENGL \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/javafilter))
$(eval $(call gb_InstallModule_use_packages,scp2/javafilter,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_scpfiles,scp2/javafilter,\
scp2/source/javafilter/file_javafilter \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/kde))
$(eval $(call gb_InstallModule_use_packages,scp2/kde,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_define_if_set,scp2/kde,\
ENABLE_KDE \
ENABLE_KDE4 \

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/math))
$(eval $(call gb_InstallModule_use_packages,scp2/math,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_templates,scp2/math,\
scp2/source/templates/module_langpack_math \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/onlineupdate))
$(eval $(call gb_InstallModule_use_packages,scp2/onlineupdate,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_scpfiles,scp2/onlineupdate,\
scp2/source/onlineupdate/file_onlineupdate \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/ooo))
$(eval $(call gb_InstallModule_use_packages,scp2/ooo,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
DISABLE_ATL \
DISABLE_NEON \

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/python))
$(eval $(call gb_InstallModule_use_packages,scp2/python,\
scp2_inc \
scp2_langmacros \
))
ifeq ($(DISABLE_PYTHON),TRUE)
$(eval $(call gb_InstallModule_add_defs,scp2/python,\
-DDISABLE_PYUNO \

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/quickstart))
$(eval $(call gb_InstallModule_use_packages,scp2/quickstart,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_scpfiles,scp2/quickstart,\
scp2/source/quickstart/file_quickstart \
scp2/source/quickstart/registryitem_quickstart \

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/sdkoo))
$(eval $(call gb_InstallModule_use_packages,scp2/sdkoo,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_scpfiles,scp2/sdkoo,\
scp2/source/sdkoo/sdkoo \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/smoketest))
$(eval $(call gb_InstallModule_use_packages,scp2/smoketest,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_scpfiles,scp2/smoketest,\
scp2/source/smoketest/smoketest \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/stdlibs))
$(eval $(call gb_InstallModule_use_packages,scp2/stdlibs,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_scpfiles,scp2/stdlibs,\
scp2/source/stdlibs/file_stdlibs \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/tde))
$(eval $(call gb_InstallModule_use_packages,scp2/tde,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_define_if_set,scp2/tde,\
ENABLE_TDE \
ENABLE_TDEAB \

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/ure))
$(eval $(call gb_InstallModule_use_packages,scp2/ure,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_define_if_set,scp2/ure,\
SYSTEM_LIBXML \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/ure_standalone))
$(eval $(call gb_InstallModule_use_packages,scp2/ure_standalone,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_scpfiles,scp2/ure_standalone,\
scp2/source/ooo/ure_standalone \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/windows))
$(eval $(call gb_InstallModule_use_packages,scp2/windows,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_define_if_set,scp2/windows,\
BUILD_X64 \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/winexplorerext))
$(eval $(call gb_InstallModule_use_packages,scp2/winexplorerext,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_define_if_set,scp2/winexplorerext,\
BUILD_X64 \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/writer))
$(eval $(call gb_InstallModule_use_packages,scp2/writer,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_templates,scp2/writer,\
scp2/source/templates/module_langpack_writer \
))

View File

@@ -27,11 +27,6 @@
$(eval $(call gb_InstallModule_InstallModule,scp2/xsltfilter))
$(eval $(call gb_InstallModule_use_packages,scp2/xsltfilter,\
scp2_inc \
scp2_langmacros \
))
$(eval $(call gb_InstallModule_add_scpfiles,scp2/xsltfilter,\
scp2/source/xsltfilter/file_xsltfilter \
))

View File

@@ -50,8 +50,6 @@ $(eval $(call gb_Module_add_targets,scp2,\
InstallScript_sdkoo \
InstallScript_setup_osl \
InstallScript_test \
Package_inc \
Package_langmacros \
$(if $(filter WNT,$(GUI)),\
InstallModule_activex \
InstallModule_quickstart \

View File

@@ -1,32 +0,0 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License or as specified alternatively below. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# Major Contributor(s):
# Copyright (C) 2012 Red Hat, Inc., David Tardon <dtardon@redhat.com>
# (initial developer)
#
# All Rights Reserved.
#
# For minor contributions see the git repository.
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_Package_Package,scp2_inc,$(SRCDIR)/scp2/inc))
$(eval $(call gb_Package_add_file,scp2_inc,inc/macros.inc,macros.inc))
# vim: set shiftwidth=4 tabstop=4 noexpandtab:

View File

@@ -1,32 +0,0 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License or as specified alternatively below. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# Major Contributor(s):
# Copyright (C) 2012 Red Hat, Inc., David Tardon <dtardon@redhat.com>
# (initial developer)
#
# All Rights Reserved.
#
# For minor contributions see the git repository.
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_Package_Package,scp2_langmacros,$(call gb_CustomTarget_get_workdir,scp2/macros)))
$(eval $(call gb_Package_add_file,scp2_langmacros,inc/langmacros.inc,langmacros.inc))
# vim: set shiftwidth=4 tabstop=4 noexpandtab:

View File

@@ -40,23 +40,15 @@ $(call gb_InstallModule_get_clean_target,%) :
define gb_InstallModule_InstallModule
$(call gb_InstallModuleTarget_InstallModuleTarget,$(1))
$(call gb_Package_Package_internal,$(1)_par,$(call gb_InstallModuleTarget_get_workdir,$(1)))
$(call gb_InstallModule_get_target,$(1)) : $(call gb_InstallModuleTarget_get_target,$(1))
$(call gb_InstallModule_get_target,$(1)) : $(call gb_Package_get_target,$(1)_par)
$(call gb_InstallModule_get_target,$(1)) :| $(dir $(call gb_InstallModule_get_target,$(1))).dir
$(call gb_InstallModule_get_clean_target,$(1)) : $(call gb_InstallModuleTarget_get_clean_target,$(1))
$(call gb_InstallModule_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(1)_par)
$$(eval $$(call gb_Module_register_target,$(call gb_InstallModule_get_target,$(1)),$(call gb_InstallModule_get_clean_target,$(1))))
endef
define gb_InstallModule_set_include
$(call gb_InstallModuleTarget_set_include,$(1),$(2))
endef
define gb_InstallModule_add_defs
$(call gb_InstallModuleTarget_add_defs,$(1),$(2))
@@ -77,52 +69,23 @@ $(call gb_InstallModuleTarget_define_mingw_dll_if_set,$(1),$(2))
endef
define gb_InstallModule_use_package
$(call gb_InstallModuleTarget_use_package,$(1),$(2))
endef
define gb_InstallModule_use_packages
$(call gb_InstallModuleTarget_use_packages,$(1),$(2))
endef
define gb_InstallModule__add_scpfile_impl
$(call gb_Package_add_file,$(1)_par,par/osl/$(notdir $(2)),$(2))
endef
define gb_InstallModule__add_scpfile
$(call gb_InstallModule__add_scpfile_impl,$(1),$(dir $(2))$(notdir $(call gb_ScpTarget_get_target,$(2))))
endef
define gb_InstallModule__add_scpfiles
$(foreach scpfile,$(2),$(call gb_InstallModule__add_scpfile,$(1),$(scpfile)))
endef
define gb_InstallModule_add_scpfile
$(call gb_InstallModuleTarget_add_scpfile,$(1),$(2))
$(call gb_InstallModule__add_scpfile,$(1),$(2))
endef
define gb_InstallModule_add_scpfiles
$(call gb_InstallModuleTarget_add_scpfiles,$(1),$(2))
$(call gb_InstallModule__add_scpfiles,$(1),$(2))
endef
define gb_InstallModule_add_localized_scpfile
$(call gb_InstallModuleTarget_add_localized_scpfile,$(1),$(2))
$(call gb_InstallModule__add_scpfile,$(1),$(2))
endef
define gb_InstallModule_add_localized_scpfiles
$(call gb_InstallModuleTarget_add_localized_scpfiles,$(1),$(2))
$(call gb_InstallModule__add_scpfiles,$(1),$(2))
endef

View File

@@ -212,7 +212,6 @@ $(call gb_Output_announce,SCP:$(2),$(true),DEP,2)
$(call gb_Helper_abbreviate_dirs,\
$(gb_ScpTarget_DEPCOMMAND) \
$(SCPDEFS) $(SCP_DEFS) -DDLLPOSTFIX=$(gb_Library_DLLPOSTFIX) \
$(SCP_INCLUDE) $(SCP_TEMPLATE_INCLUDE) \
-f $(1) \
-p \
)
@@ -295,18 +294,14 @@ $(call gb_InstallModuleTarget_get_external_target,$(1)) :| \
$(call gb_InstallModuleTarget_get_target,$(1)) : SCP_FILES :=
$(call gb_InstallModuleTarget_get_target,$(1)) : SCP_DEFS :=
$(call gb_InstallModuleTarget_get_target,$(1)) : SCP_INCLUDE :=
$(call gb_InstallModuleTarget_get_target,$(1)) : SCP_INCLUDE := -I$(SRCDIR)/scp2/inc
$(call gb_InstallModuleTarget_get_target,$(1)) : SCP_TEMPLATE_INCLUDE :=
$(call gb_InstallModuleTarget_use_custom_headers,$(1),scp2/macros)
$(call gb_InstallModuleTarget_InstallModuleTarget_platform,$(1))
endef
define gb_InstallModuleTarget_set_include
$(call gb_InstallModuleTarget_get_target,$(1)) : SCP_INCLUDE := $(2)
endef
define gb_InstallModuleTarget_add_defs
$(call gb_InstallModuleTarget_get_target,$(1)) : SCP_DEFS += $(2)
@@ -333,13 +328,14 @@ $(call gb_InstallModuleTarget_add_defs,$(1),\
endef
define gb_InstallModuleTarget_use_package
$(call gb_InstallModuleTarget_get_external_target,$(1)) :| $(call gb_Package_get_target,$(2))
define gb_InstallModuleTarget_use_custom_header
$(call gb_InstallModuleTarget_get_external_target,$(1)) :| $(call gb_CustomTarget_get_target,$(2))
$(call gb_InstallModuleTarget_get_target,$(1)) : SCP_INCLUDE += -I$(call gb_CustomTarget_get_workdir,$(2)) \
endef
define gb_InstallModuleTarget_use_packages
$(foreach package,$(2),$(call gb_InstallModuleTarget_use_package,$(1),$(package)))
define gb_InstallModuleTarget_use_custom_headers
$(foreach customtarget,$(2),$(call gb_InstallModuleTarget_use_custom_header,$(1),$(customtarget)))
endef

View File

@@ -36,6 +36,10 @@ define gb_InstallScriptTarget__get_files
$(notdir $(shell cat $(foreach module,$(1),$(call gb_InstallModule_get_filelist,$(module)))))
endef
define gb_InstallScriptTarget__get_dirs
$(sort $(dir $(shell cat $(foreach module,$(1),$(call gb_InstallModule_get_filelist,$(module))))))
endef
# Pass first arg if make is running in silent mode, second arg otherwise
define gb_InstallScriptTarget__if_silent
$(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),$(1),$(2))
@@ -50,7 +54,7 @@ $(call gb_Helper_abbreviate_dirs,\
) && \
$(gb_InstallScriptTarget_COMMAND) \
$(call gb_InstallScriptTarget__if_silent,-q) \
-i $(OUTDIR)/par/osl \
-i $(call gb_InstallScriptTarget__get_dirs,$(SCP_MODULES)) \
-o $(1) \
@@$${RESPONSEFILE} && \
rm -f $${RESPONSEFILE} \

View File

@@ -102,7 +102,6 @@ gb_InstallModule_get_target = $(WORKDIR)/InstallModule/$(1).done
gb_InstallModuleTarget_get_external_target = $(WORKDIR)/InstallModuleTarget/$(1).external
gb_InstallModuleTarget_get_filelist = $(WORKDIR)/InstallModuleTarget/$(1).filelist
gb_InstallModuleTarget_get_target = $(WORKDIR)/InstallModuleTarget/$(1).filelist
gb_InstallModuleTarget_get_workdir = $(patsubst %/,%,$(dir $(call gb_ScpTarget_get_target,%)))
gb_InstallScriptTarget_get_target = $(WORKDIR)/InstallScriptTarget/$(1)$(gb_InstallScript_EXT)
gb_Jar_get_target = $(WORKDIR)/Jar/$(1).jar
gb_Jar_get_classsetname = Jar/$(1)

View File

@@ -304,11 +304,6 @@ $(call gb_InstallModuleTarget_add_defs,$(1),\
$(if $(filter TRUE,$(SOLAR_JAVA)),-DSOLAR_JAVA) \
)
$(call gb_InstallModuleTarget_set_include,$(1),\
$(SOLARINC) \
$(SCP_INCLUDE) \
)
endef
# ScpConvertTarget class

View File

@@ -441,11 +441,6 @@ $(call gb_InstallModuleTarget_add_defs,$(1),\
$(if $(filter TRUE,$(SOLAR_JAVA)),-DSOLAR_JAVA) \
)
$(call gb_InstallModuleTarget_set_include,$(1),\
$(SOLARINC) \
$(SCP_INCLUDE) \
)
endef
# ScpConvertTarget class

View File

@@ -719,11 +719,6 @@ $(call gb_InstallModuleTarget_add_defs,$(1),\
$(if $(filter TRUE,$(SOLAR_JAVA)),-DSOLAR_JAVA) \
)
$(call gb_InstallModuleTarget_set_include,$(1),\
$(SOLARINC) \
$(SCP_INCLUDE) \
)
endef
# ScpConvertTarget class

View File

@@ -416,11 +416,6 @@ $(call gb_InstallModuleTarget_add_defs,$(1),\
$(if $(filter TRUE,$(SOLAR_JAVA)),-DSOLAR_JAVA) \
)
$(call gb_InstallModuleTarget_set_include,$(1),\
$(SOLARINC) \
$(SCP_INCLUDE) \
)
endef
# ScpConvertTarget class

View File

@@ -413,11 +413,6 @@ $(call gb_InstallModuleTarget_add_defs,$(1),\
$(if $(filter TRUE,$(SOLAR_JAVA)),-DSOLAR_JAVA) \
)
$(call gb_InstallModuleTarget_set_include,$(1),\
$(SOLARINC) \
$(SCP_INCLUDE) \
)
endef
# ScpConvertTarget class

View File

@@ -415,11 +415,6 @@ $(call gb_InstallModuleTarget_add_defs,$(1),\
$(if $(filter TRUE,$(SOLAR_JAVA)),-DSOLAR_JAVA) \
)
$(call gb_InstallModuleTarget_set_include,$(1),\
$(SOLARINC) \
$(SCP_INCLUDE) \
)
endef
# ScpConvertTarget class