xref: /aoo41x/main/swext/mediawiki/help/makefile.mk (revision 7871dc3e)
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=swext
26TARGET=$(PRJNAME)_help
27
28.INCLUDE : settings.mk
29
30.IF "$(WITH_LANG)"!=""
31# workaround for the problem in help, the help uses en instead of en-US
32MEDIAWIKI_LANG=$(uniq en $(alllangiso))
33aux_alllangiso:=$(MEDIAWIKI_LANG)
34.ELSE          # "$(WITH_LANG)"!=""
35aux_alllangiso:=$(defaultlangiso)
36MEDIAWIKI_LANG=$(uniq en $(alllangiso))
37.ENDIF          # "$(WITH_LANG)"!=""
38
39.IF "$(ENABLE_MEDIAWIKI)" != "YES"
40all:
41    @echo Building mediawiki disabled...
42.ELSE           # "$(ENABLE_MEDIAWIKI)" != "YES"
43
44PACKAGE=com.sun.wiki-publisher
45
46OUT_MEDIAWIKI:=$(MISC)$/mediawiki
47
48LINKNAME:=help
49XHPLINKSRC:=$(OUT_MEDIAWIKI)/help
50
51XHPDEST=$(OUT_MEDIAWIKI)_merge/help
52
53XHPFILES= \
54	wiki.xhp\
55	wikiaccount.xhp\
56	wikiformats.xhp\
57	wikisend.xhp\
58	wikisettings.xhp
59
60LINKLINKFILES= \
61    $(PACKAGE)/{$(XHPFILES)}
62
63# define with own language set
64HLANGXHPFILES=$(foreach,i,$(XHPFILES) $(foreach,j,$(MEDIAWIKI_LANG) $(XHPDEST)$/$j$/$(PACKAGE)$/$(i:f)))
65
66.INCLUDE : target.mk
67.INCLUDE : tg_help.mk
68.INCLUDE : extension_helplink.mk
69
70ALLTAR : $(OUT_MEDIAWIKI)/help/component.txt
71
72$(OUT_MEDIAWIKI)/help/component.txt : component.txt
73    @-$(MKDIRHIER) $(@:d)
74	$(COMMAND_ECHO)$(COPY) component.txt $@
75
76$(OUT_MEDIAWIKI)/help/%.xhp : $(OUT_MEDIAWIKI)_merge/help/%.xhp
77    @-$(MKDIRHIER) $(@:d)
78    $(COMMAND_ECHO)cat $< | sed -e 's/@WIKIEXTENSIONPRODUCTNAME@/Wiki Publisher/g' | \
79        sed  's/@WIKIEXTENSIONID@/com.sun.wiki-publisher/g' | \
80        sed 's/@WIKIEXTENSIONFILENAME@/wiki-publisher/g' > $@
81
82.ENDIF          # "$(ENABLE_MEDIAWIKI)" != "YES"
83
84