This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH 1/2] makedoc: make errors visible
- From: Jon Turney <jon dot turney at dronecode dot org dot uk>
- To: newlib at sourceware dot org
- Cc: Jon Turney <jon dot turney at dronecode dot org dot uk>
- Date: Tue, 5 Dec 2017 12:47:13 +0000
- Subject: [PATCH 1/2] makedoc: make errors visible
- Authentication-results: sourceware.org; auth=none
- References: <20171205124714.40980-1-jon.turney@dronecode.org.uk>
Discard QUICKREF sections, rather than writing them to stderr
Discard MATHREF sections, rather than discarding as an error
Pass NOTES sections through to texinfo, rather than discarding as an error
Don't redirect makedoc stderr
Remove makedoc output on error
For ease of reviewing, this patch doesn't contain Makefile.in regneration.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
---
newlib/Makefile.shared | 4 ++--
newlib/doc/doc.str | 10 +++++++---
newlib/doc/makedoc.c | 47 -----------------------------------------------
3 files changed, 9 insertions(+), 52 deletions(-)
diff --git a/newlib/Makefile.shared b/newlib/Makefile.shared
index c9ce5f468..7059ca7bf 100644
--- a/newlib/Makefile.shared
+++ b/newlib/Makefile.shared
@@ -14,8 +14,8 @@ SUFFIXES = .def .xml
CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
+ $(CHEW) < $< > $*.def || ( rm $*.def && false )
+ @touch stmp-def
TARGETDOC ?= ../tmp.texi
diff --git a/newlib/doc/doc.str b/newlib/doc/doc.str
index 3fc1006f8..949c6e794 100644
--- a/newlib/doc/doc.str
+++ b/newlib/doc/doc.str
@@ -17,9 +17,10 @@
: QUICKREF
skip_past_newline
- get_stuff_in_command
- "&&~&&~&&\cr\tablerule\n"
- quickref
+ ;
+
+: MATHREF
+ skip_past_newline
;
: EXAMPLE
@@ -153,6 +154,9 @@
: SEEALSO
"@strong{See Also}@*\n" catstr subhead ;
+: NOTES
+ "@strong{Notes}@*\n" catstr subhead ;
+
: INTERNAL_FUNCTION
;
diff --git a/newlib/doc/makedoc.c b/newlib/doc/makedoc.c
index 96362f782..fdcc5b926 100644
--- a/newlib/doc/makedoc.c
+++ b/newlib/doc/makedoc.c
@@ -444,52 +444,6 @@ WORD(translatecomments)
}
-/* find something like
- QUICKREF
- memchar ansi pure
-
- into
- merge with words on tos and output them to stderror
-
-*/
-WORD(quickref)
-{
- string_type *nos = tos-1;
- unsigned int nosscan = 0;
- unsigned int idx = 0;
-
- while (at(tos, idx))
- {
- if (at(tos,idx) == '~')
- {
- /* Skip the whitespace */
- while (at(nos, nosscan) == ' ')
- nosscan++;
-
- /* Sub the next word from the nos*/
- while (at(nos, nosscan) != ' ' &&
- at(nos, nosscan) != 0)
- {
- fprintf(stderr, "%c", at(nos, nosscan));
- nosscan++;
- }
- }
-
- else
- {
- fprintf(stderr,"%c", at(tos, idx));
-
- }
- idx++;
- }
-
- delete_string(tos);
- delete_string(nos);
- tos-=2;
- pc++;
-
-}
-
#if 0
/* turn everything not starting with a . into a comment */
@@ -1428,7 +1382,6 @@ char *av[])
add_intrinsic("translatecomments", translatecomments );
add_intrinsic("kill_bogus_lines", kill_bogus_lines);
add_intrinsic("indent", indent);
- add_intrinsic("quickref", quickref);
add_intrinsic("internalmode", internalmode);
/* Put a nl at the start */
--
2.15.1