summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2013-09-22 09:49:06 +0700
committerGary V. Vaughan <gary@gnu.org>2013-09-22 09:49:06 +0700
commit578bd023ea85d57d8488b8cb88265fbe3a3071e4 (patch)
treecc5a6088277c1a747041f5969cf21d7fca2ca4f1
parent1eacf10370529972a7407bdbb368f5f69f87a1b8 (diff)
downloadm4-578bd023ea85d57d8488b8cb88265fbe3a3071e4.tar.gz
configury: move usage examples into doc subdirectory.
* examples: Move from here... * doc/examples: ...to here. * Makefile.am (EXTRA_DIST, dist_pkgdata_DATA): Adjust. * README, doc/m4.texi, tests/builtins.at, tests/generate.awk, tests/others.at: Likewise. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
-rw-r--r--Makefile.am146
-rw-r--r--README4
-rw-r--r--doc/examples/COPYING (renamed from examples/COPYING)0
-rw-r--r--doc/examples/WWW/COPYING (renamed from examples/WWW/COPYING)0
-rw-r--r--doc/examples/WWW/Makefile (renamed from examples/WWW/Makefile)0
-rw-r--r--doc/examples/WWW/_footer.htm (renamed from examples/WWW/_footer.htm)0
-rw-r--r--doc/examples/WWW/_header.htm (renamed from examples/WWW/_header.htm)0
-rw-r--r--doc/examples/WWW/m4lib/COPYING (renamed from examples/WWW/m4lib/COPYING)0
-rw-r--r--doc/examples/WWW/m4lib/bugs.m4 (renamed from examples/WWW/m4lib/bugs.m4)0
-rw-r--r--doc/examples/WWW/m4lib/changelog.m4 (renamed from examples/WWW/m4lib/changelog.m4)0
-rw-r--r--doc/examples/WWW/m4lib/download.m4 (renamed from examples/WWW/m4lib/download.m4)0
-rw-r--r--doc/examples/WWW/m4lib/features.m4 (renamed from examples/WWW/m4lib/features.m4)0
-rw-r--r--doc/examples/WWW/m4lib/feedback.m4 (renamed from examples/WWW/m4lib/feedback.m4)0
-rw-r--r--doc/examples/WWW/m4lib/html.m4 (renamed from examples/WWW/m4lib/html.m4)0
-rw-r--r--doc/examples/WWW/m4lib/index.m4 (renamed from examples/WWW/m4lib/index.m4)0
-rw-r--r--doc/examples/WWW/m4lib/layout.m4 (renamed from examples/WWW/m4lib/layout.m4)0
-rw-r--r--doc/examples/WWW/m4lib/lists.m4 (renamed from examples/WWW/m4lib/lists.m4)0
-rw-r--r--doc/examples/WWW/m4lib/menu.m4 (renamed from examples/WWW/m4lib/menu.m4)0
-rw-r--r--doc/examples/WWW/m4lib/modules.m4 (renamed from examples/WWW/m4lib/modules.m4)0
-rw-r--r--doc/examples/WWW/m4lib/news.m4 (renamed from examples/WWW/m4lib/news.m4)0
-rw-r--r--doc/examples/WWW/m4lib/readme.m4 (renamed from examples/WWW/m4lib/readme.m4)0
-rw-r--r--doc/examples/WWW/m4lib/setup.m4 (renamed from examples/WWW/m4lib/setup.m4)0
-rw-r--r--doc/examples/WWW/m4lib/test.m4 (renamed from examples/WWW/m4lib/test.m4)0
-rw-r--r--doc/examples/WWW/m4lib/thanks.m4 (renamed from examples/WWW/m4lib/thanks.m4)0
-rw-r--r--doc/examples/WWW/m4lib/thissite.m4 (renamed from examples/WWW/m4lib/thissite.m4)0
-rw-r--r--doc/examples/WWW/m4lib/tmpl.m4 (renamed from examples/WWW/m4lib/tmpl.m4)0
-rw-r--r--doc/examples/WWW/m4lib/todo.m4 (renamed from examples/WWW/m4lib/todo.m4)0
-rw-r--r--doc/examples/WWW/m4lib/uses.m4 (renamed from examples/WWW/m4lib/uses.m4)0
-rw-r--r--doc/examples/WWW/m4lib/visions.m4 (renamed from examples/WWW/m4lib/visions.m4)0
-rw-r--r--doc/examples/WWW/m4lib/whatis.m4 (renamed from examples/WWW/m4lib/whatis.m4)0
-rw-r--r--doc/examples/capitalize.m4 (renamed from examples/capitalize.m4)0
-rw-r--r--doc/examples/capitalize2.m4 (renamed from examples/capitalize2.m4)0
-rw-r--r--doc/examples/comments.m4 (renamed from examples/comments.m4)0
-rw-r--r--doc/examples/curry.m4 (renamed from examples/curry.m4)0
-rw-r--r--doc/examples/ddivert.m4 (renamed from examples/ddivert.m4)0
-rw-r--r--doc/examples/debug.m4 (renamed from examples/debug.m4)0
-rw-r--r--doc/examples/esyscmd.m4 (renamed from examples/esyscmd.m4)0
-rw-r--r--doc/examples/exp.m4 (renamed from examples/exp.m4)0
-rw-r--r--doc/examples/foreach.m4 (renamed from examples/foreach.m4)0
-rw-r--r--doc/examples/foreach2.m4 (renamed from examples/foreach2.m4)0
-rw-r--r--doc/examples/foreachq.m4 (renamed from examples/foreachq.m4)0
-rw-r--r--doc/examples/foreachq2.m4 (renamed from examples/foreachq2.m4)0
-rw-r--r--doc/examples/foreachq3.m4 (renamed from examples/foreachq3.m4)0
-rw-r--r--doc/examples/foreachq4.m4 (renamed from examples/foreachq4.m4)0
-rw-r--r--doc/examples/forloop.m4 (renamed from examples/forloop.m4)0
-rw-r--r--doc/examples/forloop2.m4 (renamed from examples/forloop2.m4)0
-rw-r--r--doc/examples/forloop3.m4 (renamed from examples/forloop3.m4)0
-rw-r--r--doc/examples/fstab.m4 (renamed from examples/fstab.m4)0
-rw-r--r--doc/examples/hanoi.m4 (renamed from examples/hanoi.m4)0
-rw-r--r--doc/examples/incl-test.m4 (renamed from examples/incl-test.m4)0
-rw-r--r--doc/examples/incl.m4 (renamed from examples/incl.m4)0
-rw-r--r--doc/examples/include.m4 (renamed from examples/include.m4)0
-rw-r--r--doc/examples/indir.m4 (renamed from examples/indir.m4)0
-rw-r--r--doc/examples/join.m4 (renamed from examples/join.m4)0
-rw-r--r--doc/examples/loop.m4 (renamed from examples/loop.m4)0
-rw-r--r--doc/examples/misc.m4 (renamed from examples/misc.m4)0
-rw-r--r--doc/examples/modtest.m4 (renamed from examples/modtest.m4)0
-rw-r--r--doc/examples/multiquotes.m4 (renamed from examples/multiquotes.m4)0
-rw-r--r--doc/examples/patsubst.m4 (renamed from examples/patsubst.m4)0
-rw-r--r--doc/examples/pushpop.m4 (renamed from examples/pushpop.m4)0
-rw-r--r--doc/examples/quote.m4 (renamed from examples/quote.m4)0
-rw-r--r--doc/examples/regexp.m4 (renamed from examples/regexp.m4)0
-rw-r--r--doc/examples/reverse.m4 (renamed from examples/reverse.m4)0
-rw-r--r--doc/examples/shadow.m4 (renamed from examples/shadow.m4)0
-rw-r--r--doc/examples/stack.m4 (renamed from examples/stack.m4)0
-rw-r--r--doc/examples/stack_sep.m4 (renamed from examples/stack_sep.m4)0
-rw-r--r--doc/examples/stdlib.m4 (renamed from examples/stdlib.m4)0
-rw-r--r--doc/examples/sysv-args.m4 (renamed from examples/sysv-args.m4)0
-rw-r--r--doc/examples/time.m4 (renamed from examples/time.m4)0
-rw-r--r--doc/examples/time2.m4 (renamed from examples/time2.m4)0
-rw-r--r--doc/examples/trace.m4 (renamed from examples/trace.m4)0
-rw-r--r--doc/examples/translit.m4 (renamed from examples/translit.m4)0
-rw-r--r--doc/examples/undivert.incl (renamed from examples/undivert.incl)0
-rw-r--r--doc/examples/undivert.m4 (renamed from examples/undivert.m4)0
-rw-r--r--doc/examples/wrap.m4 (renamed from examples/wrap.m4)0
-rw-r--r--doc/examples/wrapfifo.m4 (renamed from examples/wrapfifo.m4)0
-rw-r--r--doc/examples/wraplifo.m4 (renamed from examples/wraplifo.m4)0
-rw-r--r--doc/examples/wraplifo2.m4 (renamed from examples/wraplifo2.m4)0
-rw-r--r--doc/m4.texi154
-rw-r--r--modules/README4
-rw-r--r--tests/builtins.at4
-rwxr-xr-xtests/generate.awk6
-rw-r--r--tests/others.at20
83 files changed, 169 insertions, 169 deletions
diff --git a/Makefile.am b/Makefile.am
index 0cc3e838..6c853c5f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -250,83 +250,83 @@ EXTRA_DIST += m4/system_.h
## --------- ##
EXTRA_DIST += \
- examples/WWW/Makefile \
- examples/WWW/_footer.htm \
- examples/WWW/_header.htm \
- examples/WWW/m4lib/bugs.m4 \
- examples/WWW/m4lib/changelog.m4 \
- examples/WWW/m4lib/download.m4 \
- examples/WWW/m4lib/features.m4 \
- examples/WWW/m4lib/feedback.m4 \
- examples/WWW/m4lib/html.m4 \
- examples/WWW/m4lib/index.m4 \
- examples/WWW/m4lib/layout.m4 \
- examples/WWW/m4lib/lists.m4 \
- examples/WWW/m4lib/menu.m4 \
- examples/WWW/m4lib/modules.m4 \
- examples/WWW/m4lib/news.m4 \
- examples/WWW/m4lib/readme.m4 \
- examples/WWW/m4lib/setup.m4 \
- examples/WWW/m4lib/test.m4 \
- examples/WWW/m4lib/thanks.m4 \
- examples/WWW/m4lib/thissite.m4 \
- examples/WWW/m4lib/tmpl.m4 \
- examples/WWW/m4lib/todo.m4 \
- examples/WWW/m4lib/uses.m4 \
- examples/WWW/m4lib/visions.m4 \
- examples/WWW/m4lib/whatis.m4
+ doc/examples/WWW/Makefile \
+ doc/examples/WWW/_footer.htm \
+ doc/examples/WWW/_header.htm \
+ doc/examples/WWW/m4lib/bugs.m4 \
+ doc/examples/WWW/m4lib/changelog.m4 \
+ doc/examples/WWW/m4lib/download.m4 \
+ doc/examples/WWW/m4lib/features.m4 \
+ doc/examples/WWW/m4lib/feedback.m4 \
+ doc/examples/WWW/m4lib/html.m4 \
+ doc/examples/WWW/m4lib/index.m4 \
+ doc/examples/WWW/m4lib/layout.m4 \
+ doc/examples/WWW/m4lib/lists.m4 \
+ doc/examples/WWW/m4lib/menu.m4 \
+ doc/examples/WWW/m4lib/modules.m4 \
+ doc/examples/WWW/m4lib/news.m4 \
+ doc/examples/WWW/m4lib/readme.m4 \
+ doc/examples/WWW/m4lib/setup.m4 \
+ doc/examples/WWW/m4lib/test.m4 \
+ doc/examples/WWW/m4lib/thanks.m4 \
+ doc/examples/WWW/m4lib/thissite.m4 \
+ doc/examples/WWW/m4lib/tmpl.m4 \
+ doc/examples/WWW/m4lib/todo.m4 \
+ doc/examples/WWW/m4lib/uses.m4 \
+ doc/examples/WWW/m4lib/visions.m4 \
+ doc/examples/WWW/m4lib/whatis.m4
dist_pkgdata_DATA = \
- examples/capitalize.m4 \
- examples/capitalize2.m4 \
- examples/comments.m4 \
- examples/curry.m4 \
- examples/ddivert.m4 \
- examples/debug.m4 \
- examples/esyscmd.m4 \
- examples/exp.m4 \
- examples/foreach.m4 \
- examples/foreach2.m4 \
- examples/foreachq.m4 \
- examples/foreachq2.m4 \
- examples/foreachq3.m4 \
- examples/foreachq4.m4 \
- examples/forloop.m4 \
- examples/forloop2.m4 \
- examples/forloop3.m4 \
- examples/fstab.m4 \
- examples/hanoi.m4 \
- examples/incl-test.m4 \
- examples/incl.m4 \
- examples/include.m4 \
- examples/indir.m4 \
- examples/join.m4 \
- examples/loop.m4 \
- examples/misc.m4 \
- examples/multiquotes.m4 \
- examples/patsubst.m4 \
- examples/pushpop.m4 \
- examples/quote.m4 \
- examples/regexp.m4 \
- examples/reverse.m4 \
- examples/stack.m4 \
- examples/stack_sep.m4 \
- examples/sysv-args.m4 \
- examples/trace.m4 \
- examples/translit.m4 \
- examples/undivert.incl \
- examples/undivert.m4 \
- examples/wrap.m4 \
- examples/wrapfifo.m4 \
- examples/wraplifo.m4 \
- examples/wraplifo2.m4
+ doc/examples/capitalize.m4 \
+ doc/examples/capitalize2.m4 \
+ doc/examples/comments.m4 \
+ doc/examples/curry.m4 \
+ doc/examples/ddivert.m4 \
+ doc/examples/debug.m4 \
+ doc/examples/esyscmd.m4 \
+ doc/examples/exp.m4 \
+ doc/examples/foreach.m4 \
+ doc/examples/foreach2.m4 \
+ doc/examples/foreachq.m4 \
+ doc/examples/foreachq2.m4 \
+ doc/examples/foreachq3.m4 \
+ doc/examples/foreachq4.m4 \
+ doc/examples/forloop.m4 \
+ doc/examples/forloop2.m4 \
+ doc/examples/forloop3.m4 \
+ doc/examples/fstab.m4 \
+ doc/examples/hanoi.m4 \
+ doc/examples/incl-test.m4 \
+ doc/examples/incl.m4 \
+ doc/examples/include.m4 \
+ doc/examples/indir.m4 \
+ doc/examples/join.m4 \
+ doc/examples/loop.m4 \
+ doc/examples/misc.m4 \
+ doc/examples/multiquotes.m4 \
+ doc/examples/patsubst.m4 \
+ doc/examples/pushpop.m4 \
+ doc/examples/quote.m4 \
+ doc/examples/regexp.m4 \
+ doc/examples/reverse.m4 \
+ doc/examples/stack.m4 \
+ doc/examples/stack_sep.m4 \
+ doc/examples/sysv-args.m4 \
+ doc/examples/trace.m4 \
+ doc/examples/translit.m4 \
+ doc/examples/undivert.incl \
+ doc/examples/undivert.m4 \
+ doc/examples/wrap.m4 \
+ doc/examples/wrapfifo.m4 \
+ doc/examples/wraplifo.m4 \
+ doc/examples/wraplifo2.m4
EXTRA_DIST += \
- examples/modtest.m4 \
- examples/shadow.m4 \
- examples/time.m4 \
- examples/time2.m4 \
- examples/stdlib.m4
+ doc/examples/modtest.m4 \
+ doc/examples/shadow.m4 \
+ doc/examples/time.m4 \
+ doc/examples/time2.m4 \
+ doc/examples/stdlib.m4
## ----------- ##
## Test suite. ##
diff --git a/README b/README
index c07737ca..163c89f6 100644
--- a/README
+++ b/README
@@ -20,8 +20,8 @@ ahead and start with `./configure'. If you are trying to build `m4'
from git, more information can be found in the version-control-only
file HACKING.
-In the subdirectories `tests' and `examples' you will find various m4
-files, ranging from trivial test files to rather advanced macros. If
+In the subdirectories `tests' and `doc/examples' you will find various
+m4 files, ranging from trivial test files to rather advanced macros. If
you intend to use m4 seriously, you might find useful material down
there.
diff --git a/examples/COPYING b/doc/examples/COPYING
index 0b2d09ee..0b2d09ee 100644
--- a/examples/COPYING
+++ b/doc/examples/COPYING
diff --git a/examples/WWW/COPYING b/doc/examples/WWW/COPYING
index 0b2d09ee..0b2d09ee 100644
--- a/examples/WWW/COPYING
+++ b/doc/examples/WWW/COPYING
diff --git a/examples/WWW/Makefile b/doc/examples/WWW/Makefile
index c296ccf4..c296ccf4 100644
--- a/examples/WWW/Makefile
+++ b/doc/examples/WWW/Makefile
diff --git a/examples/WWW/_footer.htm b/doc/examples/WWW/_footer.htm
index 6bed8f2c..6bed8f2c 100644
--- a/examples/WWW/_footer.htm
+++ b/doc/examples/WWW/_footer.htm
diff --git a/examples/WWW/_header.htm b/doc/examples/WWW/_header.htm
index 1aea7999..1aea7999 100644
--- a/examples/WWW/_header.htm
+++ b/doc/examples/WWW/_header.htm
diff --git a/examples/WWW/m4lib/COPYING b/doc/examples/WWW/m4lib/COPYING
index 0b2d09ee..0b2d09ee 100644
--- a/examples/WWW/m4lib/COPYING
+++ b/doc/examples/WWW/m4lib/COPYING
diff --git a/examples/WWW/m4lib/bugs.m4 b/doc/examples/WWW/m4lib/bugs.m4
index 5d8e5f52..5d8e5f52 100644
--- a/examples/WWW/m4lib/bugs.m4
+++ b/doc/examples/WWW/m4lib/bugs.m4
diff --git a/examples/WWW/m4lib/changelog.m4 b/doc/examples/WWW/m4lib/changelog.m4
index cdcab269..cdcab269 100644
--- a/examples/WWW/m4lib/changelog.m4
+++ b/doc/examples/WWW/m4lib/changelog.m4
diff --git a/examples/WWW/m4lib/download.m4 b/doc/examples/WWW/m4lib/download.m4
index d9ee4095..d9ee4095 100644
--- a/examples/WWW/m4lib/download.m4
+++ b/doc/examples/WWW/m4lib/download.m4
diff --git a/examples/WWW/m4lib/features.m4 b/doc/examples/WWW/m4lib/features.m4
index 57b68c9e..57b68c9e 100644
--- a/examples/WWW/m4lib/features.m4
+++ b/doc/examples/WWW/m4lib/features.m4
diff --git a/examples/WWW/m4lib/feedback.m4 b/doc/examples/WWW/m4lib/feedback.m4
index f61d63e5..f61d63e5 100644
--- a/examples/WWW/m4lib/feedback.m4
+++ b/doc/examples/WWW/m4lib/feedback.m4
diff --git a/examples/WWW/m4lib/html.m4 b/doc/examples/WWW/m4lib/html.m4
index 94ed69ed..94ed69ed 100644
--- a/examples/WWW/m4lib/html.m4
+++ b/doc/examples/WWW/m4lib/html.m4
diff --git a/examples/WWW/m4lib/index.m4 b/doc/examples/WWW/m4lib/index.m4
index dbccc67b..dbccc67b 100644
--- a/examples/WWW/m4lib/index.m4
+++ b/doc/examples/WWW/m4lib/index.m4
diff --git a/examples/WWW/m4lib/layout.m4 b/doc/examples/WWW/m4lib/layout.m4
index e54002db..e54002db 100644
--- a/examples/WWW/m4lib/layout.m4
+++ b/doc/examples/WWW/m4lib/layout.m4
diff --git a/examples/WWW/m4lib/lists.m4 b/doc/examples/WWW/m4lib/lists.m4
index cc710eba..cc710eba 100644
--- a/examples/WWW/m4lib/lists.m4
+++ b/doc/examples/WWW/m4lib/lists.m4
diff --git a/examples/WWW/m4lib/menu.m4 b/doc/examples/WWW/m4lib/menu.m4
index 78c8edfd..78c8edfd 100644
--- a/examples/WWW/m4lib/menu.m4
+++ b/doc/examples/WWW/m4lib/menu.m4
diff --git a/examples/WWW/m4lib/modules.m4 b/doc/examples/WWW/m4lib/modules.m4
index b9c148f1..b9c148f1 100644
--- a/examples/WWW/m4lib/modules.m4
+++ b/doc/examples/WWW/m4lib/modules.m4
diff --git a/examples/WWW/m4lib/news.m4 b/doc/examples/WWW/m4lib/news.m4
index e5da0d89..e5da0d89 100644
--- a/examples/WWW/m4lib/news.m4
+++ b/doc/examples/WWW/m4lib/news.m4
diff --git a/examples/WWW/m4lib/readme.m4 b/doc/examples/WWW/m4lib/readme.m4
index 1612c7d1..1612c7d1 100644
--- a/examples/WWW/m4lib/readme.m4
+++ b/doc/examples/WWW/m4lib/readme.m4
diff --git a/examples/WWW/m4lib/setup.m4 b/doc/examples/WWW/m4lib/setup.m4
index 310b65f8..310b65f8 100644
--- a/examples/WWW/m4lib/setup.m4
+++ b/doc/examples/WWW/m4lib/setup.m4
diff --git a/examples/WWW/m4lib/test.m4 b/doc/examples/WWW/m4lib/test.m4
index 110cf12b..110cf12b 100644
--- a/examples/WWW/m4lib/test.m4
+++ b/doc/examples/WWW/m4lib/test.m4
diff --git a/examples/WWW/m4lib/thanks.m4 b/doc/examples/WWW/m4lib/thanks.m4
index 61928d07..61928d07 100644
--- a/examples/WWW/m4lib/thanks.m4
+++ b/doc/examples/WWW/m4lib/thanks.m4
diff --git a/examples/WWW/m4lib/thissite.m4 b/doc/examples/WWW/m4lib/thissite.m4
index eecfa9cf..eecfa9cf 100644
--- a/examples/WWW/m4lib/thissite.m4
+++ b/doc/examples/WWW/m4lib/thissite.m4
diff --git a/examples/WWW/m4lib/tmpl.m4 b/doc/examples/WWW/m4lib/tmpl.m4
index 8262d293..8262d293 100644
--- a/examples/WWW/m4lib/tmpl.m4
+++ b/doc/examples/WWW/m4lib/tmpl.m4
diff --git a/examples/WWW/m4lib/todo.m4 b/doc/examples/WWW/m4lib/todo.m4
index 7a22c151..7a22c151 100644
--- a/examples/WWW/m4lib/todo.m4
+++ b/doc/examples/WWW/m4lib/todo.m4
diff --git a/examples/WWW/m4lib/uses.m4 b/doc/examples/WWW/m4lib/uses.m4
index e29acb7a..e29acb7a 100644
--- a/examples/WWW/m4lib/uses.m4
+++ b/doc/examples/WWW/m4lib/uses.m4
diff --git a/examples/WWW/m4lib/visions.m4 b/doc/examples/WWW/m4lib/visions.m4
index ba238ca9..ba238ca9 100644
--- a/examples/WWW/m4lib/visions.m4
+++ b/doc/examples/WWW/m4lib/visions.m4
diff --git a/examples/WWW/m4lib/whatis.m4 b/doc/examples/WWW/m4lib/whatis.m4
index 2fa1c426..2fa1c426 100644
--- a/examples/WWW/m4lib/whatis.m4
+++ b/doc/examples/WWW/m4lib/whatis.m4
diff --git a/examples/capitalize.m4 b/doc/examples/capitalize.m4
index d4e4a502..d4e4a502 100644
--- a/examples/capitalize.m4
+++ b/doc/examples/capitalize.m4
diff --git a/examples/capitalize2.m4 b/doc/examples/capitalize2.m4
index 154dc505..154dc505 100644
--- a/examples/capitalize2.m4
+++ b/doc/examples/capitalize2.m4
diff --git a/examples/comments.m4 b/doc/examples/comments.m4
index c1e3be0a..c1e3be0a 100644
--- a/examples/comments.m4
+++ b/doc/examples/comments.m4
diff --git a/examples/curry.m4 b/doc/examples/curry.m4
index 00997c38..00997c38 100644
--- a/examples/curry.m4
+++ b/doc/examples/curry.m4
diff --git a/examples/ddivert.m4 b/doc/examples/ddivert.m4
index e6e0017e..e6e0017e 100644
--- a/examples/ddivert.m4
+++ b/doc/examples/ddivert.m4
diff --git a/examples/debug.m4 b/doc/examples/debug.m4
index 16f4c74e..16f4c74e 100644
--- a/examples/debug.m4
+++ b/doc/examples/debug.m4
diff --git a/examples/esyscmd.m4 b/doc/examples/esyscmd.m4
index 3c856e02..3c856e02 100644
--- a/examples/esyscmd.m4
+++ b/doc/examples/esyscmd.m4
diff --git a/examples/exp.m4 b/doc/examples/exp.m4
index e2bcf943..e2bcf943 100644
--- a/examples/exp.m4
+++ b/doc/examples/exp.m4
diff --git a/examples/foreach.m4 b/doc/examples/foreach.m4
index 9be25b08..9be25b08 100644
--- a/examples/foreach.m4
+++ b/doc/examples/foreach.m4
diff --git a/examples/foreach2.m4 b/doc/examples/foreach2.m4
index 74d00fb6..74d00fb6 100644
--- a/examples/foreach2.m4
+++ b/doc/examples/foreach2.m4
diff --git a/examples/foreachq.m4 b/doc/examples/foreachq.m4
index d34fb5b9..d34fb5b9 100644
--- a/examples/foreachq.m4
+++ b/doc/examples/foreachq.m4
diff --git a/examples/foreachq2.m4 b/doc/examples/foreachq2.m4
index f57d3edf..f57d3edf 100644
--- a/examples/foreachq2.m4
+++ b/doc/examples/foreachq2.m4
diff --git a/examples/foreachq3.m4 b/doc/examples/foreachq3.m4
index 5e656727..5e656727 100644
--- a/examples/foreachq3.m4
+++ b/doc/examples/foreachq3.m4
diff --git a/examples/foreachq4.m4 b/doc/examples/foreachq4.m4
index 3da64c92..3da64c92 100644
--- a/examples/foreachq4.m4
+++ b/doc/examples/foreachq4.m4
diff --git a/examples/forloop.m4 b/doc/examples/forloop.m4
index fdca2608..fdca2608 100644
--- a/examples/forloop.m4
+++ b/doc/examples/forloop.m4
diff --git a/examples/forloop2.m4 b/doc/examples/forloop2.m4
index b7154e86..b7154e86 100644
--- a/examples/forloop2.m4
+++ b/doc/examples/forloop2.m4
diff --git a/examples/forloop3.m4 b/doc/examples/forloop3.m4
index 98db20f3..98db20f3 100644
--- a/examples/forloop3.m4
+++ b/doc/examples/forloop3.m4
diff --git a/examples/fstab.m4 b/doc/examples/fstab.m4
index 8d10e176..8d10e176 100644
--- a/examples/fstab.m4
+++ b/doc/examples/fstab.m4
diff --git a/examples/hanoi.m4 b/doc/examples/hanoi.m4
index 32fd8a41..32fd8a41 100644
--- a/examples/hanoi.m4
+++ b/doc/examples/hanoi.m4
diff --git a/examples/incl-test.m4 b/doc/examples/incl-test.m4
index 323fa05b..323fa05b 100644
--- a/examples/incl-test.m4
+++ b/doc/examples/incl-test.m4
diff --git a/examples/incl.m4 b/doc/examples/incl.m4
index ab9572eb..ab9572eb 100644
--- a/examples/incl.m4
+++ b/doc/examples/incl.m4
diff --git a/examples/include.m4 b/doc/examples/include.m4
index 8e9d9d2f..8e9d9d2f 100644
--- a/examples/include.m4
+++ b/doc/examples/include.m4
diff --git a/examples/indir.m4 b/doc/examples/indir.m4
index 51d2b64f..51d2b64f 100644
--- a/examples/indir.m4
+++ b/doc/examples/indir.m4
diff --git a/examples/join.m4 b/doc/examples/join.m4
index 8687ac70..8687ac70 100644
--- a/examples/join.m4
+++ b/doc/examples/join.m4
diff --git a/examples/loop.m4 b/doc/examples/loop.m4
index b2fc64c4..b2fc64c4 100644
--- a/examples/loop.m4
+++ b/doc/examples/loop.m4
diff --git a/examples/misc.m4 b/doc/examples/misc.m4
index 979b51aa..979b51aa 100644
--- a/examples/misc.m4
+++ b/doc/examples/misc.m4
diff --git a/examples/modtest.m4 b/doc/examples/modtest.m4
index c61ed6f6..c61ed6f6 100644
--- a/examples/modtest.m4
+++ b/doc/examples/modtest.m4
diff --git a/examples/multiquotes.m4 b/doc/examples/multiquotes.m4
index b56cfbd8..b56cfbd8 100644
--- a/examples/multiquotes.m4
+++ b/doc/examples/multiquotes.m4
diff --git a/examples/patsubst.m4 b/doc/examples/patsubst.m4
index 9b4c7591..9b4c7591 100644
--- a/examples/patsubst.m4
+++ b/doc/examples/patsubst.m4
diff --git a/examples/pushpop.m4 b/doc/examples/pushpop.m4
index d0f2ebb8..d0f2ebb8 100644
--- a/examples/pushpop.m4
+++ b/doc/examples/pushpop.m4
diff --git a/examples/quote.m4 b/doc/examples/quote.m4
index fae52c3e..fae52c3e 100644
--- a/examples/quote.m4
+++ b/doc/examples/quote.m4
diff --git a/examples/regexp.m4 b/doc/examples/regexp.m4
index a4ca573e..a4ca573e 100644
--- a/examples/regexp.m4
+++ b/doc/examples/regexp.m4
diff --git a/examples/reverse.m4 b/doc/examples/reverse.m4
index 7e2374e2..7e2374e2 100644
--- a/examples/reverse.m4
+++ b/doc/examples/reverse.m4
diff --git a/examples/shadow.m4 b/doc/examples/shadow.m4
index f13b7dfa..f13b7dfa 100644
--- a/examples/shadow.m4
+++ b/doc/examples/shadow.m4
diff --git a/examples/stack.m4 b/doc/examples/stack.m4
index c1b98333..c1b98333 100644
--- a/examples/stack.m4
+++ b/doc/examples/stack.m4
diff --git a/examples/stack_sep.m4 b/doc/examples/stack_sep.m4
index 767d15e2..767d15e2 100644
--- a/examples/stack_sep.m4
+++ b/doc/examples/stack_sep.m4
diff --git a/examples/stdlib.m4 b/doc/examples/stdlib.m4
index df0a91dd..df0a91dd 100644
--- a/examples/stdlib.m4
+++ b/doc/examples/stdlib.m4
diff --git a/examples/sysv-args.m4 b/doc/examples/sysv-args.m4
index 7c82beb0..7c82beb0 100644
--- a/examples/sysv-args.m4
+++ b/doc/examples/sysv-args.m4
diff --git a/examples/time.m4 b/doc/examples/time.m4
index 77341308..77341308 100644
--- a/examples/time.m4
+++ b/doc/examples/time.m4
diff --git a/examples/time2.m4 b/doc/examples/time2.m4
index b0d17b35..b0d17b35 100644
--- a/examples/time2.m4
+++ b/doc/examples/time2.m4
diff --git a/examples/trace.m4 b/doc/examples/trace.m4
index 92ce9816..92ce9816 100644
--- a/examples/trace.m4
+++ b/doc/examples/trace.m4
diff --git a/examples/translit.m4 b/doc/examples/translit.m4
index 078d1726..078d1726 100644
--- a/examples/translit.m4
+++ b/doc/examples/translit.m4
diff --git a/examples/undivert.incl b/doc/examples/undivert.incl
index 408e0e20..408e0e20 100644
--- a/examples/undivert.incl
+++ b/doc/examples/undivert.incl
diff --git a/examples/undivert.m4 b/doc/examples/undivert.m4
index 61dfb391..61dfb391 100644
--- a/examples/undivert.m4
+++ b/doc/examples/undivert.m4
diff --git a/examples/wrap.m4 b/doc/examples/wrap.m4
index bbe7ae0b..bbe7ae0b 100644
--- a/examples/wrap.m4
+++ b/doc/examples/wrap.m4
diff --git a/examples/wrapfifo.m4 b/doc/examples/wrapfifo.m4
index 95ff87a0..95ff87a0 100644
--- a/examples/wrapfifo.m4
+++ b/doc/examples/wrapfifo.m4
diff --git a/examples/wraplifo.m4 b/doc/examples/wraplifo.m4
index bdbf3fb6..bdbf3fb6 100644
--- a/examples/wraplifo.m4
+++ b/doc/examples/wraplifo.m4
diff --git a/examples/wraplifo2.m4 b/doc/examples/wraplifo2.m4
index 5b450a76..5b450a76 100644
--- a/examples/wraplifo2.m4
+++ b/doc/examples/wraplifo2.m4
diff --git a/doc/m4.texi b/doc/m4.texi
index 77c3a5fe..8d40caee 100644
--- a/doc/m4.texi
+++ b/doc/m4.texi
@@ -3408,7 +3408,7 @@ by @var{separator}. While @code{joinall} always outputs a
@end deffn
Here are some examples of its usage, based on the implementation
-@file{m4-@value{VERSION}/@/examples/@/join.m4} distributed in this
+@file{m4-@value{VERSION}/@/doc/examples/@/join.m4} distributed in this
package:
@comment examples
@@ -3442,7 +3442,7 @@ m4 programming idioms.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
undivert(`join.m4')dnl
@result{}divert(`-1')
@result{}# join(sep, args) - join each non-empty ARG into a single
@@ -3515,12 +3515,12 @@ quoting are added around each element.
@end deffn
An actual implementation of these three macros is distributed as
-@file{m4-@value{VERSION}/@/examples/@/quote.m4} in this package. First,
-let's examine their usage:
+@file{m4-@value{VERSION}/@/doc/examples/@/quote.m4} in this package.
+First, let's examine their usage:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`quote.m4')
@result{}
-quote-dquote-dquote_elt-
@@ -3553,7 +3553,7 @@ resulting string.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
undivert(`quote.m4')dnl
@result{}divert(`-1')
@result{}# quote(args) - convert args to single-quoted string
@@ -3618,7 +3618,7 @@ It can, for example, be used for simple counting:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`forloop.m4')
@result{}
forloop(`i', `1', `8', `i ')
@@ -3629,7 +3629,7 @@ For-loops can be nested, like:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`forloop.m4')
@result{}
forloop(`i', `1', `4', `forloop(`j', `1', `8', ` (i, j)')
@@ -3653,11 +3653,11 @@ not finished, it increments the iterator (using the predefined macro
@code{incr}, @pxref{Incr}), and recurses.
Here is an actual implementation of @code{forloop}, distributed as
-@file{m4-@value{VERSION}/@/examples/@/forloop.m4} in this package:
+@file{m4-@value{VERSION}/@/doc/examples/@/forloop.m4} in this package:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
undivert(`forloop.m4')dnl
@result{}divert(`-1')
@result{}# forloop(var, from, to, stmt) - simple version
@@ -3699,12 +3699,12 @@ invocation is restored.
As an example, this displays each word in a list inside of a sentence,
using an implementation of @code{foreach} distributed as
-@file{m4-@value{VERSION}/@/examples/@/foreach.m4}, and @code{foreachq}
-in @file{m4-@value{VERSION}/@/examples/@/foreachq.m4}.
+@file{m4-@value{VERSION}/@/doc/examples/@/foreach.m4}, and @code{foreachq}
+in @file{m4-@value{VERSION}/@/doc/examples/@/foreachq.m4}.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`foreach.m4')
@result{}
foreach(`x', (foo, bar, foobar), `Word was: x
@@ -3727,7 +3727,7 @@ to a helper macro. This example generates a shell case statement:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`foreach.m4')
@result{}
define(`_case', ` $1)
@@ -3757,7 +3757,7 @@ through the original list. Here is a simple implementation of
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
undivert(`foreach.m4')dnl
@result{}divert(`-1')
@result{}# foreach(x, (item_1, item_2, ..., item_n), stmt)
@@ -3784,7 +3784,7 @@ rescan:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
define(`a', `1')define(`b', `2')define(`c', `3')
@result{}
include(`foreach.m4')
@@ -3809,7 +3809,7 @@ Obviously, @code{foreachq} did a better job; here is its implementation:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
undivert(`foreachq.m4')dnl
@result{}include(`quote.m4')dnl
@result{}divert(`-1')
@@ -3836,7 +3836,7 @@ Invoking m4}). Additionally, this implementation does not expand
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`foreach.m4')include(`foreachq.m4')
@result{}
foreach(`name', `(`a', `b')', ` defn(`name')')
@@ -3873,11 +3873,11 @@ few special macros, such as @code{defn}, which cannot be used as the
@end deffn
A sample implementation of these macros is distributed in the file
-@file{m4-@value{VERSION}/@/examples/@/stack.m4}.
+@file{m4-@value{VERSION}/@/doc/examples/@/stack.m4}.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`stack.m4')
@result{}
pushdef(`a', `1')pushdef(`a', `2')pushdef(`a', `3')
@@ -3913,7 +3913,7 @@ undefined during the algorithm.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
undivert(`stack.m4')dnl
@result{}divert(`-1')
@result{}# stack_foreach(macro, action)
@@ -4018,12 +4018,12 @@ obvious. The macro @code{stack_foreach} mentioned earlier is an example
of a context that provides exactly one argument to a macro name. But
coupled with currying, we can invoke @code{reverse} with two arguments
for each definition of a macro stack. This example uses the file
-@file{m4-@value{VERSION}/@/examples/@/curry.m4} included in the
+@file{m4-@value{VERSION}/@/doc/examples/@/curry.m4} included in the
distribution.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`curry.m4')include(`stack.m4')
@result{}
define(`reverse', `ifelse(`$#', `0', , `$#', `1', ``$1'',
@@ -4048,7 +4048,7 @@ directly rather than going through @code{curry}.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
undivert(`curry.m4')dnl
@result{}divert(`-1')
@result{}# curry(macro, args)
@@ -4067,7 +4067,7 @@ versions:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`curry.m4')
@result{}
curry(`define', `mylen')(defn(`len'))
@@ -4098,7 +4098,7 @@ M4 versions, or @pxref{Improved copy, , Answers}).
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`curry.m4')include(`stack.m4')
@result{}
define(`rename', `copy($@@)undefine(`$1')')dnl
@@ -4681,14 +4681,14 @@ to macro tracing.
@comment examples
@comment options: -dip
@example
-$ @kbd{m4 -dip -I examples}
+$ @kbd{m4 -dip -I doc/examples}
@error{}m4debug: input read from 'stdin'
define(`foo', `m4wrap(`wrapped text
')dnl')
@result{}
include(`incl.m4')dnl
-@error{}m4debug: path search for 'incl.m4' found 'examples/incl.m4'
-@error{}m4debug: input read from 'examples/incl.m4'
+@error{}m4debug: path search for 'incl.m4' found 'doc/examples/incl.m4'
+@error{}m4debug: input read from 'doc/examples/incl.m4'
@result{}Include file start
@result{}Include file end
@error{}m4debug: input reverted to stdin, line 3
@@ -5922,12 +5922,12 @@ However, earlier versions had reverse ordering (LIFO---last in, first
out), as this behavior is more like the semantics of the C function
@code{atexit}. It is possible to emulate POSIX behavior even
with older versions of GNU M4 by including the file
-@file{m4-@value{VERSION}/@/examples/@/wrapfifo.m4} from the
+@file{m4-@value{VERSION}/@/doc/examples/@/wrapfifo.m4} from the
distribution:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
undivert(`wrapfifo.m4')dnl
@result{}dnl Redefine m4wrap to have FIFO semantics.
@result{}define(`_m4wrap_level', `0')dnl
@@ -5950,14 +5950,14 @@ m4wrap(`a`'m4wrap(`c
It is likewise possible to emulate LIFO behavior without resorting to
the GNU M4 extension of @code{builtin}, by including the file
-@file{m4-@value{VERSION}/@/examples/@/wraplifo.m4} from the
+@file{m4-@value{VERSION}/@/doc/examples/@/wraplifo.m4} from the
distribution. (Unfortunately, both examples shown here share some
subtle bugs. See if you can find and correct them; or @pxref{Improved
m4wrap, , Answers}).
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
undivert(`wraplifo.m4')dnl
@result{}dnl Redefine m4wrap to have LIFO semantics.
@result{}define(`_m4wrap_level', `0')dnl
@@ -6086,14 +6086,14 @@ sinclude()
This section uses the @option{--include} command-line option (or
@option{-I}, @pxref{Preprocessor features, , Invoking m4}) to grab
-files from the @file{m4-@value{VERSION}/@/examples}
+files from the @file{m4-@value{VERSION}/@/doc/examples}
directory shipped as part of the GNU @code{m4} package. The
-file @file{m4-@value{VERSION}/@/examples/@/incl.m4} in the distribution
+file @file{m4-@value{VERSION}/@/doc/examples/@/incl.m4} in the distribution
contains the lines:
@comment ignore
@example
-$ @kbd{cat examples/incl.m4}
+$ @kbd{cat doc/examples/incl.m4}
@result{}Include file start
@result{}foo
@result{}Include file end
@@ -6105,7 +6105,7 @@ into the input stream. The contents of the file will be read by
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
define(`foo', `FOO')
@result{}
include(`incl.m4')
@@ -6122,7 +6122,7 @@ of @file{incl.m4}:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
define(`bar', include(`incl.m4'))
@result{}
This is `bar': >>bar<<
@@ -7371,11 +7371,11 @@ word to upper case and the remaining characters to lower case.
@end deffn
First, an example of their usage, using implementations distributed in
-@file{m4-@value{VERSION}/@/examples/@/capitalize.m4}.
+@file{m4-@value{VERSION}/@/doc/examples/@/capitalize.m4}.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`capitalize.m4')
@result{}
upcase(`GNUs not Unix')
@@ -7395,7 +7395,7 @@ them; or @pxref{Improved capitalize, , Answers}).
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
undivert(`capitalize.m4')dnl
@result{}divert(`-1')
@result{}# upcase(text)
@@ -7502,7 +7502,7 @@ example shows how @code{format} can be used to produce tabular output.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`forloop.m4')
@result{}
forloop(`i', `1', `10', `format(`%6d squared is %10d
@@ -8605,14 +8605,14 @@ This example reuses the file @file{incl.m4} mentioned earlier
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
define(`foo', ``$0' called at __file__:__line__')
@result{}
foo
@result{}foo called at stdin:2
include(`incl.m4')
@result{}Include file start
-@result{}foo called at examples/incl.m4:2
+@result{}foo called at doc/examples/incl.m4:2
@result{}Include file end
@result{}
@end example
@@ -8811,9 +8811,9 @@ mentioned earlier (@pxref{Include}):
@comment examples
@comment options: -s
@example
-$ @kbd{m4 --synclines -I examples}
+$ @kbd{m4 --synclines -I doc/examples}
include(`incl.m4')
-@result{}#line 1 "examples/incl.m4"
+@result{}#line 1 "doc/examples/incl.m4"
@result{}Include file start
@result{}foo
@result{}Include file end
@@ -9503,14 +9503,14 @@ The @code{forloop} macro (@pxref{Forloop}) as presented earlier can go
into an infinite loop if given an iterator that is not parsed as a macro
name. It does not do any sanity checking on its numeric bounds, and
only permits decimal numbers for bounds. Here is an improved version,
-shipped as @file{m4-@value{VERSION}/@/examples/@/forloop2.m4}; this
+shipped as @file{m4-@value{VERSION}/@/doc/examples/@/forloop2.m4}; this
version also optimizes overhead by calling four macros instead of six
per iteration (excluding those in @var{text}), by not dereferencing the
@var{iterator} in the helper @code{@w{_forloop}}.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
undivert(`forloop2.m4')dnl
@result{}divert(`-1')
@result{}# forloop(var, from, to, stmt) - improved version:
@@ -9551,7 +9551,7 @@ to an infinite recursion loop in this example.
@comment status: 1
@comment examples
@example
-$ @kbd{m4 -d -L 9 -I examples}
+$ @kbd{m4 -d -L 9 -I doc/examples}
define(`arg1', `$1')include(`forloop2.m4')include(`quote.m4')
@result{}
define(`double', `define(`$1'`2',
@@ -9586,7 +9586,7 @@ to pass the current iterator value as a single argument. Coupled with
with helper macros if the argument is needed in more than one place in
the expansion, the output can be generated with three, rather than four,
macros of overhead per iteration. Notice how the file
-@file{m4-@value{VERSION}/@/examples/@/forloop3.m4} rearranges the
+@file{m4-@value{VERSION}/@/doc/examples/@/forloop3.m4} rearranges the
arguments of the helper @code{_forloop} to take two arguments that are
placed around the current value. By splitting a balanced set of
parantheses across multiple arguments, the helper macro can now be
@@ -9594,7 +9594,7 @@ shared by @code{forloop} and the new @code{forloop_arg}.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`forloop3.m4')
@result{}
undivert(`forloop3.m4')dnl
@@ -9645,7 +9645,7 @@ quadratic behavior of @code{foreachq}:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`foreachq.m4')
@result{}
traceon(`shift')debugmode(`aq')
@@ -9683,11 +9683,11 @@ recursion use fewer arguments, rather than adding additional quoted
uses of @code{shift}. By doing so, @code{m4} uses less memory, invokes
fewer macros, is less likely to run into machine limits, and most
importantly, performs faster. The fixed version of @code{foreachq} can
-be found in @file{m4-@value{VERSION}/@/examples/@/foreachq2.m4}:
+be found in @file{m4-@value{VERSION}/@/doc/examples/@/foreachq2.m4}:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`foreachq2.m4')
@result{}
undivert(`foreachq2.m4')dnl
@@ -9735,11 +9735,11 @@ place, and by using the fixed-length @samp{$#} instead of an arbitrary
length list as the key to end recursion. The result is an overhead of
six macro invocations per loop (excluding any macros in @var{text}),
instead of eight. This alternative approach is available as
-@file{m4-@value{VERSION}/@/examples/@/foreach3.m4}:
+@file{m4-@value{VERSION}/@/doc/examples/@/foreach3.m4}:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`foreachq3.m4')
@result{}
undivert(`foreachq3.m4')dnl
@@ -9831,7 +9831,7 @@ not yet supported.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`foreachq4.m4')
@result{}
undivert(`foreachq4.m4')dnl
@@ -9859,15 +9859,15 @@ foreachq(`x', ``1', `2', `3', `4'', `x
@end example
For yet another approach, the improved version of @code{foreach},
-available in @file{m4-@value{VERSION}/@/examples/@/foreach2.m4}, simply
-overquotes the arguments to @code{@w{_foreach}} to begin with, using
-@code{dquote_elt}. Then @code{@w{_foreach}} can just use
+available in @file{m4-@value{VERSION}/@/doc/examples/@/foreach2.m4},
+simply overquotes the arguments to @code{@w{_foreach}} to begin with,
+using @code{dquote_elt}. Then @code{@w{_foreach}} can just use
@code{@w{_arg1}} to remove the extra layer of quoting that was added up
front:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`foreach2.m4')
@result{}
undivert(`foreach2.m4')dnl
@@ -9921,7 +9921,7 @@ one, although a leading space still remains.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`quote.m4')include(`foreachq2.m4')
@result{}
pushdef(`sep', `define(`sep', ``, '')')
@@ -9954,7 +9954,7 @@ detrimental effects.
@comment examples
@example
-$ @kbd{m4 -d -I examples}
+$ @kbd{m4 -d -I doc/examples}
include(`foreach2.m4')
@result{}
include(`foreachq2.m4')
@@ -10074,11 +10074,11 @@ the other approach would give the same output, it does so at the expense
of increasing the argument size on each iteration of
@code{_stack_reverse_sep}, which results in quadratic instead of linear
execution time. The improved stack walking macros are available in
-@file{m4-@value{VERSION}/@/examples/@/stack_sep.m4}:
+@file{m4-@value{VERSION}/@/doc/examples/@/stack_sep.m4}:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`stack_sep.m4')
@result{}
define(`copy', `ifdef(`$2', `errprint(`$2 already defined
@@ -10130,7 +10130,7 @@ builtin preserves them for their intended use.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`wraplifo.m4')
@result{}
m4wrap(`define(`foo', ``$0:'-$1-$*-$#-')foo(`a', `b')
@@ -10157,13 +10157,13 @@ Finally, it is worth emulating the GNU M4 extension of saving
all arguments to @code{m4wrap}, separated by a space, rather than saving
just the first argument. This is done with the @code{join} macro
documented previously (@pxref{Shift}). The improved LIFO example is
-shipped as @file{m4-@value{VERSION}/@/examples/@/wraplifo2.m4}, and can
-easily be converted to a FIFO solution by swapping the adjacent
+shipped as @file{m4-@value{VERSION}/@/doc/examples/@/wraplifo2.m4}, and
+can easily be converted to a FIFO solution by swapping the adjacent
invocations of @code{joinall} and @code{defn}.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`wraplifo2.m4')
@result{}
undivert(`wraplifo2.m4')dnl
@@ -10235,7 +10235,7 @@ double-quoted string:
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`capitalize.m4')dnl
define(`active', `act1, ive')dnl
define(`Active', `Act2, Ive')dnl
@@ -10296,11 +10296,11 @@ string. In turn, that means the replacement text has unbalanced quotes,
necessitating another round of @code{changequote}.
In the fixed version below, (also shipped as
-@file{m4-@value{VERSION}/@/examples/@/capitalize.m4}), @code{capitalize}
-uses the alternate quotes of @samp{<<[} and @samp{]>>} (the longer
-strings are chosen so as to be less likely to appear in the text being
-converted). The helpers @code{_to_alt} and @code{_from_alt} merely
-reduce the number of characters required to perform a
+@file{m4-@value{VERSION}/@/doc/examples/@/capitalize.m4}),
+@code{capitalize} uses the alternate quotes of @samp{<<[} and @samp{]>>}
+(the longer strings are chosen so as to be less likely to appear in the
+text being converted). The helpers @code{_to_alt} and @code{_from_alt}
+merely reduce the number of characters required to perform a
@code{changequote}, since the definition changes twice. The outermost
pair means that @code{patsubst} and @code{_capitalize_alt} are invoked
with alternate quoting; the innermost pair is used so that the third
@@ -10312,7 +10312,7 @@ scheme in effect.
@comment examples
@example
-$ @kbd{m4 -I examples}
+$ @kbd{m4 -I doc/examples}
include(`capitalize2.m4')dnl
define(`active', `act1, ive')dnl
define(`Active', `Act2, Ive')dnl
@@ -10398,7 +10398,7 @@ restrictions, covered later (@pxref{Copying This Manual}).
This appendix covers the license for copying this manual. Note that
some of the longer examples in this manual are also distributed in the
-directory @file{m4-@value{VERSION}/@/examples/}, where a more
+directory @file{m4-@value{VERSION}/@/doc/examples/}, where a more
permissive license is in effect when copying just the examples.
@menu
diff --git a/modules/README b/modules/README
index d8fc4126..3048e24e 100644
--- a/modules/README
+++ b/modules/README
@@ -71,11 +71,11 @@ strategies are illustrated by shadow.c and shadow.m4.
To try the demos, compile with `make' and run them with the commands as:
- tests/m4 examples/time.m4
+ tests/m4 doc/examples/time.m4
or in the case of time2.m4
- tests/m4 -I tests time -I examples time2.m4
+ tests/m4 -I tests time -I doc/examples time2.m4
========================================================================
diff --git a/tests/builtins.at b/tests/builtins.at
index d53ffc4e..d22b94fe 100644
--- a/tests/builtins.at
+++ b/tests/builtins.at
@@ -242,7 +242,7 @@ AT_DATA([in.m4], [[include(`forloop3.m4')dnl
forloop(`i', `1', `10000', `define(`m'i, i)')m10000
forloop(`i', `1', `10000', `undefine(`m'i)')m10000
]])
-AT_CHECK_M4([-I "$abs_top_srcdir/examples" in.m4], [0], [[10000
+AT_CHECK_M4([-I "$abs_top_srcdir/doc/examples" in.m4], [0], [[10000
m10000
]])
@@ -378,7 +378,7 @@ forloop(`i', `9001', `10000',
divert(`-1')undivert
]])
-AT_CHECK_M4([-I "$abs_top_srcdir/examples" in.m4])
+AT_CHECK_M4([-I "$abs_top_srcdir/doc/examples" in.m4])
AT_CLEANUP
diff --git a/tests/generate.awk b/tests/generate.awk
index 424663d0..567501a7 100755
--- a/tests/generate.awk
+++ b/tests/generate.awk
@@ -183,15 +183,15 @@ function new_test(input, status, output, error, options, xfail, examples) {
if (examples == 1)
{
printf ("AT_DATA([expout1],\n[[%s]])\n", output);
- printf ("$SED -e \"s|examples|$abs_top_srcdir/examples|g\" \\\n");
+ printf ("$SED -e \"s|doc/examples|$abs_top_srcdir/doc/examples|g\" \\\n");
printf (" < expout1 > expout\n\n");
if (error)
{
printf ("AT_DATA([experr1],\n[[%s]])\n", error);
- printf ("$SED \"s|examples|$abs_top_srcdir/examples|g\" \\\n");
+ printf ("$SED \"s|doc/examples|$abs_top_srcdir/doc/examples|g\" \\\n");
printf (" < experr1 > experr\n\n");
}
- options = options " -I\"$abs_top_srcdir/examples\"";
+ options = options " -I\"$abs_top_srcdir/doc/examples\"";
}
printf ("AT_DATA([[input.m4]],\n[[%s]])\n\n", input);
diff --git a/tests/others.at b/tests/others.at
index dd5c99a3..6253934b 100644
--- a/tests/others.at
+++ b/tests/others.at
@@ -457,28 +457,28 @@ include(`loop.m4')dnl
]])
dnl boxed recursion
-AT_CHECK_M4([-I "$top_srcdir/examples" -Dlimit=10 -Dverbose loop.m4], [0],
+AT_CHECK_M4([-I "$top_srcdir/doc/examples" -Dlimit=10 -Dverbose loop.m4], [0],
[[ 1 2 3 4 5 6 7 8 9 10
]])
-AT_CHECK_M4([-I "$top_srcdir/examples" -Dlimit=2500 loop.m4], [0])
-AT_CHECK_M4([-I "$top_srcdir/examples" -Dlimit=10000 in.m4], [0], [[48894
+AT_CHECK_M4([-I "$top_srcdir/doc/examples" -Dlimit=2500 loop.m4], [0])
+AT_CHECK_M4([-I "$top_srcdir/doc/examples" -Dlimit=10000 in.m4], [0], [[48894
]])
dnl unboxed recursion
-AT_CHECK_M4([-I "$top_srcdir/examples" -Dlimit=10 -Dverbose -Dalt loop.m4], [0],
+AT_CHECK_M4([-I "$top_srcdir/doc/examples" -Dlimit=10 -Dverbose -Dalt loop.m4], [0],
[[ 1 2 3 4 5 6 7 8 9 10
]])
-AT_CHECK_M4([-I "$top_srcdir/examples" -Dlimit=2500 -Dalt loop.m4], [0])
-AT_CHECK_M4([-I "$top_srcdir/examples" -Dlimit=10000 -Dalt in.m4], [0],
+AT_CHECK_M4([-I "$top_srcdir/doc/examples" -Dlimit=2500 -Dalt loop.m4], [0])
+AT_CHECK_M4([-I "$top_srcdir/doc/examples" -Dlimit=10000 -Dalt in.m4], [0],
[[48894
]])
dnl foreach via forloop recursion
-AT_CHECK_M4([-I "$top_srcdir/examples" -Dlimit=10 -Dverbose -Dalt=4 loop.m4],
+AT_CHECK_M4([-I "$top_srcdir/doc/examples" -Dlimit=10 -Dverbose -Dalt=4 loop.m4],
[0], [[ 1 2 3 4 5 6 7 8 9 10
]])
-AT_CHECK_M4([-I "$top_srcdir/examples" -Dlimit=2500 -Dalt=4 loop.m4], [0])
-AT_CHECK_M4([-I "$top_srcdir/examples" -Dlimit=10000 -Dalt=4 in.m4], [0],
+AT_CHECK_M4([-I "$top_srcdir/doc/examples" -Dlimit=2500 -Dalt=4 loop.m4], [0])
+AT_CHECK_M4([-I "$top_srcdir/doc/examples" -Dlimit=10000 -Dalt=4 in.m4], [0],
[[48894
]])
@@ -488,7 +488,7 @@ forloop(`i', `1', `10000', `pushdef(`s', i)')dnl
define(`colon', `:')define(`dash', `-')dnl
len(stack_foreach_sep(`s', `dash', `', `colon'))
]])
-AT_CHECK_M4([-I "$top_srcdir/examples" in.m4], [0], [[58893
+AT_CHECK_M4([-I "$top_srcdir/doc/examples" in.m4], [0], [[58893
]])
AT_CLEANUP