1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
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 # --- Targets ------------------------------------------------------
31 # uppercase and no filename extension for txt
32 SYSTEXTDOCS=$(foreach,i,$(alllangiso) $(MISC)$/$(GUI)$/README_$i)
33 SYSHTMLDOCS=$(SYSTEXTDOCS:+".html")
34 .ELSE # "$(GUI)"=="UNX"
35 SYSTEXTDOCS=$(foreach,i,$(alllangiso) $(MISC)$/$(GUI)$/readme_$i.txt)
36 SYSHTMLDOCS=$(SYSTEXTDOCS:s/.txt/.html/)
37 .ENDIF # "$(GUI)"=="UNX"
39 .IF "$(WITH_LANG)"!=""
40 MERGEDXRM=$(COMMONMISC)$/$(TARGET)$/readme.xrm
41 .ELSE # "$(WITH_LANG)"!=""
42 MERGEDXRM=.$/readme.xrm
43 .ENDIF # "$(WITH_LANG)"!=""
47 ALLTAR : $(SYSTEXTDOCS) $(SYSHTMLDOCS)
49 $(COMMONMISC)$/readme.dtd : ..$/readme.dtd
50 $(MKDIRHIER) $(MISC)$/$(GUI)
53 virtual : $(MERGEDXRM) $(COMMONMISC)$/readme.dtd $(PRJ)$/docs/readme.xsl
55 $(MISC)$/readme_text.xsl : virtual
56 $(SED) '' < ..$/readme.xsl > $@
58 $(MISC)$/$(GUI)$/$(eq,$(GUI),WNT readme README)_%.html : 'virtual'
59 @@-$(MKDIRHIER) $(@:d)
60 $(XSLTPROC) --nonet --novalid -o $@ \
61 --stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \
62 --stringparam cp1 $(CPUNAME) --stringparam type html --stringparam lang1 $* \
63 ..$/readme.xsl $(MERGEDXRM)
65 chmod g+w $(MISC)$/$(GUI)
66 .ENDIF # "$(GUI)"=="UNX"
68 $(MISC)$/$(GUI)$/$(eq,$(GUI),OS2 readme README)_%.html : 'virtual'
69 @@-$(MKDIRHIER) $(@:d)
70 $(XSLTPROC) --nonet --novalid -o $@ \
71 --stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \
72 --stringparam cp1 $(CPUNAME) --stringparam type html --stringparam lang1 $* \
73 ..$/readme.xsl $(MERGEDXRM)
75 # no percent-rule to avoid ambiguous inference chains for README_<lang>.html
76 $(SYSTEXTDOCS) : $(MISC)$/readme_text.xsl
77 @@-$(MKDIRHIER) $(@:d)
78 $(XSLTPROC) --nonet --novalid -o $@ \
79 --stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \
80 --stringparam cp1 $(CPUNAME) --stringparam type text --stringparam lang1 $(@:b:s/readme_//:s/README_//) \
84 chmod g+w $(MISC)$/$(GUI)
85 .ENDIF # "$(GUI)"=="UNX"