]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - doc/sgml/makemakefile
Merge branch 'master' of git+ssh://git.kernelconcepts.de/karo-tx-redboot
[karo-tx-redboot.git] / doc / sgml / makemakefile
1 #!/bin/sh
2
3 touch ecos-ref.sgml
4 touch makefile
5 chmod +w ecos-ref.sgml 
6 chmod +w makefile
7
8 sgmldir="`dirname $0`"
9 doclist="${sgmldir}/doclist"
10 toplvl="${sgmldir}/../.."
11
12 cat > makefile <<EOF
13 #=============================================================================
14 #
15 #    makefile
16 #
17 #    For building the eCos docs
18 #
19 #=============================================================================
20 #####ECOSGPLCOPYRIGHTBEGIN####
21 # -------------------------------------------
22 # This file is part of eCos, the Embedded Configurable Operating System.
23 # Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
24 # Copyright (C) 2003 Jonathan Larmour
25 #
26 # eCos is free software; you can redistribute it and/or modify it under
27 # the terms of the GNU General Public License as published by the Free
28 # Software Foundation; either version 2 or (at your option) any later version.
29 #
30 # eCos is distributed in the hope that it will be useful, but WITHOUT ANY
31 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
32 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
33 # for more details.
34 #
35 # You should have received a copy of the GNU General Public License along
36 # with eCos; if not, write to the Free Software Foundation, Inc.,
37 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
38 #
39 # As a special exception, if other files instantiate templates or use macros
40 # or inline functions from this file, or you compile this file and link it
41 # with other works to produce a work based on this file, this file does not
42 # by itself cause the resulting work to be covered by the GNU General Public
43 # License. However the source code for this file must still be made available
44 # in accordance with section (3) of the GNU General Public License.
45 #
46 # This exception does not invalidate any other reasons why a work based on
47 # this file might be covered by the GNU General Public License.
48 # -------------------------------------------
49 #####ECOSGPLCOPYRIGHTEND####
50 #=============================================================================
51 #####DESCRIPTIONBEGIN####
52 #
53 # Author(s):     jlarmour
54 # Date:          2002-02-05
55 #####DESCRIPTIONEND####
56 #=============================================================================
57
58 TOPLEVEL   := ${toplvl}/packages
59 EOF
60 /bin/echo MAIN_SGML   := ecos-ref.sgml >> makefile
61 /bin/echo -n OTHER_SGML   :=  >> makefile
62
63 cat >ecos-ref.sgml <<EOF
64 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
65
66 <!-- Begin Document Specific Declarations -->
67 <!ENTITY ui "&micro;ITRON">
68 <!ENTITY versiondir CDATA "v2_0">
69 <!ENTITY version CDATA "2.0">
70 <!ENTITY lt SDATA "[lt    ]">
71 EOF
72
73 PACKAGEVER=${1:-'current'}
74
75 for i in `cat ${doclist}`; do
76   line="`echo $i | sed 's/#.*//;'`"
77   if (test ! -z $line); then
78    /bin/echo -n " ${toplvl}/packages/$i" | sed "s@/current/@/${PACKAGEVER}/@g" >> makefile
79    entityi="`echo $i | sed 's@\+@x@g; s@/@-@g; s@\.@-@g; s@_@-@g; s@-current-doc@@g; s@-current@@g'`"
80    echo "<!ENTITY $entityi SYSTEM \"${toplvl}/packages/$i\">" | sed "s@/current/@/${PACKAGEVER}/@g" >> ecos-ref.sgml
81   fi
82 done
83
84 # Go through again but find GIFs and PNGs to copy
85 for i in `for j in \`cat ${doclist}\` ; do dirname $j ; done | sort | uniq` ; do
86   diri=`echo ${toplvl}/packages/$i | sed "s@/current/@/${PACKAGEVER}/@g"`
87   dirigifs=`ls $diri/*.gif $diri/*.png 2>/dev/null | tr '\n' ' '`
88   if [ x"$dirigifs" != x ]; then
89         copyfiles="$copyfiles $dirigifs"
90   fi
91 done
92
93 cat >> makefile <<EOF
94
95 MAIN_HTML  := ecos-ref.html
96 MAIN_PDF   := ecos-ref.pdf
97 PICTURES   :=
98 COPYFILES  := $copyfiles
99
100 include \$(TOPLEVEL)/pkgconf/rules.doc
101 EOF
102
103 cat >> ecos-ref.sgml <<EOF
104 <!-- End Document Specific Declarations -->
105 ]>
106
107 <BOOK ID="ECOS-REF">
108   <bookinfo>
109     <TITLE>eCos Reference Manual</TITLE>
110
111     <copyright>
112       <year>1998</year>
113       <year>1999</year>
114       <year>2000</year>
115       <year>2001</year>
116       <year>2002</year>
117       <year>2003</year>
118       <holder>Red Hat, Inc.</holder>
119       <holder>Nick Garnett (eCosCentric)</holder>
120       <holder>Jonathan Larmour (eCosCentric)</holder>
121       <holder>Andrew Lunn (Ascom)</holder>
122       <holder>Gary Thomas (MLB Associates)</holder>
123       <holder>Bart Veer (eCosCentric)</holder>
124     </copyright>
125
126     <legalnotice>
127         <title>Documentation licensing terms</title>
128 <para>This material may be distributed only subject to the terms
129 and conditions set forth in the Open Publication License, v1.0
130 or later (the latest version is presently available at
131 <ulink url="http://www.opencontent.org/openpub/">http://www.opencontent.org/openpub/</ulink>).
132 </para>
133 <para>
134 Distribution of substantively modified versions of this
135 document is prohibited without the explicit permission of the
136 copyright holder.</para>
137 <para>
138 Distribution of the work or derivative of the work in any
139 standard (paper) book form is prohibited unless prior
140 permission is obtained from the copyright holder.
141 </para>
142     </legalnotice>
143     <legalnotice>
144       <title>Trademarks</title>
145 <para>Altera&reg; and Excalibur&trade; are trademarks of Altera Corporation.</para>
146 <para>AMD&reg; is a registered trademark of Advanced Micro Devices, Inc.</para>
147 <para>ARM&reg;, StrongARM&reg;, Thumb&reg;, ARM7&trade;, ARM9&trade;  is a registered trademark of Advanced RISC Machines, Ltd.</para>
148 <para>Cirrus Logic&reg; and Maverick&trade; are registered trademarks of Cirrus Logic, Inc.</para>
149 <para>Cogent&trade; is a trademark of Cogent Computer Systems, Inc.</para>
150 <para>Compaq&reg; is a registered trademark of the Compaq Computer Corporation.</para>
151 <para>Fujitsu&reg; is a registered trademark of Fujitsu Limited.</para>
152 <para>IBM&reg;, and PowerPC&trade; are trademarks of International Business Machines Corporation.</para>
153 <para>IDT&reg; is a registered trademark of Integrated Device Technology Inc.</para>
154 <para>Intel&reg;, i386&trade;, Pentium&reg;, StrataFlash&reg; and XScale&trade; are trademarks of Intel Corporation.</para>
155 <para>Intrinsyc&reg; and Cerf&trade; are trademarks of Intrinsyc Software, Inc.</para>
156 <para>Linux&reg; is a registered trademark of Linus Torvalds. </para>
157 <para>Matsushita&trade; and Panasonic&reg; are trademarks of the Matsushita Electric Industrial Corporation.</para>
158 <para>Microsoft&reg;, Windows&reg;, Windows NT&reg; and Windows XP&reg; are registered trademarks of Microsoft Corporation, Inc. </para>
159 <para>MIPS&reg;, MIPS32&trade; MIPS64&trade;, 4K&trade, 5K&trade; Atlas&trade; and Malta&trade; are trademarks of MIPS Technologies, Inc.</para>
160 <para>Motorola&reg;, ColdFire&reg; is a trademark of Motorola, Inc.</para>
161 <para>NEC&reg; V800&trade;, V850&trade;, V850/SA1&trade;, V850/SB1&trade;, VR4300&trade;, and VRC4375&trade; are trademarks of NEC Corporation.</para>
162 <para>PMC-Sierra&reg; RM7000&trade; and Ocelot&trade; are trademarks of PMC-Sierra Incorporated. </para>
163 <para>Red Hat, eCos&trade;, RedBoot&trade;, GNUPro&reg;, and Insight&trade; are trademarks of Red Hat, Inc. </para>
164 <para>Samsung&reg; and CalmRISC&trade; are trademarks or registered trademarks of Samsung, Inc. </para>
165 <para>Sharp&reg; is a registered trademark of Sharp Electronics Corp.</para>
166 <para>SPARC&reg; is a registered trademark of SPARC International, Inc., and is used under license by Sun Microsystems, Inc. </para>
167 <para>Sun Microsystems&reg; and Solaris&reg; are registered trademarks of Sun Microsystems, Inc. </para>
168 <para>SuperH&trade; and Renesas&trade; are trademarks owned by Renesas Technology Corp.</para>
169 <para>Texas Instruments&reg;, OMAP&trade; and Innovator&trade; are trademarks of Texas Instruments Incorporated.</para>
170 <para>Toshiba&reg; is a registered trademark of the Toshiba Corporation.</para>
171 <para>UNIX&reg; is a registered trademark of The Open Group. </para>
172 <para>All other brand and product names, trademarks, and copyrights are the
173 property of their respective owners. </para>
174       </legalnotice>
175       <legalnotice>
176 <title>Warranty</title>
177 <para>eCos and RedBoot are open source software, covered by a
178 modified version of the <ulink url="http://www.gnu.org/copyleft/gpl.html">GNU
179 General Public Licence</ulink>,
180 and you are welcome to change it and/or distribute copies of it under certain
181 conditions. See <ulink
182 url="http://ecos.sourceware.org/license-overview.html">http://ecos.sourceware.org/license-overview.html
183 </ulink> for more information about the license.</para>
184 <para>eCos and RedBoot software have NO WARRANTY. </para>
185 <para>Because this software is licensed free of charge, there are no warranties
186 for it, to the extent permitted by applicable law. Except when otherwise stated
187 in writing, the copyright holders and/or other parties provide the software
188 &ldquo;as is&rdquo; without warranty of any kind, either expressed or implied,
189 including, but not limited to, the implied warranties of merchantability and
190 fitness for a particular purpose. The entire risk as to the quality and performance
191 of the software is with you. Should the software prove defective, you assume
192 the cost of all necessary servicing, repair or correction.</para>
193 <para> In no event, unless required by applicable law or agreed to in writing,
194 will any copyright holder, or any other party who may modify and/or redistribute
195 the program as permitted above, be liable to you for damages, including any
196 general, special, incidental or consequential damages arising out of the use
197 or inability to use the program (including but not limited to loss of data
198 or data being rendered inaccurate or losses sustained by you or third parties
199 or a failure of the program to operate with any other programs), even if such
200 holder or other party has been advised of the possibility of such damages.
201 </para>
202       </legalnotice>
203   </bookinfo>
204 <toc id="ecos-toc"></toc>
205 EOF
206
207 for i in `cat ${doclist}`; do
208   line="`echo $i | sed 's/#.*//;'`"
209   if (test ! -z $line); then
210    entityi="`echo $i | sed 's@\+@x@g; s@/@-@g; s@\.@-@g; s@_@-@g; s@-current-doc@@g; s@-current@@g'`"
211    # special kludge
212    if [ "`basename $i`" != "tcpip-manpages.sgml" -a \
213         "`basename $i`" != "snmp-manpages.sgml" -a \
214         "`basename $i`" != "libipsec.sgml" -a \
215         "`basename $i`" != "libipsec-manpages.sgml" -a \
216         "`basename $i`" != "openbsd-manpages-bridge.sgml" -a \
217         "`basename $i`" != "openbsd-manpages-netintro.sgml" -a \
218         "`basename $i`" != "openbsd-manpages-stp.sgml" -a \
219         "`basename $i`" != "porting.sgml" ]; then
220      echo "&$entityi;" >> ecos-ref.sgml
221    fi
222   fi
223 done
224
225 echo '</book>' >> ecos-ref.sgml