OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/rtos/ecos-2.0/packages/pkgconf
    from Rev 27 to Rev 174
    Reverse comparison

Rev 27 → Rev 174

/rules.mak
0,0 → 1,188
#=============================================================================
#
# rules.mak
#
# Generic rules for inclusion by all package makefiles.
#
#=============================================================================
#####ECOSGPLCOPYRIGHTBEGIN####
## -------------------------------------------
## This file is part of eCos, the Embedded Configurable Operating System.
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
##
## eCos is free software; you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free
## Software Foundation; either version 2 or (at your option) any later version.
##
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
## WARRANTY; without even the implied warranty of MERCHANTABILITY or
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
## for more details.
##
## You should have received a copy of the GNU General Public License along
## with eCos; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
##
## As a special exception, if other files instantiate templates or use macros
## or inline functions from this file, or you compile this file and link it
## with other works to produce a work based on this file, this file does not
## by itself cause the resulting work to be covered by the GNU General Public
## License. However the source code for this file must still be made available
## in accordance with section (3) of the GNU General Public License.
##
## This exception does not invalidate any other reasons why a work based on
## this file might be covered by the GNU General Public License.
##
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
## at http://sources.redhat.com/ecos/ecos-license/
## -------------------------------------------
#####ECOSGPLCOPYRIGHTEND####
#=============================================================================
#####DESCRIPTIONBEGIN####
#
# Author(s): jld
# Contributors: bartv
# Date: 1999-11-04
# Purpose: Generic rules for inclusion by all package makefiles
# Description:
#
#####DESCRIPTIONEND####
#=============================================================================
 
# FIXME: This definition belongs in the top-level makefile.
export HOST_CC := gcc
 
.PHONY: default build clean tests headers mlt_headers
 
# include any dependency rules generated previously
ifneq ($(wildcard *.deps),)
include $(wildcard *.deps)
endif
 
 
# pattern matching rules to generate a library object from source code
# object filenames are prefixed to avoid name clashes
# a single dependency rule is generated (file extension = ".o.d")
%.o.d : %.c
ifeq ($(HOST),CYGWIN)
@mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
else
@mkdir -p $(dir $@)
endif
$(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -Wp,-MD,$(@:.o.d=.tmp) -o $(dir $@)$(OBJECT_PREFIX)_$(notdir $(@:.o.d=.o)) $<
@sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.o.d=.tmp) > $@
@rm $(@:.o.d=.tmp)
 
%.o.d : %.cxx
ifeq ($(HOST),CYGWIN)
@mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
else
@mkdir -p $(dir $@)
endif
$(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -Wp,-MD,$(@:.o.d=.tmp) -o $(dir $@)$(OBJECT_PREFIX)_$(notdir $(@:.o.d=.o)) $<
@sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.o.d=.tmp) > $@
@rm $(@:.o.d=.tmp)
 
%.o.d : %.cpp
ifeq ($(HOST),CYGWIN)
@mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
else
@mkdir -p $(dir $@)
endif
$(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -Wp,-MD,$(@:.o.d=.tmp) -o $(dir $@)$(OBJECT_PREFIX)_$(notdir $(@:.o.d=.o)) $<
@sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.o.d=.tmp) > $@
@rm $(@:.o.d=.tmp)
 
%.o.d : %.S
ifeq ($(HOST),CYGWIN)
@mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
else
@mkdir -p $(dir $@)
endif
$(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -Wp,-MD,$(@:.o.d=.tmp) -o $(dir $@)$(OBJECT_PREFIX)_$(notdir $(@:.o.d=.o)) $<
@sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.o.d=.tmp) > $@
@rm $(@:.o.d=.tmp)
 
# pattern matching rules to generate a test object from source code
# object filenames are not prefixed
# a single dependency rule is generated (file extension = ".d")
%.d : %.c
ifeq ($(HOST),CYGWIN)
@mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
else
@mkdir -p $(dir $@)
endif
$(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -Wp,-MD,$(@:.d=.tmp) -o $(@:.d=.o) $<
@sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.d=.tmp) > $@
@rm $(@:.d=.tmp)
 
%.d : %.cxx
ifeq ($(HOST),CYGWIN)
@mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
else
@mkdir -p $(dir $@)
endif
$(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -Wp,-MD,$(@:.d=.tmp) -o $(@:.d=.o) $<
@sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.d=.tmp) > $@
@rm $(@:.d=.tmp)
 
%.d : %.cpp
ifeq ($(HOST),CYGWIN)
@mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
else
@mkdir -p $(dir $@)
endif
$(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -Wp,-MD,$(@:.d=.tmp) -o $(@:.d=.o) $<
@sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.d=.tmp) > $@
@rm $(@:.d=.tmp)
 
%.d : %.S
ifeq ($(HOST),CYGWIN)
@mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
else
@mkdir -p $(dir $@)
endif
$(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -Wp,-MD,$(@:.d=.tmp) -o $(@:.d=.o) $<
@sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.d=.tmp) > $@
@rm $(@:.d=.tmp)
 
# rule to generate a test executable from object code
$(PREFIX)/tests/$(PACKAGE)/%$(EXEEXT): %.d $(wildcard $(PREFIX)/lib/target.ld) $(wildcard $(PREFIX)/lib/*.[ao])
ifeq ($(HOST),CYGWIN)
@mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
else
@mkdir -p $(dir $@)
endif
ifneq ($(IGNORE_LINK_ERRORS),)
-$(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ $(<:.d=.o)
else
$(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ $(<:.d=.o)
endif
 
# rule to generate all tests and create a dependency file "tests.deps" by
# concatenating the individual dependency rule files (file extension = ".d")
# generated during compilation
tests: tests.stamp
 
TESTS := $(TESTS:.cpp=)
TESTS := $(TESTS:.cxx=)
TESTS := $(TESTS:.c=)
TESTS := $(TESTS:.S=)
tests.stamp: $(foreach target,$(TESTS),$(target).d $(PREFIX)/tests/$(PACKAGE)/$(target)$(EXEEXT))
ifneq ($(strip $(TESTS)),)
@cat $(TESTS:%=%.d) > $(@:.stamp=.deps)
endif
@touch $@
 
# rule to clean the build tree
clean:
@find . -type f -print | grep -v makefile | xargs rm -f
 
# rule to copy MLT files
mlt_headers: $(foreach x,$(MLT),$(PREFIX)/include/pkgconf/$(notdir $x))
 
$(foreach x,$(MLT),$(PREFIX)/include/pkgconf/$(notdir $x)): $(MLT)
@cp $(dir $<)/$(notdir $@) $(PREFIX)/include/pkgconf
@chmod u+w $(PREFIX)/include/pkgconf/$(notdir $@)
 
# end of file
/ssletter.dsl
0,0 → 1,110
<!-- {{{ Banner -->
 
<!-- =============================================================== -->
<!-- -->
<!-- stylesheet.sgml -->
<!-- -->
<!-- Customize the nwalsh modular stylesheets. -->
<!-- -->
<!-- =============================================================== -->
<!-- ####ECOSGPLCOPYRIGHTBEGIN#### -->
<!-- This file is part of eCos, the Embedded Configurable Operating System. -->
<!-- Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
<!-- -->
<!-- eCos is free software; you can redistribute it and/or modify it under -->
<!-- the terms of the GNU General Public License as published by the Free -->
<!-- Software Foundation; either version 2 or (at your option) any later -->
<!-- version. -->
<!-- -->
<!-- eCos is distributed in the hope that it will be useful, but WITHOUT ANY-->
<!-- WARRANTY; without even the implied warranty of MERCHANTABILITY or -->
<!-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -->
<!-- for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU General Public License along-->
<!-- with eCos; if not, write to the Free Software Foundation, Inc., -->
<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -->
<!-- -->
<!-- As a special exception, if other files instantiate templates or use -->
<!-- macros or inline functions from this file, or you compile this file and-->
<!-- link it with other works to produce a work based on this file, this -->
<!-- file does not by itself cause the resulting work to be covered by the -->
<!-- GNU General Public License. However the source code for this file must -->
<!-- still be made available in accordance with section (3) of the GNU -->
<!-- General Public License. -->
<!-- -->
<!-- This exception does not invalidate any other reasons why a work based -->
<!-- on this file might be covered by the GNU General Public License. -->
<!-- -->
<!-- Alternative licenses for eCos may be arranged by contacting -->
<!-- Red Hat, Inc. at http://sources.redhat.com/ecos/ecos-license/ -->
<!-- ####ECOSGPLCOPYRIGHTEND#### -->
<!-- =============================================================== -->
<!-- #####DESCRIPTIONBEGIN#### -->
<!-- -->
<!-- Author(s): bartv -->
<!-- Based on cygnus-both.dsl by Mark Galassi -->
<!-- Contact(s): bartv -->
<!-- Date: 2000/03/15 -->
<!-- Version: 0.01 -->
<!-- -->
<!-- ####DESCRIPTIONEND#### -->
<!-- =============================================================== -->
 
<!-- }}} -->
 
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY % html "IGNORE">
<![%html;[
<!ENTITY % print "IGNORE">
<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl>
]]>
<!ENTITY % print "INCLUDE">
<![%print;[
<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA dsssl>
]]>
]>
 
<style-sheet>
<style-specification id="print" use="docbook">
<style-specification-body>
 
;; ====================
;; customize the print (PDF) US letter stylesheet
;; ====================
 
;; Set the paper parameters as per other eCos documentation
(define %page-width% 8.5in)
(define %page-height% 11in)
(define %left-margin% 0.75in)
(define %right-margin% 0.75in)
 
;; Assume that we are only producing books, a reasonable assumption
;; given the primary author :-)
(define %two-side% #t)
 
;; Use 12pt
;;(define %visual-acuity% "presbyopic")
 
;; Do not use graphics in admonitions, our documentation is supposed
;; to look boring :-(
(define %admon-graphics% #f)
 
;; Justified text please.
(define %default-quadding% 'justify)
 
;; A separate page for each man page please.
(define %refentry-new-page% #t)
 
;; The component writer's guide man pages do not describe functions
(define %refentry-functions% #f)
 
;; Program listings should use smaller font to fit on page width
(define %verbatim-size-factor% 0.87)
 
 
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="docbook.dsl">
</style-sheet>
 
/stylesheet.dsl
0,0 → 1,101
<!-- {{{ Banner -->
 
<!-- =============================================================== -->
<!-- -->
<!-- stylesheet.sgml -->
<!-- -->
<!-- Customize the nwalsh modular stylesheets. -->
<!-- -->
<!-- =============================================================== -->
<!-- ####ECOSGPLCOPYRIGHTBEGIN#### -->
<!-- This file is part of eCos, the Embedded Configurable Operating System. -->
<!-- Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
<!-- -->
<!-- eCos is free software; you can redistribute it and/or modify it under -->
<!-- the terms of the GNU General Public License as published by the Free -->
<!-- Software Foundation; either version 2 or (at your option) any later -->
<!-- version. -->
<!-- -->
<!-- eCos is distributed in the hope that it will be useful, but WITHOUT ANY-->
<!-- WARRANTY; without even the implied warranty of MERCHANTABILITY or -->
<!-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -->
<!-- for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU General Public License along-->
<!-- with eCos; if not, write to the Free Software Foundation, Inc., -->
<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -->
<!-- -->
<!-- As a special exception, if other files instantiate templates or use -->
<!-- macros or inline functions from this file, or you compile this file and-->
<!-- link it with other works to produce a work based on this file, this -->
<!-- file does not by itself cause the resulting work to be covered by the -->
<!-- GNU General Public License. However the source code for this file must -->
<!-- still be made available in accordance with section (3) of the GNU -->
<!-- General Public License. -->
<!-- -->
<!-- This exception does not invalidate any other reasons why a work based -->
<!-- on this file might be covered by the GNU General Public License. -->
<!-- -->
<!-- Alternative licenses for eCos may be arranged by contacting -->
<!-- Red Hat, Inc. at http://sources.redhat.com/ecos/ecos-license/ -->
<!-- ####ECOSGPLCOPYRIGHTEND#### -->
<!-- =============================================================== -->
<!-- #####DESCRIPTIONBEGIN#### -->
<!-- -->
<!-- Author(s): bartv -->
<!-- Based on cygnus-both.dsl by Mark Galassi -->
<!-- Contact(s): bartv -->
<!-- Date: 2000/03/15 -->
<!-- Version: 0.01 -->
<!-- -->
<!-- ####DESCRIPTIONEND#### -->
<!-- =============================================================== -->
 
<!-- }}} -->
 
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY % html "IGNORE">
<![%html;[
<!ENTITY % print "IGNORE">
<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl>
]]>
<!ENTITY % print "INCLUDE">
<![%print;[
<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA dsssl>
]]>
]>
 
<style-sheet>
 
<!--
;; ====================
;; customize the html stylesheet
;; ====================
-->
<style-specification id="html" use="docbook">
<style-specification-body>
 
;; .html files please.
(define %html-ext% ".html")
 
;; Boring admonitions
(define %admon-graphics% #f)
 
;; Nicely decorated program listing (in boxes)
(define %shade-verbatim% #t)
(define ($shade-verbatim-attr$)
(list
(list "BORDER" "5")
(list "BGCOLOR" "#E0E0F0")
(list "WIDTH" "70%")))
 
;; Use ID attributes as name for component HTML files?
(define %use-id-as-filename% #t)
 
</style-specification-body>
</style-specification>
 
<external-specification id="docbook" document="docbook.dsl">
 
</style-sheet>
 
/ssa4.dsl
0,0 → 1,110
<!-- {{{ Banner -->
 
<!-- =============================================================== -->
<!-- -->
<!-- stylesheet.sgml -->
<!-- -->
<!-- Customize the nwalsh modular stylesheets. -->
<!-- -->
<!-- =============================================================== -->
<!-- ####ECOSGPLCOPYRIGHTBEGIN#### -->
<!-- This file is part of eCos, the Embedded Configurable Operating System. -->
<!-- Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -->
<!-- -->
<!-- eCos is free software; you can redistribute it and/or modify it under -->
<!-- the terms of the GNU General Public License as published by the Free -->
<!-- Software Foundation; either version 2 or (at your option) any later -->
<!-- version. -->
<!-- -->
<!-- eCos is distributed in the hope that it will be useful, but WITHOUT ANY-->
<!-- WARRANTY; without even the implied warranty of MERCHANTABILITY or -->
<!-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -->
<!-- for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU General Public License along-->
<!-- with eCos; if not, write to the Free Software Foundation, Inc., -->
<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -->
<!-- -->
<!-- As a special exception, if other files instantiate templates or use -->
<!-- macros or inline functions from this file, or you compile this file and-->
<!-- link it with other works to produce a work based on this file, this -->
<!-- file does not by itself cause the resulting work to be covered by the -->
<!-- GNU General Public License. However the source code for this file must -->
<!-- still be made available in accordance with section (3) of the GNU -->
<!-- General Public License. -->
<!-- -->
<!-- This exception does not invalidate any other reasons why a work based -->
<!-- on this file might be covered by the GNU General Public License. -->
<!-- -->
<!-- Alternative licenses for eCos may be arranged by contacting -->
<!-- Red Hat, Inc. at http://sources.redhat.com/ecos/ecos-license/ -->
<!-- ####ECOSGPLCOPYRIGHTEND#### -->
<!-- =============================================================== -->
<!-- #####DESCRIPTIONBEGIN#### -->
<!-- -->
<!-- Author(s): bartv -->
<!-- Based on cygnus-both.dsl by Mark Galassi -->
<!-- Contact(s): bartv -->
<!-- Date: 2000/03/15 -->
<!-- Version: 0.01 -->
<!-- -->
<!-- ####DESCRIPTIONEND#### -->
<!-- =============================================================== -->
 
<!-- }}} -->
 
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY % html "IGNORE">
<![%html;[
<!ENTITY % print "IGNORE">
<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl>
]]>
<!ENTITY % print "INCLUDE">
<![%print;[
<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA dsssl>
]]>
]>
 
<style-sheet>
<style-specification id="print" use="docbook">
<style-specification-body>
 
;; ====================
;; customize the print (PDF) A4 stylesheet
;; ====================
 
;; Set the paper parameters as per other eCos documentation
(define %page-width% 210mm)
(define %page-height% 297mm)
(define %left-margin% 0.75in)
(define %right-margin% 0.75in)
 
;; Assume that we are only producing books, a reasonable assumption
;; given the primary author :-)
(define %two-side% #t)
 
;; Use 12pt
;;(define %visual-acuity% "presbyopic")
 
;; Do not use graphics in admonitions, our documentation is supposed
;; to look boring :-(
(define %admon-graphics% #f)
 
;; Justified text please.
(define %default-quadding% 'justify)
 
;; A separate page for each man page please.
(define %refentry-new-page% #t)
 
;; The component writer's guide man pages do not describe functions
(define %refentry-functions% #f)
 
;; Program listings should use smaller font to fit on page width
(define %verbatim-size-factor% 0.84)
 
 
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="docbook.dsl">
</style-sheet>
 
/fixhtml.tcl
0,0 → 1,146
#!/bin/bash
# restart using a Tcl shell \
exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \
( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \
done ; \
echo "fixhtml.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@"
 
#===============================================================================
#
# fixhtml.tcl
#
# Patch HTML files generated from DocBook sources.
#
#===============================================================================
#####ECOSGPLCOPYRIGHTBEGIN####
## -------------------------------------------
## This file is part of eCos, the Embedded Configurable Operating System.
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
##
## eCos is free software; you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free
## Software Foundation; either version 2 or (at your option) any later version.
##
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
## WARRANTY; without even the implied warranty of MERCHANTABILITY or
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
## for more details.
##
## You should have received a copy of the GNU General Public License along
## with eCos; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
##
## As a special exception, if other files instantiate templates or use macros
## or inline functions from this file, or you compile this file and link it
## with other works to produce a work based on this file, this file does not
## by itself cause the resulting work to be covered by the GNU General Public
## License. However the source code for this file must still be made available
## in accordance with section (3) of the GNU General Public License.
##
## This exception does not invalidate any other reasons why a work based on
## this file might be covered by the GNU General Public License.
##
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
## at http://sources.redhat.com/ecos/ecos-license/
## -------------------------------------------
#####ECOSGPLCOPYRIGHTEND####
#===============================================================================
######DESCRIPTIONBEGIN####
#
# Author(s): bartv
# Contributors: bartv
# Date: 2000-03-14
# Purpose: HTML files generated from DocBook sources using the nwalsh
# stylesheets have a number of problems. Most importantly,
# Netscape 4.x does not understand all of the character entities
# defined by HTML 4.0x
#
#####DESCRIPTIONEND####
#===============================================================================
#
 
# Find out the current year for the copyright message. Ideally
# this would be a range extracted from the sources, but that is
# a little bit tricky.
 
set year [clock format [clock seconds] -format "%Y"]
 
set copyright_banner \
"<!-- Copyright (C) $year Red Hat, Inc. -->
<!-- This material may be distributed only subject to the terms -->
<!-- and conditions set forth in the Open Publication License, v1.0 -->
<!-- or later (the latest version is presently available at -->
<!-- http://www.opencontent.org/openpub/). -->
<!-- Distribution of the work or derivative of the work in any -->
<!-- standard (paper) book form is prohibited unless prior -->
<!-- permission is obtained from the copyright holder. -->"
 
set files [glob *.html]
foreach file $files {
set status [catch {
set fd [open $file "r"]
set data [read $fd]
close $fd
 
# If there is already a (C) message on the first line, skip this file.
if {[regexp {[^\n]*Copyright (C) [0-9]* Red Hat.*} $data] == 0} {
 
# The DSSSL has the annoying habit of splitting tags over several lines.
# This should sort things out.
# REMOVED by jifl: doing this can add newlines in tags like
# <literallayout>, <screen>, and/or <programlisting>
# regsub -all "\n>" $data ">\n" data
# Add a copyright banner
set data "[set copyright_banner]\n[set data]"
 
# Look for a smarttags meta. If absent, insert one. There should
# already be one meta present identifying the stylesheet, so
# that identifies a sensible location for inserting another meta.
if {[regexp {MSSmartTagsPreventParsing} $data] == 0} {
regsub -nocase {<META} $data "<meta name=\"MSSmartTagsPreventParsing\" content=\"TRUE\">\n<META" data
}
# Take care of some character entities that Netscape does not understand
regsub -all "&mgr;" $data "\\&#03BC;" data
regsub -all "&mdash;" $data "\\&#8212;" data
regsub -all "&ndash;" $data "\\&#8211;" data
regsub -all "&hellip;" $data "\\&#8230;" data
regsub -all "&ldquo;" $data "\\&#8220;" data
regsub -all "&rdquo;" $data "\\&#8221;" data
regsub -all "&lsqb;" $data "\\&#0091;" data
regsub -all "&rsqb;" $data "\\&#0093;" data
regsub -all "&lcub;" $data "\\&#0123;" data
regsub -all "&rcub;" $data "\\&#0125;" data
regsub -all "&lsquo;" $data "\\&#8216;" data
regsub -all "&rsquo;" $data "\\&#8217;" data
regsub -all "&trade;" $data "\\&#8482;" data
regsub -all "&ast;" $data "\\&#0042;" data
regsub -all "&lowbar;" $data "\\&#0095;" data
regsub -all "&sol;" $data "\\&#0047;" data
regsub -all "&equals;" $data "\\&#0061;" data
regsub -all "&num;" $data "\\&#0035;" data
regsub -all "&plus;" $data "\\&#0043;" data
regsub -all "&percnt;" $data "\\&#0037;" data
regsub -all "&dollar;" $data "\\&#0036;" data
regsub -all "&boxv;" $data "\\&#9474;" data
regsub -all "&bsol;" $data "\\&#0092;" data
regsub -all "&block;" $data "\\&#9608;" data
regsub -all "&marker;" $data "\\&#9646;" data
 
# Now write the data back to the file. Do not bother to
# keep an old version lying around, the html files can be
# regenerated easily enough.
set fd [open $file "w"]
puts -nonewline $fd $data
close $fd
}
} result]
 
if {0 != $status} {
puts "Error while processing file $file\n $result"
exit 1
}
}
 
/rules.doc
0,0 → 1,161
#=============================================================================
#
# rules.doc
#
# Additional rules for processing documentation written in DocBook/SGML
#
#=============================================================================
#####ECOSGPLCOPYRIGHTBEGIN####
## -------------------------------------------
## This file is part of eCos, the Embedded Configurable Operating System.
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
##
## eCos is free software; you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free
## Software Foundation; either version 2 or (at your option) any later version.
##
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
## WARRANTY; without even the implied warranty of MERCHANTABILITY or
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
## for more details.
##
## You should have received a copy of the GNU General Public License along
## with eCos; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
##
## As a special exception, if other files instantiate templates or use macros
## or inline functions from this file, or you compile this file and link it
## with other works to produce a work based on this file, this file does not
## by itself cause the resulting work to be covered by the GNU General Public
## License. However the source code for this file must still be made available
## in accordance with section (3) of the GNU General Public License.
##
## This exception does not invalidate any other reasons why a work based on
## this file might be covered by the GNU General Public License.
##
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
## at http://sources.redhat.com/ecos/ecos-license/
## -------------------------------------------
#####ECOSGPLCOPYRIGHTEND####
#=============================================================================
#####DESCRIPTIONBEGIN####
#
# Author(s): bartv
# Date: 2001-01-11
# Purpose: Rules for processing documentation
# Description:
# Each package's doc directory's makefile should define the
# following variables:
# TOPLEVEL - of the component repository
# MAIN_SGML - documentation entry point
# OTHER_SGML - any other .sgml files accessed from main
# PICTURES - referenced by the SGML files
#####DESCRIPTIONEND####
#=============================================================================
 
.PHONY: default check html pdf clean copyfiles
 
# Locations of the stylesheets and other SGML support files. These
# have moved around in various releases of the tools.
ifneq (,$(wildcard /usr/share/sgml/docbook))
CATALOG := /etc/sgml/catalog
ifneq (,$(wildcard /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/catalog))
DSSSL_CATALOG := /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/catalog
else
DSSSL_CATALOG := $(firstword $(wildcard /usr/share/sgml/docbook/dsssl-stylesheets-*/catalog))
endif
else
ifneq (,$(wildcard /usr/lib/sgml/stylesheets/nwalsh-modular/catalog))
CATALOG := /usr/lib/sgml/CATALOG
DSSSL_CATALOG := /usr/lib/sgml/stylesheets/nwalsh-modular/catalog
else
ifneq (,$(wildcard /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/sgml.catalog))
CATALOG := /usr/lib/sgml/catalog
DSSSL_CATALOG := /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/sgml.catalog
else
Error: unable to locate DocBook tools.
endif
endif
endif
 
A4_STYLESHEET := $(TOPLEVEL)/pkgconf/ssa4.dsl
LETTER_STYLESHEET := $(TOPLEVEL)/pkgconf/ssletter.dsl
HTML_STYLESHEET := $(TOPLEVEL)/pkgconf/stylesheet.dsl
FIXHTML := $(TOPLEVEL)/pkgconf/fixhtml.tcl
 
# The files that will be generated:
ifeq (,$(MAIN_HTML))
MAIN_HTML := $(subst .sgml,.html,$(MAIN_SGML))
endif
ifeq (,$(MAIN_PDF))
MAIN_PDF := $(subst .sgml,.pdf,$(MAIN_SGML))
endif
 
MAIN_PDFA4 := $(subst .pdf,-a4.pdf,$(MAIN_PDF))
MAIN_PDFLETTER := $(subst .pdf,-letter.pdf,$(MAIN_PDF))
 
# Rules for generating pictures
GIFS := $(foreach x,$(PICTURES),$(x).gif)
EPS := $(foreach x,$(PICTURES),$(x).eps)
PNGS :=$(foreach x,$(PICTURES),$(x).png)
 
%.gif: %.fig
convert -crop 0x0 $< $@
 
%.png: %.fig
fig2dev -L png $< $@
 
%.eps: %.fig
convert -crop 0x0 $< $@
 
# This is a little grotty. In some cases we want to just copy files from
# their source location to the destination's current dir and nothing
# more.
copyfiles:
ifneq (,$(COPYFILES))
cp $(COPYFILES) .
endif
 
default: check
 
# Validating an sgml document can be achieved with
check: $(MAIN_SGML) $(OTHER_SGML) $(GIFS) $(EPS)
nsgmls -vs -c $(CATALOG) $<
 
# Generating HTML from the SGML. In practice multiple .html files may
# be generated, but for the purposes of dependency analysis the others
# can be ignored.
html: copyfiles $(MAIN_HTML)
 
$(MAIN_HTML): $(MAIN_SGML) $(OTHER_SGML) $(PNGS) $(HTML_STYLESHEET) $(FIXHTML)
jade -t sgml -i html -c $(DSSSL_CATALOG) -d $(HTML_STYLESHEET)#html $<
tclsh $(FIXHTML)
 
# PDF files can be generated in a similar fashion.
pdfa4: copyfiles $(MAIN_PDFA4)
 
$(MAIN_PDFA4): $(MAIN_SGML) $(OTHER_SGML) $(PNGS) $(A4_STYLESHEET)
jade -o $(subst .pdf,.tex,$(MAIN_PDFA4)) -t tex -V tex-backend -c $(DSSSL_CATALOG) -d $(A4_STYLESHEET)#print $<
pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFA4))
pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFA4))
pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFA4))
 
pdfletter: copyfiles $(MAIN_PDFLETTER)
 
$(MAIN_PDFLETTER): $(MAIN_SGML) $(OTHER_SGML) $(PNGS) $(LETTER_STYLESHEET)
jade -o $(subst .pdf,.tex,$(MAIN_PDFLETTER)) -t tex -V tex-backend -c $(DSSSL_CATALOG) -d $(LETTER_STYLESHEET)#print $<
pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFLETTER))
pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFLETTER))
pdfjadetex $(subst .pdf,.tex,$(MAIN_PDFLETTER))
 
#$(MAIN_PDF): $(MAIN_SGML) $(OTHER_SGML) $(EPS) $(ECOS_STYLESHEET)
# jade -o $(subst .sgml,.tex,$(MAIN_SGML)) -t tex -V tex-backend -d $(ECOS_STYLESHEET)#print $<
# jadetex $(subst .sgml,.tex,$(MAIN_SGML))
# jadetex $(subst .sgml,.tex,$(MAIN_SGML))
# jadetex $(subst .sgml,.tex,$(MAIN_SGML))
# dvips -o $(subst .sgml,.ps,$(MAIN_SGML)) $(subst .sgml,.dvi,$(MAIN_SGML))
# ps2pdf $(subst .sgml,.ps,$(MAIN_SGML)) $(subst .sgml,.pdf,$(MAIN_SGML))
 
# Clean. For now assume that all .html, .gif etc files are generated
clean:
rm -rf *.html *.tex *.dvi *.aux *.log *.out *.ps *.pdf *.gif *.eps *.png

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.