Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / solenv / inc / tg_help.mk
blobf87953ae5dfb5a4e8813fcf079562745d74f6fb1
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org. If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
26 #*************************************************************************
28 # to make it usable with special lang selection of
29 # helpcontent2
31 aux_alllangiso*:=$(alllangiso)
33 SHELL_PACKAGE:=$(subst,/,$/ $(PACKAGE))
35 .IF "$(XHPDEST)"==""
36 XHPDEST*:=$(COMMONMISC)
37 HELP_OUT:=$(COMMONMISC)
38 .ELSE # "$(XHPDEST)"==""
39 HELP_OUT:=$(MISC)
40 .ENDIF # "$(XHPDEST)"==""
42 HLANGXHPFILES*:=$(foreach,i,$(XHPFILES) $(foreach,j,$(aux_alllangiso) $(XHPDEST)$/$j$/$(SHELL_PACKAGE)$/$(i:f)))
44 ALLTAR : $(HELP_OUT)$/$(TARGET).done $(HELP_OUT)$/xhp_changed.flag
46 $(HLANGXHPFILES) : $$(@:d)thisdir.created
48 $(XHPDEST)$/{$(aux_alllangiso)}$/$(SHELL_PACKAGE)$/%.xhp :| %.xhp
49 @$(TOUCH) $@
50 # internal dependencies not sufficient to trigger merge?
51 # @$(NULL)
54 $(HELP_OUT)$/$(TARGET).done : $(HLANGXHPFILES)
55 .IF "$(WITH_LANG)"!=""
56 @echo Localizing help files...
57 @$(foreach,xhpfile,$(XHPFILES) cp $(SRC_ROOT)/$(PRJNAME)/source/$(SHELL_PACKAGE)/$(xhpfile) $(subst,$(PRJ),$(SRC_ROOT)/$(PRJNAME) $(XHPDEST))/en-US/$(SHELL_PACKAGE)/$(xhpfile) && ) \
58 $(foreach,lang,$(subst,en-US, $(aux_alllangiso)) \
59 $(AUGMENT_LIBRARY_PATH) $(HELPEX) -mi $(mktmp $(foreach,xhpfile,$(XHPFILES) $(SRC_ROOT)/$(PRJNAME)/source/$(SHELL_PACKAGE)/$(xhpfile))) -o $(subst,$(PRJ),$(SRC_ROOT)/$(PRJNAME) $(XHPDEST))/$(lang)/$(SHELL_PACKAGE) -m $(mktmp $(SRC_ROOT)/translations/source/$(lang)/$(PRJNAME)/source/$(SHELL_PACKAGE).po) -l $(lang) && )\
60 $(TOUCH) $@
61 .ELSE # "$(WITH_LANG)"!=""
62 @echo Copying help files...
63 $(COMMAND_ECHO)cp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES)))) $(XHPDEST)$/en-US$/$(SHELL_PACKAGE) && $(TOUCH) $@
64 .ENDIF # "$(WITH_LANG)"!=""
66 $(HELP_OUT)$/xhp_changed.flag : $(HLANGXHPFILES)
67 @$(TOUCH) $@
69 # urks - dmake mixes up operators and strings :-(
70 .IF "$(HLANGXHPFILES:s/defined/xxx/)"!=""
72 .IF "$(HELPTRANSPHONY)"!=""
73 $(HELP_OUT)$/$(TARGET).done .PHONY :
74 .ELSE # "$(HELPTRANSPHONY)"!=""
76 $(HELP_OUT)$/$(TARGET).done : makefile.mk
77 .IF "$(WITH_LANG)"!=""
78 $(HELP_OUT)$/$(TARGET).done : $(LOCALIZESDF)
79 .ENDIF # "$(WITH_LANG)"!=""
80 .ENDIF # "$(HELPTRANSPHONY)"!=""
81 .ENDIF # "$(HLANGXHPFILES)"!=""
83 %.created :
84 @@-$(MKDIRHIER) $(@:d)
85 @$(TOUCH) $@