2 ## Version: MPL 1.1 / GPLv3+ / LGPLv3+
4 ## The contents of this file are subject to the Mozilla Public License Version
5 ## 1.1 (the "License"); you may not use this file except in compliance with
6 ## the License or as specified alternatively below. You may obtain a copy of
7 ## the License at http://www.mozilla.org/MPL/
9 ## Software distributed under the License is distributed on an "AS IS" basis,
10 ## WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 ## for the specific language governing rights and limitations under the
14 ## Major Contributor(s):
15 ## Copyright (C) 2011 Red Hat, Inc., Stephan Bergmann <sbergman@redhat.com>
16 ## (initial developer)
18 ## All Rights Reserved.
20 ## For minor contributions see the git repository.
22 ## Alternatively, the contents of this file may be used under the terms of
23 ## either the GNU General Public License Version 3 or later (the "GPLv3+"), or
24 ## the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
25 ## in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
26 ## instead of those above.
29 $(eval
$(call gb_CustomTarget_CustomTarget
,officecfg
/registry
))
31 $(call gb_CustomTarget_get_target
,officecfg
/registry
) : \
32 $(foreach i
,officecfg_qa_allheaders
$(officecfg_XCSFILES
),\
33 $(call gb_CustomTarget_get_workdir
,officecfg
/registry
)/$(i
).hxx
)
35 # auto generated header file for unit test qa/cppheader.cxx
36 $(call gb_CustomTarget_get_workdir
,officecfg
/registry
)/officecfg_qa_allheaders.hxx
: \
37 $(SRCDIR
)/officecfg
/registry
/files.mk
38 $(call gb_Output_announce
,officecfg_qa_allheaders.hxx
,$(true
),CAT
,1)
39 mkdir
-p
$(dir $@
) && \
41 $(foreach file
,$(officecfg_XCSFILES
),\
42 && echo
"#include <officecfg/$(file).hxx>" >> $@
)
44 # pass the stem as space separated path elements and get a set of --stringparam ns<level> <element> in return
45 officecfg_xsltparams
=$(if
$(filter-out $(lastword
$1),$1),$(call officecfg_xsltparams
,$(filter-out $(lastword
$1),$1))) --stringparam ns
$(words $1) $(lastword
$1)
47 $(call gb_CustomTarget_get_workdir
,officecfg
/registry
)/%.hxx
: \
48 $(SRCDIR
)/officecfg
/registry
/schema
/org
/openoffice
/%.xcs \
49 $(SRCDIR
)/officecfg
/registry
/cppheader.xsl\
50 |
$(call gb_ExternalExecutable_get_dependencies
,xsltproc
)
51 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),XSL
,1)
52 $(call gb_Helper_abbreviate_dirs
, \
53 mkdir
-p
$(dir $@
) && \
54 $(call gb_ExternalExecutable_get_command
,xsltproc
) --nonet
$(call officecfg_xsltparams
,$(subst /, ,$*)) \
55 -o
$@
$(SRCDIR
)/officecfg
/registry
/cppheader.xsl
$<)