xref: /trunk/main/svx/uiconfig/layout/layout.mk (revision bb113e63)
1# *************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20# *************************************************************
21# TODO: move to solenv/inc
22# copies: sw/uiconfig/layout svx/uiconfig/layout
23
24TRALAY=tralay
25XML_DEST=$(DLLDEST)
26XML_LANGS=$(alllangiso)
27
28ALL_XMLS=$(foreach,i,$(XML_FILES) $(XML_DEST)/$i) $(foreach,i,$(XML_LANGS) $(foreach,j,$(XML_FILES) $(XML_DEST)/$i/$j))
29
30# Must remove the -j (no duplicate base file names) flag
31ZIPUPDATE=-u
32XML_ZIP = $(PRJNAME)-layout
33
34ALLTAR: $(XML_ZIP)
35
36$(XML_ZIP): $(ALL_XMLS)
37
38ZIP1DIR=$(XML_DEST)
39ZIP1TARGET=$(XML_ZIP)
40ZIP1LIST=$(ALL_XMLS:s@$(XML_DEST)/@@)
41
42$(foreach,i,$(XML_LANGS) $(XML_DEST)/$i/%.xml): %.xml
43	-$(MKDIR) $(@:d)
44	@echo $(foreach,i,$(XML_LANGS) $(XML_DEST)/$i/%.xml): %.xml
45	$(TRALAY) -m localize.sdf -o $(XML_DEST) -l $(XML_LANGS:f:t" -l ") $<
46
47$(XML_DEST)/%.xml: %.xml
48	-$(MKDIR) $(@:d)
49	$(COPY) $< $@
50
51# Don't want to overwrite filled localize.sdf with empty template
52template.sdf:
53	$(foreach,i,$(XML_FILES) $(TRALAY) -l en-US $i) > $@
54