1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.pmk,v $
11 # This file is part of OpenOffice.org.
13 # OpenOffice.org is free software: you can redistribute it and/or modify
14 # it under the terms of the GNU Lesser General Public License version 3
15 # only, as published by the Free Software Foundation.
17 # OpenOffice.org is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU Lesser General Public License version 3 for more details
21 # (a copy is included in the LICENSE file that accompanied this code).
23 # You should have received a copy of the GNU Lesser General Public License
24 # version 3 along with OpenOffice.org. If not, see
25 # <http://www.openoffice.org/license.html>
26 # for a copy of the LGPLv3 License.
28 #*************************************************************************
30 # --- Targets ------------------------------------------------------
33 # uppercase and no filename extension for txt
34 SYSTEXTDOCS=$(foreach,i,$(alllangiso) $(MISC)$/$(GUI)$/README_$i)
35 SYSHTMLDOCS=$(SYSTEXTDOCS:+".html")
36 .ELSE # "$(GUI)"=="UNX"
37 SYSTEXTDOCS=$(foreach,i,$(alllangiso) $(MISC)$/$(GUI)$/readme_$i.txt)
38 SYSHTMLDOCS=$(SYSTEXTDOCS:s/.txt/.html/)
39 .ENDIF # "$(GUI)"=="UNX"
41 .IF "$(WITH_LANG)"!=""
42 MERGEDXRM=$(COMMONMISC)$/$(TARGET)$/readme.xrm
43 .ELSE # "$(WITH_LANG)"!=""
44 MERGEDXRM=.$/readme.xrm
45 .ENDIF # "$(WITH_LANG)"!=""
49 ALLTAR : $(SYSTEXTDOCS) $(SYSHTMLDOCS)
51 $(COMMONMISC)$/readme.dtd : ..$/readme.dtd
52 $(MKDIRHIER) $(MISC)$/$(GUI)
55 virtual : $(MERGEDXRM) $(COMMONMISC)$/readme.dtd $(PRJ)$/docs/readme.xsl
57 $(MISC)$/readme_text.xsl : virtual
58 .IF "$(USE_SHELL)"!="4nt"
59 $(SED) 's#method="html".*>#method="text"/>#' < ..$/readme.xsl > $@
60 .ELSE # "$(USE_SHELL)"!="4nt"
61 $(SED) "s/method=\"html\".*>/method=\"text\"\/>/" < ..$/readme.xsl > $@
62 .ENDIF # "$(USE_SHELL)"!="4nt"
64 $(MISC)$/$(GUI)$/$(eq,$(GUI),WNT readme README)_%.html : 'virtual'
65 $(XSLTPROC) --nonet -o $@ \
66 --stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \
67 --stringparam cp1 $(CPUNAME) --stringparam type html --stringparam lang1 $* \
68 ..$/readme.xsl $(MERGEDXRM)
70 chmod g+w $(MISC)$/$(GUI)
71 .ENDIF # "$(GUI)"=="UNX"
73 # no percent-rule to avoid ambiguous inference chains for README_<lang>.html
74 $(SYSTEXTDOCS) : $(MISC)$/readme_text.xsl
75 $(XSLTPROC) --nonet -o $@ \
76 --stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \
77 --stringparam cp1 $(CPUNAME) --stringparam type text --stringparam lang1 $(@:b:s/readme_//:s/README_//) \
80 chmod g+w $(MISC)$/$(GUI)
81 .ENDIF # "$(GUI)"=="UNX"