This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 3/3] Move duplicated documentation Makefile rules to Makefile.shared


Move duplicated documentation rules from individual Makefile.am files to
Makefile.shared

Also, harmonize libm to use CHEWOUT_FILES like libc, rather than chobj.  Update
documentation appropriately.

Set TARGETDOC with ?= as it is usually explicitly set to something else

I'm not sure how or if 'make info' currently works when configured
--enable-newlib-iconv, as iconv/ccs and iconv/ces seem to reference non-existent
.tex files, and attempt to generate .def files for non-existent source files.
Drop those.

XXX: for ease of review, Makefile.in regeneration is not included in this patch.

2015-10-27  Jon Turney  <jon.turney@dronecode.org.uk>

	* HOWTO: Update.
	* Makefile.shared: Move documentation rules to here...
	* libc/argz/Makefile.am: ... from here ...
	* libc/ctype/Makefile.am: ... and here.
	* libc/errno/Makefile.am: Ditto.
	* libc/iconv/Makefile.am: Ditto.
	* libc/iconv/ccs/Makefile.am : Ditto.
	* libc/iconv/ces/Makefile.am: Ditto.
	* libc/iconv/lib/Makefile.am: Ditto.
	* libc/locale/Makefile.am: Ditto.
	* libc/misc/Makefile.am: Ditto.
	* libc/posix/Makefile.am: Ditto.
	* libc/reent/Makefile.am: Ditto.
	* libc/search/Makefile.am: Ditto.
	* libc/stdio/Makefile.am: Ditto.
	* libc/stdio64/Makefile.am: Ditto.
	* libc/stdlib/Makefile.am : Ditto.
	* libc/string/Makefile.am: Ditto.
	* libc/syscalls/Makefile.am: Ditto.
	* libc/time/Makefile.am : Ditto.
	* libc/unix/Makefile.am: Ditto.
	* libc/xdr/Makefile.am: Ditto.
	* libm/common/Makefile.am: Ditto.
	* libm/complex/Makefile.am: Ditto.
	* libm/math/Makefile.am: Ditto.
	* libm/mathfp/Makefile.am: Ditto.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
---
 newlib/ChangeLog                  | 29 +++++++++++++++++++++++++++++
 newlib/HOWTO                      | 15 +++++++--------
 newlib/Makefile.shared            | 21 +++++++++++++++++++++
 newlib/libc/argz/Makefile.am      | 16 ++--------------
 newlib/libc/ctype/Makefile.am     | 15 +--------------
 newlib/libc/errno/Makefile.am     | 15 +--------------
 newlib/libc/iconv/Makefile.am     |  9 +--------
 newlib/libc/iconv/ccs/Makefile.am | 18 ++----------------
 newlib/libc/iconv/ces/Makefile.am | 19 ++-----------------
 newlib/libc/iconv/lib/Makefile.am | 14 +-------------
 newlib/libc/locale/Makefile.am    | 16 +---------------
 newlib/libc/misc/Makefile.am      | 16 +---------------
 newlib/libc/posix/Makefile.am     | 17 ++---------------
 newlib/libc/reent/Makefile.am     | 15 +--------------
 newlib/libc/search/Makefile.am    | 14 +-------------
 newlib/libc/signal/Makefile.am    | 15 +--------------
 newlib/libc/stdio/Makefile.am     | 15 +--------------
 newlib/libc/stdio64/Makefile.am   | 16 +---------------
 newlib/libc/stdlib/Makefile.am    | 15 +--------------
 newlib/libc/string/Makefile.am    | 16 +---------------
 newlib/libc/syscalls/Makefile.am  | 15 +--------------
 newlib/libc/time/Makefile.am      | 15 +--------------
 newlib/libc/unix/Makefile.am      | 15 +--------------
 newlib/libc/xdr/Makefile.am       | 16 ++--------------
 newlib/libm/common/Makefile.am    | 16 ++--------------
 newlib/libm/complex/Makefile.am   | 18 ++----------------
 newlib/libm/math/Makefile.am      | 17 ++---------------
 newlib/libm/mathfp/Makefile.am    | 17 ++---------------
 28 files changed, 91 insertions(+), 364 deletions(-)

diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 6523a57..899b265 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,5 +1,34 @@
 2015-10-27  Jon Turney  <jon.turney@dronecode.org.uk>
 
+	* HOWTO: Update.
+	* Makefile.shared: Move documentation rules to here...
+	* libc/argz/Makefile.am: ... from here ...
+	* libc/ctype/Makefile.am: ... and here.
+	* libc/errno/Makefile.am: Ditto.
+	* libc/iconv/Makefile.am: Ditto.
+	* libc/iconv/ccs/Makefile.am : Ditto.
+	* libc/iconv/ces/Makefile.am: Ditto.
+	* libc/iconv/lib/Makefile.am: Ditto.
+	* libc/locale/Makefile.am: Ditto.
+	* libc/misc/Makefile.am: Ditto.
+	* libc/posix/Makefile.am: Ditto.
+	* libc/reent/Makefile.am: Ditto.
+	* libc/search/Makefile.am: Ditto.
+	* libc/stdio/Makefile.am: Ditto.
+	* libc/stdio64/Makefile.am: Ditto.
+	* libc/stdlib/Makefile.am : Ditto.
+	* libc/string/Makefile.am: Ditto.
+	* libc/syscalls/Makefile.am: Ditto.
+	* libc/time/Makefile.am : Ditto.
+	* libc/unix/Makefile.am: Ditto.
+	* libc/xdr/Makefile.am: Ditto.
+	* libm/common/Makefile.am: Ditto.
+	* libm/complex/Makefile.am: Ditto.
+	* libm/math/Makefile.am: Ditto.
+	* libm/mathfp/Makefile.am: Ditto.
+
+2015-10-27  Jon Turney  <jon.turney@dronecode.org.uk>
+
 	* libc/time/wcsftime.c: Consistently use an em-dash in FUNCTION
 	summary.
 	* libm/common/isgreater.c: Ditto.
diff --git a/newlib/HOWTO b/newlib/HOWTO
index 6361620..c5754e5 100644
--- a/newlib/HOWTO
+++ b/newlib/HOWTO
@@ -59,18 +59,17 @@ and PORTABILITY.  BUGS and SEEALSO should be added as appropriate.
 
      Source files which contain documentation are processed into ".def"
 files with the extracted information.  These .def files are noted in the
-makefiles as either CHEWOUT_FILES in the libc makefiles or chobj in the libm
-makefiles.  These .def files need to be included into an appropriate .tex 
-file for inclusion in the manuals (one each for libc and libm).  Pay special 
-attention under libc, as the manual is arranged by header file name, but not
-all header files are represented by directories (e.g.  wcsftime.c is found 
-under libc/time, but goes under wchar.h in the manual.)
+makefiles as CHEWOUT_FILES.  These .def files need to be included into an
+appropriate .tex file for inclusion in the manuals (one each for libc and libm).
+Pay special attention under libc, as the manual is arranged by header file name,
+but not all header files are represented by directories (e.g.  wcsftime.c is
+found under libc/time, but goes under wchar.h in the manual.)
 
 In summary, to add new documentation:
 
 1.  Add properly-formatted comments to source file (e.g. src.c);
-2.  add "chewout" file to list in Makefile.am (CHEWOUT_FILES in libc or chobj in
-    libm) (e.g. src.def), re-generate Makefile.in;
+2.  add "chewout" file to CHEWOUT_FILES list in Makefile.am (e.g. src.def),
+    re-generate Makefile.in;
 3.  add file to something.tex;
 4.  make ChangeLog entry and generate patch.
  
diff --git a/newlib/Makefile.shared b/newlib/Makefile.shared
index 50e2f0c..6e026fd 100644
--- a/newlib/Makefile.shared
+++ b/newlib/Makefile.shared
@@ -5,3 +5,24 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
 	  echo $$i `pwd`/$$i >> objectlist.awk.in ; \
 	done
 
+#
+# documentation rules
+#
+
+SUFFIXES = .def
+
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+
+.c.def:
+	$(CHEW) < $< > $*.def 2> $*.ref
+	touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+	for chapter in $(CHAPTERS) ; \
+	do \
+	  cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+	done
+
+CLEANFILES = $(CHEWOUT_FILES) *.ref
diff --git a/newlib/libc/argz/Makefile.am b/newlib/libc/argz/Makefile.am
index 74e7307..e5e6904 100644
--- a/newlib/libc/argz/Makefile.am
+++ b/newlib/libc/argz/Makefile.am
@@ -43,20 +43,8 @@ lib_a_CFLAGS = $(AM_CFLAGS)
 noinst_DATA =
 endif # USE_LIBTOOL
 
-SUFFIXES = .def
-
 CHEWOUT_FILES =
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS =
+# No doc for argz.
 
 include $(srcdir)/../../Makefile.shared
diff --git a/newlib/libc/ctype/Makefile.am b/newlib/libc/ctype/Makefile.am
index 785bf7a..58ec2f8 100644
--- a/newlib/libc/ctype/Makefile.am
+++ b/newlib/libc/ctype/Makefile.am
@@ -98,19 +98,6 @@ CHEWOUT_FILES= \
 	wctrans.def	\
 	wctype.def	
 
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-	cat $(srcdir)/ctype.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = ctype.tex
 
 $(lpfx)ctype_.$(oext): ctype_.c ctype_iso.h ctype_cp.h
diff --git a/newlib/libc/errno/Makefile.am b/newlib/libc/errno/Makefile.am
index db5bb3d..187e303 100644
--- a/newlib/libc/errno/Makefile.am
+++ b/newlib/libc/errno/Makefile.am
@@ -22,18 +22,5 @@ endif # USE_LIBTOOL
 include $(srcdir)/../../Makefile.shared
 
 CHEWOUT_FILES =
-
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
+CHAPTERS =
 # No doc for errno.
-doc:
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
diff --git a/newlib/libc/iconv/Makefile.am b/newlib/libc/iconv/Makefile.am
index 561f03e..e7ffefa 100644
--- a/newlib/libc/iconv/Makefile.am
+++ b/newlib/libc/iconv/Makefile.am
@@ -13,6 +13,7 @@ SUBDEFS = lib/stmp-def
 include $(srcdir)/../../Makefile.shared
 
 CHEWOUT_FILES = iconv.def
+CHAPTERS = iconv.tex
 
 iconv.def: lib/iconv.def
 	cp lib/iconv.def iconv.def
@@ -29,11 +30,3 @@ $(SUBDEFS): stmp-def
 lib/iconv.def: $(SUBDEFS); @true
 
 lib/stmp-def: ; @true
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-	cat $(srcdir)/iconv.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
-
diff --git a/newlib/libc/iconv/ccs/Makefile.am b/newlib/libc/iconv/ccs/Makefile.am
index ce0428e..295d846 100644
--- a/newlib/libc/iconv/ccs/Makefile.am
+++ b/newlib/libc/iconv/ccs/Makefile.am
@@ -47,21 +47,7 @@ noinst_DATA =
 
 SUBDIRS=binary
 
-CHEWOUT_FILES = ccs.def
-
-SUFFIXES = .def
-
-CHEW = ../../../doc/makedoc -f $(srcdir)/../../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-	cat $(srcdir)/ccs.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES =
+CHAPTERS =
 
 include $(srcdir)/../../../Makefile.shared
diff --git a/newlib/libc/iconv/ces/Makefile.am b/newlib/libc/iconv/ces/Makefile.am
index 92a19d2..d81c5f5 100644
--- a/newlib/libc/iconv/ces/Makefile.am
+++ b/newlib/libc/iconv/ces/Makefile.am
@@ -42,20 +42,5 @@ noinst_DATA =
 
 include $(srcdir)/../../../Makefile.shared
 
-CHEWOUT_FILES = ces.def
-
-SUFFIXES = .def
-
-CHEW = ../../../doc/makedoc -f $(srcdir)/../../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-	cat $(srcdir)/ces.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
-
+CHEWOUT_FILES =
+CHAPTERS =
diff --git a/newlib/libc/iconv/lib/Makefile.am b/newlib/libc/iconv/lib/Makefile.am
index d8fd528..dd6c340 100644
--- a/newlib/libc/iconv/lib/Makefile.am
+++ b/newlib/libc/iconv/lib/Makefile.am
@@ -34,16 +34,4 @@ noinst_DATA =
 include $(srcdir)/../../../Makefile.shared
 
 CHEWOUT_FILES = iconv.def
-
-SUFFIXES = .def
-
-CHEW = ../../../doc/makedoc -f $(srcdir)/../../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-doc: $(CHEWOUT_FILES)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
-
+CHAPTER =
diff --git a/newlib/libc/locale/Makefile.am b/newlib/libc/locale/Makefile.am
index 66cc7ba..eaeb385 100644
--- a/newlib/libc/locale/Makefile.am
+++ b/newlib/libc/locale/Makefile.am
@@ -38,18 +38,4 @@ include $(srcdir)/../../Makefile.shared
 
 CHEWOUT_FILES = locale.def
 
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-	cat $(srcdir)/locale.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
-
+CHAPTERS = locale.tex
diff --git a/newlib/libc/misc/Makefile.am b/newlib/libc/misc/Makefile.am
index 8ac62a2..3fe8e55 100644
--- a/newlib/libc/misc/Makefile.am
+++ b/newlib/libc/misc/Makefile.am
@@ -22,18 +22,4 @@ endif # USE_LIBTOOL
 include $(srcdir)/../../Makefile.shared
 
 CHEWOUT_FILES = unctrl.def ffs.def
-
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-	cat $(srcdir)/misc.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = misc.tex
diff --git a/newlib/libc/posix/Makefile.am b/newlib/libc/posix/Makefile.am
index 0056cc1..481849c 100644
--- a/newlib/libc/posix/Makefile.am
+++ b/newlib/libc/posix/Makefile.am
@@ -49,25 +49,12 @@ lib_a_CFLAGS = $(AM_CFLAGS)
 noinst_DATA =
 endif # USE_LIBTOOL
 
-include $(srcdir)/../../Makefile.shared	
+include $(srcdir)/../../Makefile.shared
 
 CHEWOUT_FILES = \
 	popen.def \
 	posix_spawn.def
 
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-	cat $(srcdir)/posix.tex >> $(TARGETDOC)
+CHAPTERS = posix.tex
 
 AM_CFLAGS = -D_GNU_SOURCE
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
diff --git a/newlib/libc/reent/Makefile.am b/newlib/libc/reent/Makefile.am
index 9e0602d..ee11e86 100644
--- a/newlib/libc/reent/Makefile.am
+++ b/newlib/libc/reent/Makefile.am
@@ -90,19 +90,6 @@ CHEWOUT_FILES = \
 	$(STDIO64_DEFS) \
 	writer.def
 
-SUFFIXES = .def .h
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-	cat $(srcdir)/reent.tex >> $(TARGETDOC)
+CHAPTERS = reent.tex
 
 $(lpfx)impure.$(oext): $(srcdir)/impure.c $(srcdir)/../include/sys/reent.h
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
diff --git a/newlib/libc/search/Makefile.am b/newlib/libc/search/Makefile.am
index defb6bb..98920c3 100644
--- a/newlib/libc/search/Makefile.am
+++ b/newlib/libc/search/Makefile.am
@@ -62,23 +62,11 @@ lib_a_CFLAGS = $(AM_CFLAGS)
 noinst_DATA =
 endif # USE_LIBTOOL
 
-SUFFIXES = .def
-
 CHEWOUT_FILES = \
 	bsearch.def \
 	qsort.def \
 	qsort_r.def
 
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS =
 
 include $(srcdir)/../../Makefile.shared
diff --git a/newlib/libc/signal/Makefile.am b/newlib/libc/signal/Makefile.am
index 7a7e64c..a93dba7 100644
--- a/newlib/libc/signal/Makefile.am
+++ b/newlib/libc/signal/Makefile.am
@@ -23,17 +23,4 @@ include $(srcdir)/../../Makefile.shared
 
 CHEWOUT_FILES = psignal.def raise.def signal.def
 
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-	cat $(srcdir)/signal.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = signal.tex
diff --git a/newlib/libc/stdio/Makefile.am b/newlib/libc/stdio/Makefile.am
index 0a086e7..ea23de6 100644
--- a/newlib/libc/stdio/Makefile.am
+++ b/newlib/libc/stdio/Makefile.am
@@ -421,20 +421,7 @@ CHEWOUT_FILES = \
 	vfwprintf.def		\
 	vfwscanf.def
 
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-	cat $(srcdir)/stdio.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = stdio.tex
 
 $(lpfx)clearerr.$(oext): local.h
 $(lpfx)clearerr_u.$(oext): local.h
diff --git a/newlib/libc/stdio64/Makefile.am b/newlib/libc/stdio64/Makefile.am
index 914cbca..fd43ef8 100644
--- a/newlib/libc/stdio64/Makefile.am
+++ b/newlib/libc/stdio64/Makefile.am
@@ -52,18 +52,4 @@ CHEWOUT_FILES = \
 	ftello64.def		\
 	tmpfile64.def
 
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-	cat $(srcdir)/stdio64.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
-
+CHAPTERS = stdio64.tex
diff --git a/newlib/libc/stdlib/Makefile.am b/newlib/libc/stdlib/Makefile.am
index ead5dd1..f9ba5d5 100644
--- a/newlib/libc/stdlib/Makefile.am
+++ b/newlib/libc/stdlib/Makefile.am
@@ -292,20 +292,7 @@ CHEWOUT_FILES= \
 	wcstombs.def	\
 	wctomb.def	
 
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-	cat $(srcdir)/stdlib.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = stdlib.tex
 
 $(lpfx)dtoa.$(oext): dtoa.c mprec.h
 $(lpfx)ldtoa.$(oext): ldtoa.c mprec.h
diff --git a/newlib/libc/string/Makefile.am b/newlib/libc/string/Makefile.am
index ba49af8..e347ec4 100644
--- a/newlib/libc/string/Makefile.am
+++ b/newlib/libc/string/Makefile.am
@@ -145,18 +145,4 @@ wcswidth.def	wcsxfrm.def	wcwidth.def	wmemchr.def \
 wmemcmp.def	wmemcpy.def	wmemmove.def	wmemset.def \
 memmem.def	memrchr.def	rawmemchr.def	strchrnul.def
 
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-	cat $(srcdir)/strings.tex >> $(TARGETDOC)
-	cat $(srcdir)/wcstrings.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = strings.tex wcstrings.tex
diff --git a/newlib/libc/syscalls/Makefile.am b/newlib/libc/syscalls/Makefile.am
index 7af4064..31cf659 100644
--- a/newlib/libc/syscalls/Makefile.am
+++ b/newlib/libc/syscalls/Makefile.am
@@ -53,18 +53,5 @@ endif
 include $(srcdir)/../../Makefile.shared
 
 CHEWOUT_FILES =
-
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
+CHAPTERS =
 # No doc for syscalls.
-doc:
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
diff --git a/newlib/libc/time/Makefile.am b/newlib/libc/time/Makefile.am
index 95f088a..be040ba 100644
--- a/newlib/libc/time/Makefile.am
+++ b/newlib/libc/time/Makefile.am
@@ -60,17 +60,4 @@ CHEWOUT_FILES = \
 	tzset.def	\
 	wcsftime.def
 
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-	cat $(srcdir)/time.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = time.tex
diff --git a/newlib/libc/unix/Makefile.am b/newlib/libc/unix/Makefile.am
index 270f994..9fd30b9 100644
--- a/newlib/libc/unix/Makefile.am
+++ b/newlib/libc/unix/Makefile.am
@@ -53,18 +53,5 @@ endif # USE_LIBTOOL
 include $(srcdir)/../../Makefile.shared
 
 CHEWOUT_FILES =
-
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
+CHAPTERS =
 # No doc for unix.
-doc:
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
diff --git a/newlib/libc/xdr/Makefile.am b/newlib/libc/xdr/Makefile.am
index 3214ad6..8d3ee4c 100644
--- a/newlib/libc/xdr/Makefile.am
+++ b/newlib/libc/xdr/Makefile.am
@@ -58,20 +58,8 @@ lib_a_CFLAGS = $(AM_CFLAGS)
 noinst_DATA =
 endif # USE_LIBTOOL
 
-SUFFIXES = .def
-
 CHEWOUT_FILES =
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS =
+# No doc for xdr.
 
 include $(srcdir)/../../Makefile.shared
diff --git a/newlib/libm/common/Makefile.am b/newlib/libm/common/Makefile.am
index d5e0ef9..2a27948 100644
--- a/newlib/libm/common/Makefile.am
+++ b/newlib/libm/common/Makefile.am
@@ -55,7 +55,7 @@ endif # USE_LIBTOOL
 
 include $(srcdir)/../../Makefile.shared
 
-chobj =	s_cbrt.def s_copysign.def s_exp10.def s_expm1.def s_ilogb.def \
+CHEWOUT_FILES =	s_cbrt.def s_copysign.def s_exp10.def s_expm1.def s_ilogb.def \
 	s_infinity.def s_isnan.def s_log1p.def s_matherr.def s_modf.def \
 	s_nan.def s_nextafter.def s_pow10.def s_scalbn.def \
 	s_fdim.def s_fma.def s_fmax.def s_fmin.def \
@@ -63,19 +63,7 @@ chobj =	s_cbrt.def s_copysign.def s_exp10.def s_expm1.def s_ilogb.def \
 	s_remquo.def s_rint.def s_round.def s_signbit.def s_trunc.def \
 	isgreater.def
 
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(chobj)
-
-CLEANFILES = $(chobj) *.ref
+CHAPTERS =
 
 # A partial dependency list.
 
diff --git a/newlib/libm/complex/Makefile.am b/newlib/libm/complex/Makefile.am
index 1c4a502..d3db959 100644
--- a/newlib/libm/complex/Makefile.am
+++ b/newlib/libm/complex/Makefile.am
@@ -33,27 +33,13 @@ endif # USE_LIBTOOL
 
 include $(srcdir)/../../Makefile.shared
 
-chobj =	cabs.def cacos.def cacosh.def carg.def \
+CHEWOUT_FILES =	cabs.def cacos.def cacosh.def carg.def \
         casin.def casinh.def catan.def catanh.def \
         ccos.def ccosh.def cexp.def cimag.def clog.def \
         conj.def cpow.def cproj.def creal.def \
         csin.def csinh.def csqrt.def ctan.def ctanh.def
 
-
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(chobj)
-	cat $(srcdir)/complex.tex >> $(TARGETDOC)
-
-CLEANFILES = $(chobj) *.ref
+CHAPTERS = complex.tex
 
 # A partial dependency list.
 
diff --git a/newlib/libm/math/Makefile.am b/newlib/libm/math/Makefile.am
index 2616ada..9e8e928 100644
--- a/newlib/libm/math/Makefile.am
+++ b/newlib/libm/math/Makefile.am
@@ -67,7 +67,7 @@ endif # USE_LIBTOOL
 
 include $(srcdir)/../../Makefile.shared
 
-chobj =	w_acos.def w_acosh.def w_asin.def s_asinh.def \
+CHEWOUT_FILES = w_acos.def w_acosh.def w_asin.def s_asinh.def \
 	s_atan.def w_atan2.def w_atanh.def w_j0.def \
 	w_cosh.def s_erf.def w_exp.def w_exp2.def \
 	s_fabs.def s_floor.def w_fmod.def s_frexp.def \
@@ -76,20 +76,7 @@ chobj =	w_acos.def w_acosh.def w_asin.def s_asinh.def \
 	w_pow.def w_remainder.def s_sin.def w_sinh.def \
 	w_sqrt.def s_tan.def s_tanh.def
 
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(chobj)
-	cat $(srcdir)/math.tex >> $(TARGETDOC)
-
-CLEANFILES = $(chobj) *.ref
+CHAPTERS = math.tex
 
 # A partial dependency list.
 
diff --git a/newlib/libm/mathfp/Makefile.am b/newlib/libm/mathfp/Makefile.am
index 0caab07..db83ea0 100644
--- a/newlib/libm/mathfp/Makefile.am
+++ b/newlib/libm/mathfp/Makefile.am
@@ -58,7 +58,7 @@ endif # USE_LIBTOOL
 
 include $(srcdir)/../../Makefile.shared
 
-chobj = e_acosh.def \
+CHEWOUT_FILES = e_acosh.def \
 	e_atanh.def \
 	e_hypot.def \
 	e_remainder.def \
@@ -87,20 +87,7 @@ chobj = e_acosh.def \
 	s_tanh.def \
 	w_jn.def
 
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
-	$(CHEW) < $< > $*.def 2> $*.ref
-	touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(chobj)
-	cat $(srcdir)/mathfp.tex >> $(TARGETDOC)
-
-CLEANFILES = $(chobj) *.ref
+CHAPTERS = mathfp.tex
 
 # A partial dependency list.
 
-- 
2.5.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]