xref: /aoo41x/main/connectivity/util/makefile.mk (revision 752c0af7)
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
22
23
24PRJ = ..
25PRJNAME = connectivity
26TARGET = connectivity
27
28.INCLUDE : settings.mk
29.INCLUDE : target.mk
30
31# For any given platform, for each driver .xcu (in $(MY_XCUS)) built on that
32# platform (in $(MISC)/registry/data/org/openoffice/Office/DataAccess) there are
33# corresponding language-specific .xcu files (in
34# $(MISC)/registry/res/%/org/openoffice/Office/DataAccess).  For each language,
35# all language-specific .xcu files for that language are assembled into
36# $(BIN)$/fcfg_drivers_%.zip.  To meet the requirements of dmake percent rules,
37# the first item from $(MY_XCUS) is arbitrarily taken to be the main
38# prerequisite while all the items from $(MY_XCUS) are made into indirect
39# prerequisites (harmlessly doubling the first item).
40
41MY_XCUS := \
42    $(shell cd $(MISC)/registry/data/org/openoffice/Office/DataAccess && \
43    ls *.xcu)
44
45.IF "$(MY_XCUS)" != ""
46
47ALLTAR : $(BIN)/fcfg_drivers_{$(alllangiso)}.zip
48
49$(BIN)/fcfg_drivers_{$(alllangiso)}.zip : \
50        $(MISC)/registry/res/$$(@:b:s/fcfg_drivers_//)/org/openoffice/Office/DataAccess/{$(MY_XCUS)}
51
52$(BIN)/fcfg_drivers_%.zip : \
53        $(MISC)/registry/res/%/org/openoffice/Office/DataAccess/$(MY_XCUS:1)
54    zip -j $@ \
55        $(foreach,i,$(MY_XCUS) \
56            $(MISC)/registry/res/$*/org/openoffice/Office/DataAccess/$i)
57
58.ENDIF
59