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 ,\
mkdir -p $( dir $( 1) ) && \
2011-01-27 07:38:54 -06:00
$( gb_XSLTPROC) --nonet --stringparam uri \
2011-01-17 11:28:26 -06:00
'$(subst \d,$$,$(COMPONENTPREFIX))$(LIBFILENAME)' -o $( 1) \
2010-11-09 11:47:26 -06:00
$( gb_ComponentTarget_XSLTCOMMANDFILE) $( 2) )
2010-11-05 12:56:07 -05:00
e n d e f
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-01-27 07:38:54 -06:00
$$ (call gb_ComponentTarget_get_target,%) : $$( call gb_ComponentTarget_get_source ,$ ( 1) ,%) | $( gb_XSLTPROCTARGET )
2010-11-11 17:21:35 -06:00
$$ ( call gb_ComponentTarget__command,$$ @,$$ <,$$ *)
2010-11-05 12:56:07 -05:00
2010-11-06 16:40:38 -05:00
$$ (call gb_ComponentTarget_get_clean_target,%) :
2010-11-12 05:43:33 -06:00
$$ ( call gb_Output_announce,$$ *,$( false ) ,CMP,1)
2010-11-09 11:47:26 -06:00
rm -f $$ ( call gb_ComponentTarget_get_outdir_target,$$ *) $$ ( call gb_ComponentTarget_get_target,$$ *)
2010-11-06 16:40:38 -05:00
2010-11-05 12:56:07 -05:00
e n d e f
$( foreach repo ,$ ( gb_ComponentTarget_REPOS ) ,$ ( eval $ ( call gb_ComponentTarget__rules ,$ ( repo ) ) ) )
$(call gb_ComponentTarget_get_target,%) :
2010-11-13 18:21:34 -06:00
$( eval $( call gb_Outpt_error,Unable to find component file $( call gb_ComponentTarget_get_source,,$* ) in the repositories: $( gb_ComponentTarget_REPOS) or xlstproc is missing.) )
2010-11-05 12:56:07 -05:00
2010-11-09 11:47:26 -06:00
$(call gb_ComponentTarget_get_external_target,%) :
2010-11-19 08:12:51 -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-01-17 11:28:26 -06:00
$(call gb_ComponentTarget_get_target,$(1)) : LIBFILENAME := $( or $ ( 4) ,$ ( 3) )
$(call gb_ComponentTarget_get_target,$(1)) : COMPONENTPREFIX := $( 2)
2010-11-09 11:47:26 -06:00
$(call gb_ComponentTarget_get_outdir_target,$(1)) : $( call gb_ComponentTarget_get_target ,$ ( 1) )
2010-11-19 08:12:51 -06:00
$( call gb_Deliver_add_deliverable ,$ ( call gb_ComponentTarget_get_outdir_target ,$ ( 1) ) ,$ ( call gb_ComponentTarget_get_target ,$ ( 1) ) )
2010-11-05 12:56:07 -05:00
e n d e f
# vim: set noet sw=4 ts=4: