2011-08-09 12:12:48 -05:00
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
2010-11-05 12:56:07 -05:00
#*************************************************************************
#
# 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.
#
#*************************************************************************
gb_ComponentTarget_REPOS := $( gb_REPOS)
2010-11-09 11:47:26 -06:00
gb_ComponentTarget_XSLTCOMMANDFILE := $( SOLARENV) /bin/createcomponent.xslt
2010-11-05 12:56:07 -05:00
gb_ComponentTarget_get_source = $( 1) /$( 2) .component
d e f i n e g b _ C o m p o n e n t T a r g e t _ _ c o m m a n d
2010-11-12 05:43:33 -06:00
$( call gb_Output_announce ,$ ( 3) ,$ ( true ) ,CMP ,1)
2010-11-05 12:56:07 -05:00
$( call gb_Helper_abbreviate_dirs_native ,\
2011-03-11 07:30:09 -06:00
mkdir -p $( dir $( 1) ) && \
$( gb_XSLTPROC) --nonet --stringparam uri \
'$(subst \d,$$,$(COMPONENTPREFIX))$(LIBFILENAME)' -o $( 1) \
2011-03-16 08:52:18 -05:00
$( gb_ComponentTarget_XSLTCOMMANDFILE) $( realpath $( 2) ) )
2010-11-05 12:56:07 -05:00
e n d e f
2011-03-14 11:45:57 -05:00
# creates 2 componentfiles: the first is for the installation set,
# the second is for using the component during the build.
# bit of a hack, hopefully inbuild can be removed when solver layout is fixed.
2010-11-05 12:56:07 -05:00
d e f i n e g b _ C o m p o n e n t T a r g e t _ _ r u l e s
2011-03-14 11:45:57 -05:00
$$ (call gb_ComponentTarget_get_inbuild_target,%) : $$( call gb_ComponentTarget_get_source ,$ ( 1) ,%) | $( gb_XSLTPROCTARGET )
$$ ( call gb_ComponentTarget__command,$$ @,$$ <,$$ *)
2010-11-05 12:56:07 -05:00
2011-03-14 11:45:57 -05:00
$$ (call gb_ComponentTarget_get_target,%) : $$( call gb_ComponentTarget_get_source ,$ ( 1) ,%) | $( gb_XSLTPROCTARGET )
$$ ( call gb_ComponentTarget__command,$$ @,$$ <,$$ *)
2010-11-06 16:40:38 -05:00
2010-11-05 12:56:07 -05:00
e n d e f
2011-03-14 11:45:57 -05:00
$(call gb_ComponentTarget_get_clean_target,%) :
2011-06-21 05:41:58 -05:00
$( call gb_Output_announce,$* ,$( false ) ,CMP,1)
2011-03-14 11:45:57 -05:00
rm -f $( call gb_ComponentTarget_get_outdir_target,$* ) \
$( call gb_ComponentTarget_get_target,$* ) \
$( call gb_ComponentTarget_get_outdir_inbuild_target,$* ) \
$( call gb_ComponentTarget_get_inbuild_target,$* ) \
2010-11-05 12:56:07 -05:00
$( foreach repo ,$ ( gb_ComponentTarget_REPOS ) ,$ ( eval $ ( call gb_ComponentTarget__rules ,$ ( repo ) ) ) )
$(call gb_ComponentTarget_get_target,%) :
2011-05-27 13:39:04 -05:00
$( eval $( call gb_Outpt_error,Unable to find component file $( call gb_ComponentTarget_get_source,,$* ) in the repositories: $( gb_ComponentTarget_REPOS) or xsltproc is missing.) )
2010-11-05 12:56:07 -05:00
2010-11-09 11:47:26 -06:00
$(call gb_ComponentTarget_get_external_target,%) :
2011-03-11 07:30:09 -06:00
$( call gb_Deliver_deliver,$<,$@ )
2010-11-09 11:47:26 -06:00
2010-11-05 12:56:07 -05:00
d e f i n e g b _ C o m p o n e n t T a r g e t _ C o m p o n e n t T a r g e t
2011-06-22 07:30:32 -05:00
$(call gb_ComponentTarget_get_target,$(1)) : COMPONENTPREFIX := $( 2)
$(call gb_ComponentTarget_get_target,$(1)) : LIBFILENAME := $( 3)
$(call gb_ComponentTarget_get_inbuild_target,$(1)) : COMPONENTPREFIX := $( call gb_Library__get_layer_componentprefix ,NONE )
2011-03-14 11:45:57 -05:00
$(call gb_ComponentTarget_get_inbuild_target,$(1)) : LIBFILENAME := $( 3)
2011-06-22 07:30:32 -05:00
$(call gb_ComponentTarget_get_outdir_target,$(1)) : $( call gb_ComponentTarget_get_target ,$ ( 1) )
2011-03-14 11:45:57 -05:00
$(call gb_ComponentTarget_get_outdir_inbuild_target,$(1)) : $( call gb_ComponentTarget_get_inbuild_target ,$ ( 1) )
2011-07-22 14:02:42 -05:00
$( call gb_Deliver_add_deliverable ,$ ( call gb_ComponentTarget_get_outdir_target ,$ ( 1) ) ,$ ( call gb_ComponentTarget_get_target ,$ ( 1) ) ,$ ( 1) )
$( call gb_Deliver_add_deliverable ,$ ( call gb_ComponentTarget_get_outdir_inbuild_target ,$ ( 1) ) ,$ ( call gb_ComponentTarget_get_inbuild_target ,$ ( 1) ) ,$ ( 1) )
2010-11-05 12:56:07 -05:00
e n d e f
2011-03-11 07:30:09 -06:00
# vim: set noet sw=4: