xref: /aoo41x/main/solenv/inc/tg_help.mk (revision cdf0e10c)
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
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.
14#
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).
20#
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.
25#
26#*************************************************************************
27
28# to make it usable with special lang selection of
29# helpcontent2
30
31aux_alllangiso*:=$(alllangiso)
32
33SHELL_PACKAGE:=$(subst,/,$/ $(PACKAGE))
34
35.IF "$(XHPDEST)"==""
36XHPDEST*:=$(COMMONMISC)
37HELP_OUT:=$(COMMONMISC)
38.ELSE          # "$(XHPDEST)"==""
39HELP_OUT:=$(MISC)
40.ENDIF          # "$(XHPDEST)"==""
41
42HLANGXHPFILES*:=$(foreach,i,$(XHPFILES) $(foreach,j,$(aux_alllangiso) $(XHPDEST)$/$j$/$(SHELL_PACKAGE)$/$(i:f)))
43
44ALLTAR : $(HELP_OUT)$/$(TARGET).done $(HELP_OUT)$/xhp_changed.flag optix
45
46$(HLANGXHPFILES) : $$(@:d)thisdir.created
47
48$(XHPDEST)$/{$(aux_alllangiso)}$/$(SHELL_PACKAGE)$/%.xhp :| %.xhp
49    @$(TOUCH) $@
50# internal dependencies not sufficient to trigger merge?
51#    @$(NULL)
52
53
54$(HELP_OUT)$/$(TARGET).done : $(HLANGXHPFILES)
55.IF "$(WITH_LANG)"!=""
56	$(AUGMENT_LIBRARY_PATH) $(HELPEX) -p $(PRJNAME) -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(XHPDEST) -y $(SHELL_PACKAGE) -l all -lf $(aux_alllangiso:t",") -m $(LOCALIZESDF) && $(TOUCH) $@
57.ELSE			# "$(WITH_LANG)"!=""
58	cp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES)))) $(XHPDEST)$/en-US$/$(SHELL_PACKAGE) && $(TOUCH) $@
59.ENDIF			# "$(WITH_LANG)"!=""
60.IF "$(OS)"=="SOLARIS"
61    @$(ECHONL) " "
62.ELSE			# "$(OS)"=="SOLARIS"
63    @$(ECHONL)
64.ENDIF			# "$(OS)"=="SOLARIS"
65
66$(HELP_OUT)$/xhp_changed.flag : $(HLANGXHPFILES)
67    @$(TOUCH) $@
68
69# urks - dmake mixes up operators and strings :-(
70.IF "$(HLANGXHPFILES:s/defined/xxx/)"!=""
71
72.IF "$(HELPTRANSPHONY)"!=""
73$(HELP_OUT)$/$(TARGET).done .PHONY :
74.ELSE           # "$(HELPTRANSPHONY)"!=""
75
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)"!=""
82
83optix: $(HELP_OUT)$/$(TARGET).done
84    @echo done
85
86%.created :
87    @@-$(MKDIRHIER) $(@:d)
88    @$(TOUCH) $@
89
90
91