Kaydet (Commit) ba45e347 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

more multi-repo work for modules

üst f92fe3c2
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2009 by Sun Microsystems, Inc.
#
# 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.
#
#*************************************************************************
gb_Executable_UREBIN := \
gb_Executable_SDK := \
gb_Executable_OOO := \
gb_Executable_BRAND := \
# not installed
gb_Executable_NONE := \
mkunroll \
rscdep \
so_checksum \
sspretty \
bmp \
bmpsum \
g2g \
gb_Library_OOOLIBS :=\
avmedia \
basegfx \
cui \
drawinglayer \
fwe \
fwi \
fwk \
fwl \
fwm \
go \
lng \
msfilter \
msword \
sax \
sb \
sfx \
sot \
svl \
svt \
svx \
svxcore \
sw \
swd \
swui \
textconversiondlgs \
tk \
tl \
utl \
vbahelper \
vcl \
xo \
xof \
xcr \
gb_Library_PLAINLIBS_URE :=\
xml2 \
gb_Library_PLAINLIBS_OOO :=\
icuuc \
gb_Library_PLAINLIBS := \
$(gb_Library_PLAINLIBS_URE) \
$(gb_Library_PLAINLIBS_OOO) \
# => OOOLIB
gb_Library_RTLIBS :=\
comphelper \
i18nisolang1 \
i18nutil \
ucbhelper \
# => URELIB
gb_Library_RTVERLIBS :=\
cppuhelper \
salhelper \
# => URELIB
gb_Library_STLLIBS :=\
stl \
gb_Library_UNOLIBS_URE := \
gb_Library_UNOLIBS_OOO := \
fsstorage \
hatchwindowfactory \
passwordcontainer \
productregistration \
vbaswobj \
gb_Library_UNOLIBS := \
$(gb_Library_UNOLIBS_URE) \
$(gb_Library_UNOLIBS_OOO) \
# => URELIB
gb_Library_UNOVERLIBS :=\
jvmfwk \
cppu \
sal \
gb_StaticLibrary_PLAINLIBS :=\
salcpprt \
jpeglib \
zlib \
# vim: set noet sw=4 ts=4:
This diff is collapsed.
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2009 by Sun Microsystems, Inc.
#
# 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.
#
#*************************************************************************
# Executable class
# defined by platform
# gb_Executable_TARGETTYPEFLAGS
# gb_Executable_Executable_platform
.PHONY : $(call gb_Executable_get_clean_target,%)
$(call gb_Executable_get_clean_target,%) :
$(call gb_Helper_abbreviate_dirs,\
rm -f $(call gb_Executable_get_target,$*))
$(call gb_Executable_get_target,%) :
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && cp -pf $< $@)
define gb_Executable_Executable
$(call gb_Executable__Executable_impl,$(1),Executable/$(1)$(gb_Executable_EXT))
endef
define gb_Executable__Executable_impl
$(call gb_LinkTarget_LinkTarget,$(2))
$(call gb_LinkTarget_set_targettype_flags,$(2),$(gb_Executable_TARGETTYPEFLAGS) $(call gb_LinkTarget_get_rpath,$(2),$(1)))
$(call gb_Executable_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2))
$(call gb_Executable_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
$(call gb_Executable_Executable_platform,$(1),$(2))
$(call gb_Module_register_target,$(call gb_Executable_get_target,$(1)),$(call gb_Executable_get_clean_target,$(1)))
endef
define gb_Executable_forward_to_Linktarget
gb_Executable_$(1) = $$(call gb_LinkTarget_$(1),Executable/$$(1)$$(gb_Executable_EXT),$$(2))
endef
$(eval $(foreach method,\
add_cobject \
add_cobjects \
add_cxxobject \
add_cxxobjects \
add_objcxxobject \
add_objcxxobjects \
add_exception_objects \
add_noexception_objects \
set_cflags \
set_cxxflags \
set_objcxxflags \
set_defs \
set_include \
set_ldflags \
set_library_path_flags \
add_linked_libs \
add_linked_static_libs \
add_package_headers \
add_sdi_headers \
add_precompiled_header \
,\
$(call gb_Executable_forward_to_Linktarget,$(method))\
))
# vim: set noet sw=4 ts=4:
# -*- Mode: GNUmakefile; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2009 by Sun Microsystems, Inc.
#
# 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.
#
#*************************************************************************
define NEWLINE
endef
COMMA :=,
gb_Helper_NULLFILE := /dev/null
gb_Helper_MISC := $(WORKDIR)/Misc
gb_Helper_PHONY := $(gb_Helper_MISC)/PHONY
gb_Helper_MISCDUMMY := $(gb_Helper_MISC)/DUMMY
.PHONY : $(WORKDIR)/Misc/PHONY
$(gb_Helper_MISCDUMMY) :
@mkdir -p $(dir $@) && touch $@
define gb_Helper_announce
$(info $(1))
endef
define gb_Helper_abbreviate_dirs
R=$(REPODIR) && \
$(subst $(REPODIR)/,$$R/,S=$(SRCDIR) && \
$(subst $(SRCDIR)/,$$S/,O=$(OUTDIR)) && \
$(subst $(SRCDIR)/,$$S/,$(subst $(OUTDIR)/,$$O/,W=$(WORKDIR) && $(subst $(WORKDIR)/,$$W/,$(1)))))
endef
define gb_Helper_make_clean_target
gb_$(1)_get_clean_target = $(WORKDIR)/Clean/$(1)/$$(1)
endef
define gb_Helper_make_outdir_clean_target
gb_$(1)_get_clean_target = $$(subst $(OUTDIR)/,$(WORKDIR)/Clean/OutDir/,$$(call gb_$(1)_get_target,$$(1)))
endef
define gb_Helper_make_dep_target
gb_$(1)_get_dep_target = $(WORKDIR)/Dep/$(1)/$$(1).d
endef
define gb_Helper_make_clean_targets
$(foreach targettype,$(1),\
$(call gb_Helper_make_clean_target,$(targettype)))
endef
define gb_Helper_make_outdir_clean_targets
$(foreach targettype,$(1),\
$(call gb_Helper_make_outdir_clean_target,$(targettype)))
endef
define gb_Helper_make_dep_targets
$(foreach targettype,$(1),\
$(call gb_Helper_make_dep_target,$(targettype)))
endef
define gb_Helper_get_outdir_clean_target
$$(subst $(OUTDIR)/,$(WORKDIR)/Clean/OutDir/,$(1))
endef
# vim: set noet sw=4 ts=4:
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2009 by Sun Microsystems, Inc.
#
# 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.
#
#*************************************************************************
# Library class
# defined globally in gbuild.mk
# gb_Library_OUTDIRLOCATION := $(OUTDIR)/lib
# gb_Library_DLLDIR := $(WORKDIR)/LinkTarget/Library
# defined by platform
# gb_Library_DEFS
# gb_Library_DLLFILENAMES
# gb_Library_FILENAMES
# gb_Library_TARGETS
# gb_Library_TARGETTYPEFLAGS
# gb_Library_Library_platform
.PHONY : $(WORKDIR)/Clean/OutDir/lib/%$(gb_Library_PLAINEXT)
$(WORKDIR)/Clean/OutDir/lib/%$(gb_Library_PLAINEXT) : $(call gb_LinkTarget_get_clean_target,$(call gb_Library_get_linktargetname,%$(gb_Library_PLAINEXT)))
$(call gb_Helper_abbreviate_dirs,\
rm -f $(OUTDIR)/lib/$*$(gb_Library_PLAINEXT))
$(gb_Library_OUTDIRLOCATION)/%$(gb_Library_PLAINEXT) :
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && cp -pf $< $@)
define gb_Library_Library
ifeq (,$$(findstring $(1),$$(gb_Library_KNOWNLIBS)))
$$(info currently known libraries are: $(sort $(gb_Library_KNOWNLIBS)))
$$(error Library $(1) must be registered in $(GBUILDDIR)/inc/libnames.mk)
endif
$(call gb_Library__Library_impl,$(1),$(call gb_Library_get_linktargetname,$(call gb_Library_get_filename,$(1))))
endef
define gb_Library__Library_impl
$(call gb_LinkTarget_LinkTarget,$(2))
$(call gb_LinkTarget_set_targettype_flags,$(2),$(gb_Library_TARGETTYPEFLAGS) $(call gb_LinkTarget_get_rpath,$(2),$(1)))
$(call gb_LinkTarget_set_defs,$(2),\
$$(DEFS) \
$(gb_Library_DEFS) \
)
$(call gb_Library_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2))
$(call gb_Library_Library_platform,$(1),$(2),$(gb_Library_DLLDIR)/$(call gb_Library_get_dllname,$(1)))
$(call gb_Module_register_target,$(call gb_Library_get_target,$(1)),$(call gb_Library_get_clean_target,$(1)))
endef
define gb_Library__forward_to_Linktarget
gb_Library_$(1) = $$(call gb_LinkTarget_$(1),$(call gb_Library_get_linktargetname,$$(call gb_Library_get_filename,$$(1))),$$(2))
endef
$(eval $(foreach method,\
add_cobject \
add_cobjects \
add_cxxobject \
add_cxxobjects \
add_objcxxobject \
add_objcxxobjects \
add_exception_objects \
add_noexception_objects \
set_cflags \
set_cxxflags \
set_objcxxflags \
set_defs \
set_include \
set_ldflags \
set_library_path_flags \
add_linked_libs \
add_linked_static_libs \
add_package_headers \
add_sdi_headers \
add_precompiled_header \
,\
$(call gb_Library__forward_to_Linktarget,$(method))\
))
# vim: set noet sw=4 ts=4:
This diff is collapsed.
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2009 by Sun Microsystems, Inc.
#
# 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.
#
#*************************************************************************
# Module class
gb_Module_ALLMODULES :=
gb_Module_MODULELOCATIONS :=
gb_Module_TARGETSTACK :=
gb_Module_CLEANTARGETSTACK :=
gb_Module_CURRENTBASEDIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
.PHONY : $(call gb_Module_get_clean_target,%)
$(call gb_Module_get_clean_target,%) :
$(call gb_Helper_announce,Cleaning up module $* ...)
-$(call gb_Helper_abbreviate_dirs,\
rm -f $(call gb_Module_get_target,$*))
$(call gb_Module_get_target,%) :
$(call gb_Helper_announce,Completed module $* ...)
-$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && \
touch $@)
all :
$(call gb_Helper_announce,Build for modules $(foreach module,$^,$(notdir $(module))) finished (loaded modules: $(sort $(gb_Module_ALLMODULES))).)
clean :
$(call gb_Helper_announce,Cleanup for modules $(foreach module,$^,$(notdir $(module))) finished (loaded modules: $(sort $(gb_Module_ALLMODULES))).)
.PHONY : all clean
.DEFAULT_GOAL := all
define gb_Module_Module
gb_Module_ALLMODULES += $(1)
gb_Module_MODULELOCATIONS += $(1):$(dir $(realpath $(lastword $(MAKEFILE_LIST))))
$(call gb_Module_register_target,$(call gb_Module_get_target,$(1)),$(call gb_Module_get_clean_target,$(1)))
endef
# include the file and pop one target from each stack
define gb_Module_add_target
include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))/$(2).mk
$(call gb_Module_get_target,$(1)) : $$(firstword $$(gb_Module_TARGETSTACK))
$(call gb_Module_get_clean_target,$(1)) : $$(firstword $$(gb_Module_CLEANTARGETSTACK))
gb_Module_TARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_TARGETSTACK)),$$(gb_Module_TARGETSTACK))
gb_Module_CLEANTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CLEANTARGETSTACK)),$$(gb_Module_CLEANTARGETSTACK))
endef
define gb_Module_add_moduledir
$(call gb_Module_add_target,$(1),$(2)/Module_$(2))
endef
define gb_Module_add_targets
$(foreach target,$(2),$(call gb_Module_add_target,$(1),$(target)))
endef
define gb_Module_add_moduledirs
$(foreach target,$(2),$(call gb_Module_add_moduledir,$(1),$(target)))
endef
define gb_Module_set_current_repo
gb_Module_CURRENTBASEDIR := $$(dir $$(realpath $$(lastword $$(MAKEFILE_LIST))))
endef
define gb_Module_make_global_targets
ifneq ($$(gb_Module_TARGETSTACK),)
$$(warn corrupted module target stack!)
endif
$(call gb_Module__add_toplevel_module,$$(firstword $(1) $$(notdir $$(patsubst %/,%,$$(gb_Module_CURRENTBASEDIR)))))
include $$(gb_Module_CURRENTBASEDIR)Module_$$(firstword $(1) $$(notdir $$(patsubst %/,%,$$(gb_Module_CURRENTBASEDIR)))).mk
all : $$(firstword $$(gb_Module_TARGETSTACK))
clean : $$(firstword $$(gb_Module_CLEANTARGETSTACK))
ifneq ($$(words $$(gb_Module_TARGETSTACK)),1)
$$(warn corrupted module target stack!)
endif
gb_Module_TARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_TARGETSTACK)),$$(gb_Module_TARGETSTACK))
gb_Module_CLEANTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CLEANTARGETSTACK)),$$(gb_Module_CLEANTARGETSTACK))
ifneq ($$(gb_Module_TARGETSTACK),)
$$(warn corrupted module target stack!)
endif
endef
# vim: set noet sw=4 ts=4:
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2009 by Sun Microsystems, Inc.
#
# 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.
#
#*************************************************************************
# PackagePart class
$(foreach destination,$(call gb_PackagePart_get_destinations), $(destination)/%) :
mkdir -p $(dir $@) && cp -pf $< $@
define gb_PackagePart_PackagePart
$(OUTDIR)/$(1) : $(2)
endef
# Package class
.PHONY : $(call gb_Package_get_clean_target,%)
$(call gb_Package_get_clean_target,%) :
$(call gb_Helper_announce,Cleaning up package $* ...)
-$(call gb_Helper_abbreviate_dirs,\
rm -f $(FILES))
$(call gb_Package_get_target,%) :
$(call gb_Helper_announce,Copied all for package $* ...)
mkdir -p $(dir $@) && touch $@
define gb_Package_Package
gb_TARGET_PACKAGE_$(1)_SOURCEDIR := $(2)
$(call gb_Package_get_clean_target,$(1)) : FILES := $(call gb_Package_get_target,$(1))
$(call gb_Module_register_target,$(call gb_Package_get_target,$(1)),$(call gb_Package_get_clean_target,$(1)))
endef
define gb_Package_add_file
$(call gb_Package_get_target,$(1)) : $(OUTDIR)/$(2)
$(call gb_Package_get_clean_target,$(1)) : FILES += $(OUTDIR)/$(2)
$(call gb_PackagePart_PackagePart,$(2),$$(gb_TARGET_PACKAGE_$(1)_SOURCEDIR)/$(3))
$(OUTDIR)/$(2) : $$(gb_TARGET_PACKAGE_$(1)_SOURCEDIR)/$(3)
endef
# vim: set noet sw=4 ts=4:
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 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.
#
#*************************************************************************
# PrecompiledHeader class
ifeq ($(gb_ENABLE_PCH),$(true))
# gb_PrecompiledHeader_get_enableflags defined by platform
ifeq ($(gb_DEBUGLEVEL),2)
gb_PrecompiledHeader_DEBUGDIR := debug
gb_NoexPrecompiledHeader_DEBUGDIR := debug
else
gb_PrecompiledHeader_DEBUGDIR := nodebug
gb_NoexPrecompiledHeader_DEBUGDIR := nodebug
endif
$(call gb_PrecompiledHeader_get_dep_target,%) :
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && \
echo '$(call gb_PrecompiledHeader_get_target,$*) : $$(gb_Helper_PHONY)' > $@)
$(call gb_NoexPrecompiledHeader_get_dep_target,%) :
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && \
echo '$(call gb_NoexPrecompiledHeader_get_target,$*) : $$(gb_Helper_PHONY)' > $@)
$(call gb_PrecompiledHeader_get_target,%) :
$(call gb_PrecompiledHeader__command,$@,$*,$<,$(PCH_DEFS),$(PCH_CXXFLAGS) $(gb_PrecompiledHeader_EXCEPTIONFLAGS),$(INCLUDE_STL) $(INCLUDE))
$(call gb_NoexPrecompiledHeader_get_target,%) :
$(call gb_NoexPrecompiledHeader__command,$@,$*,$<,$(PCH_DEFS),$(PCH_CXXFLAGS) $(gb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS),$(INCLUDE_STL) $(INCLUDE))
.PHONY : $(call gb_PrecompiledHeader_get_clean_target,%) $(call gb_NoExPrecompiledHeader_get_clean_target,%)
$(call gb_PrecompiledHeader_get_clean_target,%) :
$(call gb_Helper_announce,Cleaning up pch $* ...)
-$(call gb_Helper_abbreviate_dirs,\
rm -f $(call gb_PrecompiledHeader_get_target,$*) \
$(call gb_PrecompiledHeader_get_dep_target,$*))
$(call gb_NoexPrecompiledHeader_get_clean_target,%) :
$(call gb_Helper_announce,Cleaning up noex pch $* ...)
-$(call gb_Helper_abbreviate_dirs,\
rm -f $(call gb_NoexPrecompiledHeader_get_target,$*) \
$(call gb_NoexPrecompiledHeader_get_dep_target,$*))
endif
# vim: set noet sw=4 ts=4:
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 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.
#
#*************************************************************************
# SdiTarget class
gb_SdiTarget_SVIDLTARGET := $(call gb_Executable_get_target,svidl)
gb_SdiTarget_SVIDLAUXDEPS := $(call gb_Library_get_target,tl) $(call gb_Library_get_target,sal)
gb_SdiTarget_SVIDLCOMMAND := $(gb_SdiTarget_SVIDLPRECOMMAND) $(gb_SdiTarget_SVIDLTARGET)
$(call gb_SdiTarget_get_target,%) : $(SRCDIR)/%.sdi | $(gb_SdiTarget_SVIDLTARGET) $(gb_SdiTarget_SVIDLAUXDEPS)
$(call gb_Helper_announce,Processing sdi $* ...)
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(WORKDIR)/inc/$*) $(dir $@))
$(call gb_Helper_abbreviate_dirs_native,\
cd $(dir $<) && \
$(gb_SdiTarget_SVIDLCOMMAND) -quiet \
$(INCLUDE) \
-fs$@.hxx \
-fd$@.ilb \
-fl$@.lst \
-fz$@.sid \
-fx$(EXPORTS) \
-fm$@ \
$<)
.PHONY : $(call gb_SdiTarget_get_clean_target,%)
$(call gb_SdiTarget_get_clean_target,%) :
$(call gb_Helper_announce,Cleaning up sdi $* ...)
-$(call gb_Helper_abbreviate_dirs,\
rm -f $(foreach ext,.hxx .ilb .lst .sid,\
$(call gb_SdiTarget_get_target,$*)$(ext)) \
$(call gb_SdiTarget_get_target,$*))
define gb_SdiTarget_SdiTarget
$(call gb_SdiTarget_get_target,$(1)) : INCLUDE := -I$(WORKDIR)/inc/ $$(subst -I. ,-I$$(dir $(SRCDIR)/$(1)) ,$$(SOLARINC))
$(call gb_SdiTarget_get_target,$(1)) : EXPORTS := $(SRCDIR)/$(2).sdi
endef
define gb_SdiTarget_set_include
$(call gb_SdiTarget_get_target,$(1)) : INCLUDE := $(2)
endef
# vim: set noet sw=4 ts=4:
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2009 by Sun Microsystems, Inc.
#
# 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.
#
#*************************************************************************
# Static Library class
# defined globally in gbuild.mk
# gb_StaticLibrary_OUTDIRLOCATION := $(OUTDIR)/lib
# defined by platform
# gb_StaticLibrary_DEFS
# gb_StaticLibrary_FILENAMES
# gb_StaticLibrary_TARGETS
# gb_StaticLibrary_TARGETTYPEFLAGS
.PHONY : $(WORKDIR)/Clean/OutDir/lib/%$(gb_StaticLibrary_PLAINEXT)
$(WORKDIR)/Clean/OutDir/lib/%$(gb_StaticLibrary_PLAINEXT) : $(call gb_LinkTarget_get_clean_target,$(call gb_Library_get_linktargetname,%$(gb_StaticLibrary_PLAINEXT)))
$(call gb_Helper_abbreviate_dirs,\
rm -f $(OUTDIR)/lib/$*$(gb_StaticLibrary_PLAINEXT))
$(gb_StaticLibrary_OUTDIRLOCATION)/%$(gb_StaticLibrary_PLAINEXT) :
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && cp -pf $< $@)
define gb_StaticLibrary_StaticLibrary
ifeq (,$$(findstring $(1),$$(gb_StaticLibrary_KNOWNLIBS)))
$$(info currently known static libraries are: $(sort $(gb_StaticLibrary_KNOWNLIBS)))
$$(error Library $(1) must be registered in $(GBUILDDIR)/libnames.mk)
endif
$(call gb_StaticLibrary__StaticLibrary_impl,$(1),$(call gb_StaticLibrary_get_linktargetname,$(call gb_StaticLibrary_get_filename,$(1))))
endef
define gb_StaticLibrary__StaticLibrary_impl
$(call gb_LinkTarget_LinkTarget,$(2))
$(call gb_LinkTarget_set_targettype_flags,$(2),$(gb_StaticLibrary_TARGETTYPEFLAGS))
$(call gb_LinkTarget_set_defs,$(2)),\
$$(DEFS) \
$(gb_StaticLibrary_DEFS) \
)
$(call gb_StaticLibrary_get_target,$(1)) : $(call gb_StaticLibrary_get_target,$(2))
endef
define gb_StaticLibrary_forward_to_Linktarget
gb_StaticLibrary_$(1) = $$(call gb_LinkTarget_$(1),$(call gb_Library_get_linktargetname,$$(call gb_Library_get_filename,$$(1))),$$(2))
endef
$(eval $(foreach method,\
add_cobject \
add_cobjects \
add_cxxobject \
add_cxxobjects \
add_objcxxobject \
add_objcxxobjects \
add_exception_objects \
add_noexception_objects \
set_cflags \
set_cxxflags \
set_objcxxflags \
set_defs \
set_include \
set_ldflags \
set_library_path_flags \
add_linked_libs \
add_linked_static_libs \
add_package_headers \
add_sdi_headers \
add_precompiled_header \
,\
$(call gb_StaticLibrary_forward_to_Linktarget,$(method))\
))
# vim: set noet sw=4 ts=4:
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2009 by Sun Microsystems, Inc.
#
# 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.
#
#*************************************************************************
# target patterns
gb_CObject_get_target = $(WORKDIR)/CObject/$(1).o
gb_CxxObject_get_target = $(WORKDIR)/CxxObject/$(1).o
gb_ObjCxxObject_get_target = $(WORKDIR)/ObjCxxObject/$(1).o
gb_LinkTarget_get_target = $(WORKDIR)/LinkTarget/$(1)
define gb_LinkTarget_get_layer
$(patsubst $(1):%,%,$(filter $(1):%,$(gb_LinkTarget_LAYER)))
endef
define gb_Library_get_filename
$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_FILENAMES)))
endef
define gb_Library_get_target
$(patsubst $(1):%,$(gb_Library_OUTDIRLOCATION)/%,$(filter $(filter $(1),$(gb_Library_TARGETS)):%,$(gb_Library_FILENAMES)))
endef
define gb_Library_get_external_headers_target
$(patsubst $(1):%,$(WORKDIR)/ExternalHeaders/Library/%,$(filter $(1):%,$(gb_Library_FILENAMES)))
endef
define gb_Library_get_headers_target
$(patsubst $(1):%,$(WORKDIR)/Headers/Library/%,$(filter $(1):%,$(gb_Library_FILENAMES)))
endef
define gb_StaticLibrary_get_filename
$(patsubst $(1):%,%,$(filter $(1):%,$(gb_StaticLibrary_FILENAMES)))
endef
define gb_StaticLibrary_get_target
$(patsubst $(1):%,$(gb_StaticLibrary_OUTDIRLOCATION)/%,$(filter $(filter $(1),$(gb_StaticLibrary_TARGETS)):%,$(gb_StaticLibrary_FILENAMES)))
endef
define gb_StaticLibrary_get_external_headers_target
$(patsubst $(1):%,$(WORKDIR)/ExternalHeaders/StaticLibrary/%,$(filter $(1):%,$(gb_StaticLibrary_FILENAMES)))
endef
define gb_StaticLibrary_get_headers_target
$(patsubst $(1):%,$(WORKDIR)/Headers/StaticLibrary/%,$(filter $(1):%,$(gb_StaticLibrary_FILENAMES)))
endef
gb_Executable_get_target = $(OUTDIR)/bin/$(1)$(gb_Executable_EXT)
gb_SdiTarget_get_target = $(WORKDIR)/SdiTarget/$(1)
gb_SrsPartMergeTarget_get_target = $(WORKDIR)/SrsPartMergeTarget/$(1)
gb_SrsPartTarget_get_target = $(WORKDIR)/SrsPartTarget/$(1)
gb_SrsTarget_get_target = $(WORKDIR)/SrsTarget/$(1).srs
gb_ResTarget_get_target = $(OUTDIR)/misc/res/$(1).res
gb_AllLangResTarget_get_target = $(OUTDIR)/misc/AllLangRes/$(1)
gb_PackagePart_get_target = $(OUTDIR)/$(1)
gb_Package_get_target = $(OUTDIR)/misc/Package/$(1)
gb_Module_get_target = $(OUTDIR)/misc/Module/$(1)
gb_PrecompiledHeader_get_target = $(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.pch
gb_NoexPrecompiledHeader_get_target = $(WORKDIR)/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR)/$(1).hxx.pch
$(eval $(call gb_Helper_make_clean_targets,\
LinkTarget \
PackagePart \
SdiTarget \
SrsTarget \
PrecompiledHeader \
NoexPrecompiledHeader \
))
$(eval $(call gb_Helper_make_outdir_clean_targets,\
AllLangResTarget \
Executable \
Library \
Module \
Package \
ResTarget \
))
$(eval $(call gb_Helper_make_dep_targets,\
CObject \
CxxObject \
ObjCxxObject \
LinkTarget \
SrsPartTarget \
SrsTarget \
PrecompiledHeader \
NoexPrecompiledHeader \
))
gb_Executable_get_external_headers_target = $(WORKDIR)/ExternalHeaders/Executable/$(1)
gb_Executable_get_headers_target = $(WORKDIR)/Headers/Executable/$(1)
gb_Library_get_linktargetname = Library/$(1)
gb_LinkTarget_get_external_headers_target = $(WORKDIR)/ExternalHeaders/$(1)
gb_LinkTarget_get_headers_target = $(WORKDIR)/Headers/$(1)
gb_PackagePart_get_destinations = $(OUTDIR)/xml $(OUTDIR)/inc
gb_ResTarget_get_imagelist_target = $(OUTDIR)/res/img/$(1).ilst
define gb_Module_register_target
gb_Module_TARGETSTACK := $(1) $(gb_Module_TARGETSTACK)
gb_Module_CLEANTARGETSTACK := $(2) $(gb_Module_CLEANTARGETSTACK)
endef
# vim: set noet sw=4 ts=4:
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