xref: /trunk/main/swext/mediawiki/help/makefile.mk (revision cdf0e10c)
1*cdf0e10cSrcweir#*************************************************************************
2*cdf0e10cSrcweir#
3*cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir#
5*cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir#
7*cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir#
9*cdf0e10cSrcweir# This file is part of OpenOffice.org.
10*cdf0e10cSrcweir#
11*cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir# only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir#
15*cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir#
21*cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir# version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir# <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir# for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir#
26*cdf0e10cSrcweir#*************************************************************************
27*cdf0e10cSrcweir
28*cdf0e10cSrcweirPRJ=..$/..
29*cdf0e10cSrcweirPRJNAME=swext
30*cdf0e10cSrcweirTARGET=$(PRJNAME)_help
31*cdf0e10cSrcweir
32*cdf0e10cSrcweir.INCLUDE : settings.mk
33*cdf0e10cSrcweir
34*cdf0e10cSrcweir.IF "$(WITH_LANG)"!=""
35*cdf0e10cSrcweir# workaround for the problem in help, the help uses en instead of en-US
36*cdf0e10cSrcweirMEDIAWIKI_LANG=$(uniq en $(alllangiso))
37*cdf0e10cSrcweiraux_alllangiso:=$(MEDIAWIKI_LANG)
38*cdf0e10cSrcweir.ELSE          # "$(WITH_LANG)"!=""
39*cdf0e10cSrcweiraux_alllangiso:=$(defaultlangiso)
40*cdf0e10cSrcweirMEDIAWIKI_LANG=$(uniq en $(alllangiso))
41*cdf0e10cSrcweir.ENDIF          # "$(WITH_LANG)"!=""
42*cdf0e10cSrcweir
43*cdf0e10cSrcweir.IF "$(ENABLE_MEDIAWIKI)" != "YES"
44*cdf0e10cSrcweirall:
45*cdf0e10cSrcweir    @echo Building mediawiki disabled...
46*cdf0e10cSrcweir.ELSE           # "$(ENABLE_MEDIAWIKI)" != "YES"
47*cdf0e10cSrcweir
48*cdf0e10cSrcweirPACKAGE=com.sun.wiki-publisher
49*cdf0e10cSrcweir
50*cdf0e10cSrcweirOUT_MEDIAWIKI:=$(MISC)$/mediawiki
51*cdf0e10cSrcweir
52*cdf0e10cSrcweirLINKNAME:=help
53*cdf0e10cSrcweirXHPLINKSRC:=$(OUT_MEDIAWIKI)/help
54*cdf0e10cSrcweir
55*cdf0e10cSrcweirXHPDEST=$(OUT_MEDIAWIKI)_merge/help
56*cdf0e10cSrcweir
57*cdf0e10cSrcweirXHPFILES= \
58*cdf0e10cSrcweir	wiki.xhp\
59*cdf0e10cSrcweir	wikiaccount.xhp\
60*cdf0e10cSrcweir	wikiformats.xhp\
61*cdf0e10cSrcweir	wikisend.xhp\
62*cdf0e10cSrcweir	wikisettings.xhp
63*cdf0e10cSrcweir
64*cdf0e10cSrcweirLINKLINKFILES= \
65*cdf0e10cSrcweir    $(PACKAGE)/{$(XHPFILES)}
66*cdf0e10cSrcweir
67*cdf0e10cSrcweir# define with own language set
68*cdf0e10cSrcweirHLANGXHPFILES=$(foreach,i,$(XHPFILES) $(foreach,j,$(MEDIAWIKI_LANG) $(XHPDEST)$/$j$/$(PACKAGE)$/$(i:f)))
69*cdf0e10cSrcweir
70*cdf0e10cSrcweir.INCLUDE : target.mk
71*cdf0e10cSrcweir.INCLUDE : tg_help.mk
72*cdf0e10cSrcweir.INCLUDE : extension_helplink.mk
73*cdf0e10cSrcweir
74*cdf0e10cSrcweirALLTAR : $(OUT_MEDIAWIKI)/help/component.txt
75*cdf0e10cSrcweir
76*cdf0e10cSrcweir$(OUT_MEDIAWIKI)/help/component.txt : component.txt
77*cdf0e10cSrcweir    @-$(MKDIRHIER) $(@:d)
78*cdf0e10cSrcweir	$(COMMAND_ECHO)$(COPY) component.txt $@
79*cdf0e10cSrcweir
80*cdf0e10cSrcweir$(OUT_MEDIAWIKI)/help/%.xhp : $(OUT_MEDIAWIKI)_merge/help/%.xhp
81*cdf0e10cSrcweir    @-$(MKDIRHIER) $(@:d)
82*cdf0e10cSrcweir    $(COMMAND_ECHO)cat $< | sed -e 's/@WIKIEXTENSIONPRODUCTNAME@/Wiki Publisher/g' | \
83*cdf0e10cSrcweir        sed  's/@WIKIEXTENSIONID@/com.sun.wiki-publisher/g' | \
84*cdf0e10cSrcweir        sed 's/@WIKIEXTENSIONFILENAME@/wiki-publisher/g' > $@
85*cdf0e10cSrcweir
86*cdf0e10cSrcweir.ENDIF          # "$(ENABLE_MEDIAWIKI)" != "YES"
87*cdf0e10cSrcweir
88