hholzgra Fri Feb 1 06:13:37 2002 EDT
Added files:
/phpdoc/scripts missing-entities.sh.in
Modified files:
/phpdoc Makefile.in configure.in manual.xml.in
Log:
creating fallbacks for missing entities done right now
Index: phpdoc/Makefile.in
diff -u phpdoc/Makefile.in:1.109 phpdoc/Makefile.in:1.110
--- phpdoc/Makefile.in:1.109 Thu Jan 31 16:27:14 2002
+++ phpdoc/Makefile.in Fri Feb 1 06:13:36 2002
@@ -13,7 +13,7 @@
#
#
-# $Id: Makefile.in,v 1.109 2002/01/31 21:27:14 hholzgra Exp $
+# $Id: Makefile.in,v 1.110 2002/02/01 11:13:36 hholzgra Exp $
#
all: html
@@ -42,7 +42,7 @@
KDEVELOP_TOC_STYLESHEET=dsssl/kdevelop_toc.dsl
XMLDCL=$(srcdir)/dtds/dbxml-@DOCBOOK_VERSION@/phpdocxml.dcl
-HTML_DEPS=$(HTML_STYLESHEET) dsssl/html-common.dsl dsssl/html-locale.dsl.in
dsssl/common.dsl.in zendapi entities
+HTML_DEPS=$(HTML_STYLESHEET) dsssl/html-common.dsl dsssl/html-locale.dsl.in
+dsssl/common.dsl.in zendapi
HOWTO_DEPS=$(HOWTO_STYLESHEET) dsssl/html-common.dsl dsssl/html-locale.dsl.in
dsssl/common.dsl.in howto/howto.ent
PRINT_DEPS=$(PRINT_STYLESHEET) dsssl/common.dsl.in dsssl/print.dsl.in zendapi
PHPWEB_DEPS=$(PHPWEB_STYLESHEET) dsssl/html-common.dsl dsssl/common.dsl zendapi
@@ -59,9 +59,7 @@
@AUTOGENERATED_RULES@
entities: FORCE
- $(NSGMLS) -i lang-$(LANG) -s $(XMLDCL) manual.xml 2>&1 | grep "not defined" |
sed -e's/^.* "/<!ENTITY /g' | sed -e's/".*/ "???">/g' | sort | uniq >
entities/missing-entities.ent
- $(NSGMLS) -i lang-$(LANG) -s $(XMLDCL) manual.xml 2>&1 | grep
non-existent | sed -e"s/^.* ID /<para id=/g"| sed -e"s/$$/><\/para>/g" | sort | uniq >
entities/missing-ids.xml
-
+ $(srcdir)/scripts/entities.sh
manual.xml: $(srcdir)/manual.xml.in .manual.xml
CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
@@ -228,12 +226,16 @@
# test all possible errors
test: manual.xml
- if test ! -e funcindex.xml; then touch funcindex.xml; fi
+ @if test ! -e funcindex.xml; then touch funcindex.xml; fi
+ @if test ! -e entities/missing-entities.ent; then touch
+entities/missing-entities.ent; fi
+ @if test ! -e entities/missing-ids.xml; then touch entities/missing-ids.xml;
+fi
$(NSGMLS) -i lang-$(LANG) -s $(XMLDCL) manual.xml
# ignore missing IDs and check if the manual can be generated anyway
test_man_gen: manual.xml
- if test ! -e funcindex.xml; then touch funcindex.xml; fi
+ @if test ! -e funcindex.xml; then touch funcindex.xml; fi
+ @if test ! -e entities/missing-entities.ent; then touch
+entities/missing-entities.ent; fi
+ @if test ! -e entities/missing-ids.xml; then touch entities/missing-ids.xml;
+fi
$(NSGMLS) -wno-idref -i lang-$(LANG) -s $(XMLDCL) manual.xml
# }}}
@@ -248,6 +250,7 @@
rm -f *.aux *.tex *.log *.dvi *.toc *.ps *.gz
rm -f status.txt missing.txt
rm -f entities/chapters.ent
+ rm -f entities/missing*
distclean: clean
for file in `find . -name "*.in"`; do rm `dirname $$file`/`basename $$file
.in`; done
Index: phpdoc/configure.in
diff -u phpdoc/configure.in:1.123 phpdoc/configure.in:1.124
--- phpdoc/configure.in:1.123 Mon Jan 28 12:10:12 2002
+++ phpdoc/configure.in Fri Feb 1 06:13:36 2002
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.123 2002/01/28 17:10:12 phanto Exp $
+dnl $Id: configure.in,v 1.124 2002/02/01 11:13:36 hholzgra Exp $
dnl autoconf initialisation
AC_INIT()
@@ -630,7 +630,7 @@
dnl {{{ generate output files
dnl keep in one line for win32
-AC_OUTPUT(Makefile entities/version.ent dsssl/common.dsl dsssl/howto.dsl
dsssl/html.dsl dsssl/html-locale.dsl dsssl/install.dsl dsssl/print.dsl
dsssl/phpweb.dsl dsssl/quickref.dsl manual.xml xsl/html.xsl xsl/bightml.xsl
xsl/print.xsl xsl/htmlhelp.xsl)
+AC_OUTPUT(Makefile entities/version.ent dsssl/common.dsl dsssl/howto.dsl
+dsssl/html.dsl dsssl/html-locale.dsl dsssl/install.dsl dsssl/print.dsl
+dsssl/phpweb.dsl dsssl/quickref.dsl manual.xml xsl/html.xsl xsl/bightml.xsl
+xsl/print.xsl xsl/htmlhelp.xsl scripts/missing-entities.sh)
rm -f autogenerated_rules
dnl {{{ generate additional entity file for translation support
@@ -669,6 +669,11 @@
echo "<!ENTITY global.function-index SYSTEM \"./funcindex.xml\">" >>
entities/chapters.ent
chmod a-w entities/chapters.ent
+
+dnl check for missing IDs and ENTITYs in translation
+echo creating entities/missing-entities.ent and entities/missing-ids.xml
+chmod u+x scripts/missing-entities.sh
+scripts/missing-entities.sh
dnl }}}
Index: phpdoc/manual.xml.in
diff -u phpdoc/manual.xml.in:1.107 phpdoc/manual.xml.in:1.108
--- phpdoc/manual.xml.in:1.107 Thu Jan 31 16:27:14 2002
+++ phpdoc/manual.xml.in Fri Feb 1 06:13:36 2002
@@ -215,7 +215,7 @@
&appendices.resources;
&appendices.about;
&global.function-index;
-<appendix><title>missing stuff</title>&missing-ids;</appendix>
+ &missing-ids;
</part>
</book>
Index: phpdoc/scripts/missing-entities.sh.in
+++ phpdoc/scripts/missing-entities.sh.in
#!/bin/sh
# generate files containing missing entities
srcdir="@srcdir@"
NSGMLS="@SP_OPTIONS@ @NSGMLS@"
LANG="@LANG@ -D ."
XMLDCL="$srcdir/dtds/dbxml-@DOCBOOK_VERSION@/phpdocxml.dcl"
# extract and rewrite undefined entities error messages
echo "<?xml version='1.0' encoding='iso-8859-1'?> " \
> entities/missing-entities.ent
$NSGMLS -i lang-$LANG -s $XMLDCL manual.xml 2>&1 \
| grep "not defined" \
| sed -e's/^.* "/<!ENTITY /g' \
| sed -e's/".*/ "???">/g' \
| sort \
| uniq \
>> entities/missing-entities.ent
# extract and rewrite undefined id error messages
echo "<?xml version='1.0' encoding='iso-8859-1'?> " \
> entities/missing-ids.xml
echo "<appendix><title>missing stuff</title>" \
>> entities/missing-ids.xml
$NSGMLS -i lang-$LANG -s $XMLDCL manual.xml 2>&1 \
| grep non-existent \
| sed -e"s/^.* ID /<para id=/g" \
| sed -e"s/$/><\/para>/g" \
| sort \
| uniq \
>> entities/missing-ids.xml
echo "</appendix>" \
>> entities/missing-ids.xml
# make file empty if no missing ids found
if ! grep -q para entities/missing-ids.xml
then
rm entities/missing-ids.xml
echo "<?xml version='1.0' encoding='iso-8859-1'> " \
> entities/missing-ids.xml
fi