cygwin-doc and newlib manpages
Jon TURNEY
jon.turney@dronecode.org.uk
Fri Jun 20 13:04:00 GMT 2014
The man page for the printf family of functions in the cygwin-doc
package is only installed under the name sprintf, and not any of the
names of other functions it also documents (printf, fprintf, etc.)
Looking into this, it seems that the cygwin-doc scripts are supposed to
do this, but have been broken for some time, as the index in the .info
file the manpages are generated from has a different header ('Document
Index') to that expected ('Index').
First attached patch is to fix that.
Unfortunately, I needed to do a bit more fixing up of cygwin-doc for a
working build, and it also seems that it needs some updating for last
year's Docbook XML modernization.
Trying to to do that, the cygwin2info Makefile rule has some problem I
don't understand.
On the .sgml files, it dies with "Can't call method "ext" without a
package or object reference at
/usr/share/sgml/docbook/utils-0.6.14/helpers/docbook2texi-spec.pl line
320, <STDIN> line 2."
Also, I think this probably needs to be (somehow) updated to use
docbook2x-texi on the .xml files
-------------- next part --------------
Fix generation of aliased manpages with current info files
---
scripts/newlibinfo2man.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: cygwin-doc/scripts/newlibinfo2man.pl
===================================================================
--- cygwin-doc.orig/scripts/newlibinfo2man.pl
+++ cygwin-doc/scripts/newlibinfo2man.pl
@@ -20,7 +20,7 @@ mkdir $mandir, 0755;
# We know which nodes are summaries from the list
@summary_nodes = qw( Top Math version Reentrancy Index Ctype
Stdio Strings Signals Timefns Locale Misc Syscalls Stubs
-ReentrantSyscalls Arglists Stdarg Varargs Stdlib LibraryIndex );
+ReentrantSyscalls Arglists Stdarg Varargs Stdlib LibraryIndex DocumentIndex );
foreach (@ARGV)
{
@@ -129,7 +129,7 @@ foreach (@ARGV)
# Some man pages desribe more than one function like:
#'* acosf: acos.'
# The Index tells us which links to make
- if ((grep /$node/, "Index") || (grep /$node/, "Library Index"))
+ if ((grep /$node/, "Index") || (grep /$node/, "LibraryIndex") || (grep /$node/, "DocumentIndex"))
{
s/.br\n//;
s/\(.*//; # Remove (line 6)
-------------- next part --------------
Update for filename changes after docbook XML modernization
---
configure | 4 ++--
scripts/update-src-files.sh | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
Index: cygwin-doc/configure
===================================================================
--- cygwin-doc.orig/configure
+++ cygwin-doc/configure
@@ -55,8 +55,8 @@ newlibinfo2man:
.PHONY: cygwin2info
cygwin2info:
@echo creating cygwin texi files
- for f in src/*/*.sgml; do \\
- docbook2texi -o src/texi -e no-idref -e no-significant -e no-valid -c \${soc} -d src/cygwin.dsl \$\$f; \\
+ for f in src/*/*.sgml src/*/*.xml; do \\
+ docbook2texi -o src/texi -e no-idref -e no-significant -e no-valid -c \${soc} -d src/cygwin.xsl \$\$f; \\
done
@echo creating cygwin info files
cd share/info; for f in ../../src/texi/*.texi; do \\
Index: cygwin-doc/scripts/update-src-files.sh
===================================================================
--- cygwin-doc.orig/scripts/update-src-files.sh
+++ cygwin-doc/scripts/update-src-files.sh
@@ -31,10 +31,10 @@ fi
rm -rf src
mkdir -p src/api src/utils src/info
-for f in "$builddir/winsup"/doc/*.sgml "$srcdir"/winsup/cygwin/*.sgml; do
+for f in "$builddir/winsup"/doc/*.xml "$srcdir"/winsup/cygwin/*.sgml; do
cvt "$f" src/api
done
-for f in "$srcdir/winsup"/utils/*.sgml; do
+for f in "$srcdir/winsup"/utils/*.xml; do
cvt "$f" src/utils
done
@@ -50,4 +50,4 @@ for i in libc libm; do
cat ${f}* > src/info/$i.info
done
-exec cp -p "$srcdir"/winsup/doc/*.dsl src/
+exec cp -p "$srcdir"/winsup/doc/*.xsl src/
-------------- next part --------------
Various other build fixes
---
configure | 4 ++--
scripts/update-src-files.sh | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
Index: cygwin-doc/configure
===================================================================
--- cygwin-doc.orig/configure
+++ cygwin-doc/configure
@@ -11,7 +11,7 @@ if [ -d "$srcdir/src" ]; then
else
echo -n "configure: looking for parallel cygwin build directory... "
for f in ../cygwin-[^.]*.[^.]*.[^.*]-*[0-9]; do
- cygwin_build="$f"
+ [ -d "$f" ] && cygwin_build="$f"
done
[ -z "$cygwin_build" ] && { echo; echo "configure: couldn't find a cygwin build directory. Build cygwin first!" 1>&2; exit 1; }
@@ -21,7 +21,7 @@ else
fi
echo -n 'configure: finding relevant catalog file... '
-soc=$(find /usr/share/sgml/[Oo]pen[Ss]p* -name xml.soc)
+soc=$(find /usr/share/sgml/[Oo]pen[Ss][Pp]* -name xml.soc)
[ -z "$soc" ] && { echo; echo "configure: couldn't find a catalog file 'xml.soc'. Can't continue" 1>&2; exit 1; }
echo "$soc"
Index: cygwin-doc/scripts/update-src-files.sh
===================================================================
--- cygwin-doc.orig/scripts/update-src-files.sh
+++ cygwin-doc/scripts/update-src-files.sh
@@ -23,7 +23,7 @@ if [ -z "$srcdir" ]; then
exit 1
fi
-srcdir=$(cd "$srcdir"/..; pwd)
+srcdir=$(cd $builddir/newlib; cd "$srcdir"/..; pwd)
if [ -z "$srcdir" ]; then
echo "couldn't find srcdir path from $srcdir/.." 1>&2
exit 1
More information about the Cygwin-developers
mailing list