maint: Redirect developers to active branch

_This_ branch does not contain actively-developed code.  More likely,
you want to check out branch-1.4 (latest stable), branch-1.6 (some
speedups over 1.4, but not yet released), or branch-2.0 (many more
experimental changes, and even further from release).

* README: Document the status of this git repository.
This commit is contained in:
Eric Blake 2021-05-07 14:47:04 -05:00
parent d69fa52848
commit 0b98fb4591
167 changed files with 9 additions and 63374 deletions

View File

@ -1,4 +0,0 @@
# Disable the autom4te.cache directory.
begin-language: "Autoconf-without-aclocal-m4"
args: --no-cache
end-language: "Autoconf-without-aclocal-m4"

5
.gitattributes vendored
View File

@ -1,5 +0,0 @@
# See ./bootstrap for some helpful ~/.gitconfig or .git/config settings
# needed for using these attributes effectively.
*.texi* diff=texinfo
null.* diff merge
iso8859.m4 diff merge

91
.gitignore vendored
View File

@ -1,91 +0,0 @@
*~
.#*
*.a
*.bak
.deps
.dirstamp
*.exe
*.gmo
*.header
*.la
.libs
*.lo
*.log
*.mo
*.o
*.orig
*.patch
.patch_number
*.po
*.pot
*.rej
*.sin
/.tarball-version
/.version
ABOUT-NLS
/aclocal.m4
/aclocal.m4t
autom4te.cache
build-aux/
!build-aux/gl/
!build-aux/gnulib/
!build-aux/m4/
!build-aux/thanks-gen
/ChangeLog
/config.cache
/config.h
/config.h.in
/config.log
/config.status
/configure
cscope.*
CVS
/doc/.gitignore
/doc/m4.1
/doc/m4.??
/doc/m4.???
/doc/m4.html
/doc/m4.info*
/doc/manual
/doc/stamp-vti
/doc/version.texi
/GNUmakefile
/INSTALL
libtool
/m4-*
/m4/gnu
/m4/obstack.h
/m4/pathconf.h
/m4/system.h
/maint.mk
Makefile
Makefile.in
Makefile.inc
/patches
/po/.reference
/po/*.sed
/po/LINGUAS
/po/Makefile.in.in
/po/Makevars.template
/po/POTFILES
/po/Rules-quot
/po/stamp-po
/src/assure*
/src/getopt*
/src/m4
/src/version-etc*
/src/xstrto*
/stamp-h
/stamp-h1
/stamp-h.in
/stamp-vcl
/tests/at-*
/tests/atconfig
/tests/atlocal
/tests/m4
/tests/generated.at
/tests/gnu
/tests/package.m4
/tests/testsuite
/tests/testsuite.dir
/tests/testsuite.log

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "gnulib"]
path = build-aux/gnulib
url = git://git.sv.gnu.org/gnulib.git

View File

@ -1 +0,0 @@
1.4.18

View File

@ -1 +0,0 @@
ltdl/m4/gnulib-cache.m4

43
AUTHORS
View File

@ -1,43 +0,0 @@
Authors of GNU M4.
The following contributors have warranted legal paper exchanges with
the Free Software Foundation for their contributions to GNU M4. Also
see the files ChangeLog and THANKS. This list results from searching
for /\bM4\b/ in the file /gd/gnuorg/copyright.list on the
fencepost.gnu.org machine.
Rene' Seindal seindal@diku.dk 1990-03-28
James L. Avera jima@netcom.com 1993-10-04
Pete Chown pete.chown@dale.dircon.co.uk 1994-06-28
John Gerard Makecki johnm@vlibs.com 1995-04-24
Francois Pinard pinard@iro.umontreal.ca 1996-02-01
Thomas Tanner tanner@ffii.org 1999-06-23
Gary V. Vaughan gary@gnu.org 2000-10-02
Yuji Minejima ? 2001-05-09
Akim Demaille akim@freefriends.org 2001-11-01
Andrew James Bettison andrewb@zip.com.au 2001-11-19
Noah Jeffrey Misch noah@cs.caltech.edu 2004-07-05
Michael Elizabeth Chastain mec@shout.net 2001-12-27
William C. Cox bill@qswtools.com 2004-12-04
Alexandre Duret-Lutz adl@gnu.org 2004-12-04
John Gatewood Ham zappaman@buraphalinux.org 2005-11-01
Eric Benjamin Blake ebb9@byu.net 2006-01-18
John Brzustowski jbrzusto@fastmail.fm 2006-03-06
Ralf Wildenhues Ralf.Wildenhues@gmx.de 2006-03-20
Markus Duft markus.duft@salomon.at 2006-08-03
Joel E. Denny jdenny@clemson.edu 2009-08-18
David Warme David.Warme@Group-W-Inc.com 2010-03-10
Raphael Poss m4-patches@raphael.poss.name 2010-10-04
Tim Rice tim@multitalents.net 2011-01-24
========================================================================
Copyright (C) 2000, 2006-2007, 2010, 2013-2014, 2017 Free Software
Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the ``GNU Free
Documentation License'' file as part of this distribution.

674
COPYING
View File

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007, 2013-2014, 2017 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

File diff suppressed because it is too large Load Diff

334
HACKING
View File

@ -1,334 +0,0 @@
GNU M4
******
1. Introduction
===============
This file attempts to describe the processes we use to maintain M4,
and is not part of a release distribution.
2. Maintenance Notes
====================
* If you incorporate a change from somebody on the net:
If it is a large change, you must make sure they have signed the
appropriate paperwork, and be sure to add their name and email
address to THANKS. AUTHORS is built from the FSF list of copyright
assignments, on fencepost.gnu.org.
* If somebody reports a new bug, write a test case, then mention his
name in the ChangeLog entry.
* The correct response to most actual bugs is to write a new test case
which demonstrates the bug. Then fix the bug, re-run the test suite,
and check everything in.
* Changes with user-visible effects must be mentioned in NEWS.
* New macros must be blind, or else prefixed with `m4' or `__', in
order to minimize backward compatibility issues with previous
releases of M4 when processing English text.
* GNU Coding Standards should be followed:
http://www.gnu.org/prep/standards/
Additionally, while GNU M4 is not yet POSIX compliant, we are trying
to get closer to it (although some design decisions state that POSIX
compliance should only happen when POSIXLY_CORRECT is in the
environment or the -G option was passed on the command line):
http://www.opengroup.org/onlinepubs/009695399/utilities/m4.html
* Except for third-party files (libtool, gnulib, ...), all .c files
should #include <config.h> before anything else (since there are some
#defines in config.h that potentially impact system headers, such as
when the user does ./configure --disable-assert). This means that no
.h files need to #include <config.h>. However, users compiling
external modules should be able to compile without <config.h>, since
<config.h> is specific to the M4 build and is not installable.
3. Bootstrapping
================
* The master M4 repository is stored in git. You can obtain a read-only
copy with:
git clone git://git.sv.gnu.org/m4.git
or
cvs -d:pserver:anonymous@pserver.git.sv.gnu.org:/srv/git/m4.git \
co -d m4 HEAD
If you are a member of the savannah group for M4, a read-write
copy can be obtained by:
git clone <savannah-user>@git.sv.gnu.org:/srv/git/m4.git
* Before you can build from git, you need to bootstrap. This requires:
- A pre-installed version of GNU M4 1.4.5 or later, built from a
package (recommend 1.4.13 or later)
- A git checkout of Autoconf (2.63b-41 or later)
- Automake 1.10b or later
- Libtool 2.2 or later
- Gettext 0.16 or later
- Gperf 3.0 or later
- Help2man 1.29 or later
- Xz 4.999.8beta or later (from <http://tukaani.org/xz/>)
- Texinfo 4.8 or later
- Any prerequisites of the above (such as perl, tex)
Note that none of these bootstrapping dependencies should be required
by a distributed release.
* M4 includes gnulib as a git submodule. By default, the bootstrap
script will attempt to run
git submodule update --init
to grab a gnulib clone from the official read-only location of
git://git.sv.gnu.org/gnulib.git
However, this can be network and disk intensive. If you already have
another gnulib clone on your disk, you can use the environment
variable GNULIB_SRCDIR to point to the previous checkout to speed up
the process. Additionally, both the bootstrap script and gnulib-tool
require a shell that supports functions, so you can set the
environment variable CONFIG_SHELL to choose a better shell on systems
(like Solaris) where /bin/sh is lacking. Thus, you may find it
convenient to run:
GNULIB_SRCDIR=path/to/gnulib CONFIG_SHELL=path/to/sh \
path/to/sh ./bootstrap
A read-only copy of gnulib can be obtained by:
git clone git://git.sv.gnu.org/gnulib.git
or
cvs -d:pserver:anonymous@pserver.git.sv.gnu.org:/srv/git/gnulib.git \
co -d gnulib HEAD
Using a CVS checkout might work, but it is relatively untested,
particularly now that we use a git submodule for gnulib.
If you are a member of the savannah group for gnulib, a read-write
copy can be obtained by:
git clone <savannah-user>@git.sv.gnu.org:/srv/git/gnulib.git
If you are behind a firewall that blocks the git protocol, you may
find it useful to do:
git config --global url.http://git.savannah.gnu.org/r/.insteadof \
git://git.sv.gnu.org/
to force git to transparently rewrite all savannah git references to
instead use http.
* Either add the gnulib directory to your PATH, or run
GNULIB_TOOL=path/to/gnulib/gnulib-tool ./bootstrap
* When it is time for a release, it is a good idea to bootstrap with
official releases of the autotools, rather than git builds, to reduce
the pain of a user re-running bootstrap on the packaged M4. However,
files installed by Automake should be updated to the latest version
from their respective upstream source, rather than the version that
shipped with the automake release.
* Normally, after running bootstrap, 'git status' should not show any
differences; if things changed, please provide a patch or at least
report it as a bug. One case where things are changed is if the
gnulib submodule comes from an older date than the current installed
libtool, such that libtoolize will replace the symlinks to an older
version of build-aux files with their newer counterpart; the fix to
this is updating the submodule to a newer gnulib version.
* If you would like to check that you are not missing out on any useful
gnulib modules, comment out the gl_ASSERT_NO_GNULIB_POSIXCHECK in
configure.ac, then run 'make CFLAGS='-DGNULIB_POSIXCHECK=1' with gcc,
and look at the resulting warnings.
4. Test Suite
=============
* Use
make check
liberally, on as many platforms as you can. Use as many compilers and
linkers you can.
* Some of the testsuite is generated from the documentation.
All instances of @example in doc/m4.texinfo that are not preceeded by
"@comment ignore" are turned into tests in the tests directory.
5. Editing 'ChangeLog'
======================
* The ChangeLog is generated from git commit comments. Each commit log
should start with a one-line summary, a blank line, and then a
ChangeLog-style entry for all affected files. However, it's fine --
even recommended -- to write a few lines of prose describing the
change, when the summary and ChangeLog entries don't give enough of
the big picture. Omit the leading TABs that you're used to seeing in
a "real" ChangeLog file, but keep the maximum line length at 72 or
smaller, so that the generated ChangeLog lines, each with its leading
TAB, will not exceed 80 columns. As for the ChangeLog-style content,
please follow these guidelines:
http://www.gnu.org/software/guile/changelogs/guile-changelogs_3.html
* When in doubt, check that emacs can syntax-color properly in
change-log-mode. And preferably use emacs 'C-x 4 a'
(add-change-log-entry-other-window) to open ChangeLog with an
appropriate new template, which you can then paste into your git
commit editing session.
* See the GNU Coding Standards document for more details on ChangeLog
formatting.
6. Formatting
=============
* Use space-only indentation in nearly all files (Makefile inputs being
the exception).
If you use Emacs and your m4 working directory name matches,
this code in your ~/.emacs enables the right mode:
;; In m4, indent with spaces everywhere (not TABs).
;; Exceptions: Makefile and ChangeLog modes.
(add-hook 'find-file-hook '(lambda ()
(if (and buffer-file-name
(string-match "/m4\\>" (buffer-file-name))
(not (string-equal mode-name "Change Log"))
(not (string-equal mode-name "Makefile")))
(setq indent-tabs-mode nil))))
* Since the source code was massively converted from tabs in December
2009, you may find it helpful to use 'git diff -w' and 'git blame -w'
helpful for overlooking the whitespace changes.
* Avoid #ifdefs inside function bodies, whenever possible. If you
encounter a portability issue, it is better to propose a gnulib module
that works around it, and have m4 use that module.
7. Release Procedure
====================
* If you are an m4 maintainer, but have not yet registered your
gpg public key and (preferred) email address with the FSF, send an
email, preferably GPG-signed, to <ftp-upload@gnu.org> that includes
the following:
(a) name of package(s) that you are the maintainer for, and your
preferred email address.
(b) an ASCII armored copy of your GnuPG key, as an attachment.
("gpg --export -a YOUR_KEY_ID > mykey.asc" should give you
this.)
When you have received acknowledgement of your message, the proper GPG
keys will be registered on ftp-upload.gnu.org and only then will you be
authorized to upload files to the FSF ftp machines.
* If you do not have access to the mailing list administrative interface,
approach the list owners for the password. Be sure to check the lists
(esp. bug-m4) for outstanding bug reports also in the list of
pending moderation requests. This step is not strictly necessary, but
helps, since by default, m4-announce rejects all posts, so you have to
get an administrator to allow your announcement through.
* Make sure you have rsync installed.
* Make sure you have GNU make installed.
* Make sure you have an up-to-date version of help2man installed.
* Make sure your locale is sane, e.g. by exporting LC_ALL=C.
* Make sure you are happy with the particular gnulib version recorded as
the gnulib submodule. If necessary to update to the latest, run:
git submodule foreach git pull origin master
git commit -m 'Update gnulib submodule to latest.' gnulib
In particular, ensure that the gnulib version is at least as new as
the latest stable libtool release.
* Update the version number in NEWS, and mention in README whether the
release is stable. See
http://www.gnu.org/software/libtool/contribute.html for details of the
numbering scheme (M4 uses a similar scheme to libtool, although
intra-release versions carry more information thanks to
git-version-gen).
* Run ./bootstrap, perhaps with environment variables set.
* Run ./configure (a VPATH build should work, but is less tested).
* Run `make'. The file doc/m4.1 needs to exist for a distribution, and
be up-to-date with m4 --help output, but `make dist' intentionally
does not depend on running a built binary.
* Run `git commit' from the source tree if there are any changes from
the previous steps.
* Run `git tag -s -m <version> -u <gpg_key> v<version>' with the desired
version number. Do not push anything upstream at this point.
* Run `make distcheck'. If there are any problems, fix them, then run
`git tag -d v<version>' and start again from the `git commit' step.
* Run `make <target>', with target set to `stable', `alpha', or `beta'
as appropriate. This will run various additional checks.
* Run './build-aux/gnupload --to [dest].gnu.org:m4 [files]' to create
detached gpg signature and clear signed directive files, and upload
the combination to the correct location. For an alpha release,
gnupload will place files in alpha.gnu.org, in /incoming/alpha; for a
full release, gnupload will place files in ftp.gnu.org, in
/incoming/ftp. Verify that the files uploaded successfully before
sending an announcement.
* Send announcement to m4-discuss@gnu.org, m4-announce@gnu.org, and
autotools-announce@gnu.org. If not an alpha send to info-gnu@gnu.org
as well. Use gnulib/build-aux/announce-gen to form an initial
template for the announcement (you may also need to install the perl
module Digest::SHA1). Contact a list administrator for m4-announce in
advance to ensure your post will make it through (the list is normally
set to silently discard all posts, even from subscribers).
* Update version number in configure.ac to next alpha number.
See http://www.gnu.org/software/libtool/contribute.html for details of
the numbering scheme.
* Update NEWS and README to start the intra-release changes, and run
`git commit'. Then run `git push origin refs/tags/v<version>' to push
the release tag and complete the release.
* For stable releases, update the webpages.
Run `build-aux/gnu-web-doc-update', which runs `make web-manual' on a
temporary git branch corresponding to the release, then copies the
contents of doc/manual into a CVS checkout of the M4 manual
repository. Follow up with any needed edits to m4.html, using:
export CVS_RSH=ssh
cvs -z3 -d:ext:<user>@cvs.savannah.gnu.org:/web/m4 co m4
* Update the Free Software Directory. Browse to:
http://directory.fsf.org/project/m4/
and send an email to <bug-directory@gnu.org> mentioning any content
that needs to be updated.
-----------
Copyright (C) 2004-2010, 2013-2014, 2017 Free Software Foundation, Inc.
The canonical source of this file is maintained with the
GNU M4 package. Report bugs to bug-m4@gnu.org.
GNU M4 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
GNU M4 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Local Variables:
mode: text
fill-column: 72
End:
vim:tw=72

View File

@ -1,453 +0,0 @@
## Makefile.am - template for generating Makefile via Automake
##
## Copyright (C) 2000-2001, 2003-2010, 2013-2014, 2017 Free Software
## Foundation, Inc.
##
## This file is part of GNU M4.
##
## GNU M4 is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## GNU M4 is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
## Written by Gary V. Vaughan <gary@gnu.org>
config_aux_dir = build-aux
config_macro_dir= $(config_aux_dir)/m4
SUBDIRS = po m4/gnu . doc tests/gnu
ACLOCAL_AMFLAGS = -I build-aux/m4
AUTOMAKE_OPTIONS = nostdinc
gitlog_to_changelog = $(srcdir)/$(config_aux_dir)/gitlog-to-changelog
git_log_fix = $(srcdir)/$(config_aux_dir)/git-log-fix
thanks_gen = $(srcdir)/$(config_aux_dir)/thanks-gen
changelog = $(distdir)/ChangeLog
changelog_old = $(srcdir)/ChangeLog.old
thanks = $(distdir)/THANKS
no_thanks = $(srcdir)/NO-THANKS
# Prime the variables that will be augmented by libtool.
# FIXME - the -export-symbols-regex ".*" is a hack to work around the
# fact that on cygwin, the convenience library libltdl exports symbols,
# which effectively disables the auto-exporting of all other symbols.
# Revisit this if libtool on cygwin improves.
# See http://lists.gnu.org/archive/html/libtool-patches/2007-02/msg00062.html
AM_CPPFLAGS = -I$(srcdir) -I.
AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
AM_LDFLAGS = -no-undefined -export-dynamic -export-symbols-regex ".*"
EXTRA_DIST =
BUILT_SOURCES =
CLEANFILES =
DISTCLEANFILES =
MOSTLYCLEANFILES=
MAINTAINERCLEANFILES =
include_HEADERS =
noinst_LTLIBRARIES=
lib_LTLIBRARIES =
check_LTLIBRARIES =
EXTRA_LTLIBRARIES=
# Additional configuration. Version management comes from suggestions
# given in build-aux/git-version-gen.
AM_CPPFLAGS += -Im4/gnu -I$(srcdir)/m4/gnu \
-Im4 -I$(srcdir)/m4
AM_LDFLAGS += $(OS2_LDFLAGS)
EXTRA_DIST += bootstrap cfg.mk maint.mk .version .prev-version \
$(config_macro_dir)/gnulib-cache.m4
BUILT_SOURCES += .version
.version:
$(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
dist-hook: dist-tarball-version
dist-tarball-version:
$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
dist-hook: $(changelog)
changelog_start_date = 2011-01-01
$(changelog): FORCE
$(AM_V_GEN)if test -d '$(top_srcdir)/.git'; then \
test -e '$(log_fix)' \
&& amend_git_log="--amend=$(log_fix)" \
|| amend_git_log=; \
$(gitlog_to_changelog) $$amend_git_log \
--since=$(changelog_start_date) > '$@T' \
&& rm -f '$@' && mv '$@T' '$@'; \
fi
# Sort in traditional ASCII order, regardless of the current locale;
# otherwise we may get into trouble with distinct strings that the
# current locale considers to be equal.
ASSORT = LC_ALL=C sort
# Extract all lines up to the first one starting with "##".
prologue = perl -ne '/^\#\#/ and exit; print' $(no_thanks)
# Generate THANKS using git log entries as far as possible, fixing
# up ommisions and errors from NO-THANKS configuration.
$(thanks): FORCE
$(AM_V_GEN)if test -d '$(srcdir)/.git'; then \
{ \
$(prologue); echo; \
{ perl -ne '/^$$/.../^$$/ and print' $(no_thanks) \
| grep -v '^$$' | perl -pe 's/ +/\0/'; \
{ sed -e '1,/\#\# /d' -e '/^\#\# /d' \
-e 's|[ ][ ]*| |' < $(no_thanks) \
| tr '\t' '\0'; \
git log --pretty=format:'%aN%x00%aE'; \
} | $(ASSORT) -u; \
} | $(thanks_gen) \
| LC_ALL=en_US.UTF-8 sort -f; \
echo; \
printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:; \
} > '$@'; \
fi
MAINTAINERCLEANFILES += \
ABOUT-NLS INSTALL Makefile.in aclocal.m4 \
config-h.in configure stamp-h.in \
po/cat-id-tbl.c po/m4.pot po/stamp-cat-id
## ------- ##
## GNU M4. ##
## ------- ##
bin_PROGRAMS = src/m4
src_m4_SOURCES = \
src/assure.h \
src/xstrtoul.c \
src/xstrtol-error.c \
src/xstrtol.c \
src/xstrtol.h \
src/version-etc-fsf.c \
src/version-etc.c \
src/version-etc.h \
src/main.c \
src/m4.h \
src/freeze.c
if GETOPT
src_m4_SOURCES += \
src/getopt.c \
src/getopt1.c
endif
if STACKOVF
src_m4_SOURCES += src/stackovf.c
endif
src_m4_CPPFLAGS = $(AM_CPPFLAGS) -Isrc -I$(srcdir)/src
src_m4_LDADD = m4/libm4.la $(LTLIBICONV) $(LTLIBTHREAD)
src_m4_DEPENDENCIES = m4/libm4.la
## ##
## --- PASTED MANUALLY FROM GNULIB --- ##
## To avoid adding unnecessary objects to libm4.la these gnulib ##
## modules are not imported by gnulib-tool, but added manually. ##
## (from: gnulib-tool --extract-automake-snippet getopt-posix) ##
## ##
if GETOPT
BUILT_SOURCES += src/$(GETOPT_H)
endif
EXTRA_DIST += src/getopt.c src/getopt1.c src/getopt.in.h src/getopt_int.h
ARG_NONNULL_H = $(srcdir)/$(config_aux_dir)/arg-nonnull.h
# We need the following in order to create an <getopt.h> when the
# system doesn't have one that works with the given compiler.
src/getopt.h: src/getopt.in.h $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/src/getopt.in.h; \
} > $@-t && \
mv -f $@-t $@
MOSTLYCLEANFILES += src/getopt.h src/getopt.h-t
## ##
## --- END OF PASTED GNULIB --- ##
## ##
## -------- ##
## Modules. ##
## -------- ##
module_ldflags = -avoid-version -module $(AM_LDFLAGS)
module_libadd = m4/libm4.la
noinst_HEADERS = modules/m4.h
pkglib_LTLIBRARIES =
pkglib_LTLIBRARIES += modules/gnu.la
EXTRA_modules_gnu_la_SOURCES = modules/format.c
modules_gnu_la_LDFLAGS = $(module_ldflags)
modules_gnu_la_LIBADD = $(module_libadd)
EXTRA_DIST += $(EXTRA_modules_gnu_la_SOURCES)
pkglib_LTLIBRARIES += modules/m4.la
EXTRA_modules_m4_la_SOURCES = modules/evalparse.c
modules_m4_la_LDFLAGS = $(module_ldflags)
modules_m4_la_LIBADD = $(module_libadd)
EXTRA_DIST += $(EXTRA_modules_m4_la_SOURCES)
if USE_GMP
pkglib_LTLIBRARIES += modules/mpeval.la
EXTRA_modules_mpeval_la_SOURCES = modules/evalparse.c
modules_mpeval_la_LDFLAGS = $(module_ldflags)
modules_mpeval_la_LIBADD = $(module_libadd) $(LIBADD_GMP)
endif
pkglib_LTLIBRARIES += modules/stdlib.la
modules_stdlib_la_LDFLAGS = $(module_ldflags)
modules_stdlib_la_LIBADD = $(module_libadd)
pkglib_LTLIBRARIES += modules/time.la
modules_time_la_LDFLAGS = $(module_ldflags)
modules_time_la_LIBADD = $(module_libadd)
pkglib_LTLIBRARIES += modules/traditional.la
modules_traditional_la_LDFLAGS = $(module_ldflags)
modules_traditional_la_LIBADD = $(module_libadd)
## ----- ##
## libm4 ##
## ----- ##
lib_LTLIBRARIES += m4/libm4.la
nobase_include_HEADERS = \
m4/m4module.h \
m4/hash.h \
m4/system.h
m4_libm4_la_SOURCES = \
m4/builtin.c \
m4/debug.c \
m4/hash.c \
m4/input.c \
m4/m4.c \
m4/m4private.h \
m4/macro.c \
m4/module.c \
m4/output.c \
m4/path.c \
m4/resyntax.c \
m4/symtab.c \
m4/syntax.c \
m4/utility.c
m4_libm4_la_LIBADD = m4/gnu/libgnu.la \
$(LTLIBINTL) $(LIBADD_DLOPEN)
m4_libm4_la_DEPENDENCIES = m4/gnu/libgnu.la
# This file needs to be regenerated at configure time.
dist-hook:
rm -f $(distdir)/m4/system.h
EXTRA_DIST += m4/system_.h
## -------------- ##
## Documentation. ##
## -------------- ##
TAGS_FILES = $(infos_TEXINFOS)
TAGS_DEPENDENCIES = $(TAGS_FILES)
ETAGS_ARGS = --language=none --regex='/@node \([^,]*\)/\1/' $(TAGS_FILES)
MAINTAINERCLEANFILES += $(dist_man_MANS)
## --------- ##
## Examples. ##
## --------- ##
EXTRA_DIST += \
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 = \
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 += \
doc/examples/modtest.m4 \
doc/examples/shadow.m4 \
doc/examples/time.m4 \
doc/examples/time2.m4 \
doc/examples/stdlib.m4
## ----------- ##
## Test suite. ##
## ----------- ##
# Use `$(srcdir)' for the benefit of non-GNU makes: this is
# how `testsuite' appears in our dependencies.
TESTSUITE = $(srcdir)/tests/testsuite
TESTSUITE_AT = \
tests/builtins.at \
tests/freeze.at \
$(srcdir)/tests/generated.at \
tests/macros.at \
tests/modules.at \
tests/options.at \
tests/others.at \
tests/testsuite.at
EXTRA_DIST += $(TESTSUITE) $(TESTSUITE_AT) $(OTHER_FILES) \
tests/atlocal.in \
tests/generate.awk \
$(srcdir)/tests/package.m4
module_check = -rpath /dev/null
check_LTLIBRARIES += tests/import.la
tests_import_la_LDFLAGS = $(module_ldflags) $(module_check)
tests_import_la_LIBADD = $(module_libadd)
check_LTLIBRARIES += tests/modtest.la
tests_modtest_la_LDFLAGS = $(module_ldflags) $(module_check)
tests_modtest_la_LIBADD = $(module_libadd)
check_LTLIBRARIES += tests/shadow.la
tests_shadow_la_LDFLAGS = $(module_ldflags) $(module_check)
tests_shadow_la_LIBADD = $(module_libadd)
# Using variables so that this snippet is not too wide and can
# be used as is in Texinfo @example/@end example.
m4_texi = $(srcdir)/doc/m4.texi
generate = $(AWK) -f $(srcdir)/tests/generate.awk
$(srcdir)/tests/generated.at: tests/generate.awk $(m4_texi)
$(generate) $(m4_texi) >$@t
mv $@t $@
AUTOM4TE = $(SHELL) $(srcdir)/$(config_aux_dir)/missing --run autom4te
AUTOTEST = $(AUTOM4TE) --language=autotest
$(TESTSUITE): $(srcdir)/tests/package.m4 $(TESTSUITE_AT)
$(AUTOTEST) -I '$(srcdir)/tests' -o $@.tmp $@.at
mv $@.tmp $@
# The leading :; works around a bug in {}>f in some bash versions.
$(srcdir)/tests/package.m4: .version
:; \
{ \
echo '# Signature of the current package.'; \
echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])'; \
echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])'; \
echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])'; \
echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])'; \
echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
} > $(srcdir)/tests/package.m4
tests/atconfig: config.status
$(SHELL) ./config.status tests/atconfig
DISTCLEANFILES += tests/atconfig
# Hook the test suite into the check rule
check-local: tests/atconfig tests/atlocal tests/m4 $(TESTSUITE) \
$(check_LTLIBRARIES)
$(SHELL) '$(srcdir)/tests/testsuite' -C tests $(TESTSUITEFLAGS)
# Run the test suite on the *installed* tree, including any renames
# the user requested.
installcheck-local: tests/atconfig tests/atlocal $(TESTSUITE) \
$(check_LTLIBRARIES)
$(SHELL) '$(srcdir)/tests/testsuite' -C tests \
AUTOTEST_PATH="$(bindir)" \
M4="`echo m4 | sed '$(program_transform_name)'`" $(TESTSUITEFLAGS)
# Enough users install GNU M4 as gm4 that we make sure 'make installcheck'
# will handle that, as part of making a release.
DISTCHECK_CONFIGURE_FLAGS = \
--disable-assert \
--program-prefix=g \
--enable-cxx
# We need to remove any file droppings left behind by testsuite.
clean-local-tests:
test ! -f '$(srcdir)/tests/testsuite' || \
$(SHELL) '$(srcdir)/tests/testsuite' -C tests --clean
OTHER_FILES = tests/iso8859.m4 tests/stackovf.test \
tests/null.m4 tests/null.out tests/null.err
DISTCLEANFILES += tests/atconfig tests/atlocal tests/m4
MAINTAINERCLEANFILES += $(srcdir)/tests/generated.at '$(TESTSUITE)'
clean-local: clean-local-tests
FORCE:

1228
NEWS

File diff suppressed because it is too large Load Diff

186
NO-THANKS
View File

@ -1,186 +0,0 @@
These people have contributed to GNU M4. Some have reported problems,
others have contributed improvements to the documentation and actual code.
The particular contributions are described in the version control logs and
ChangeLog files. If your name has been left out, if you'd rather not be
listed, or if you'd prefer a different address be used, please send a
note to the bug-report mailing list (as seen at end of e.g., m4 --help).
##
## There is no need to list here any name that appears as an Author in
## "git log" output. Those are automatically added when this template
## is used to generate the THANKS file. You will still need to add
## contributors who are not a git log Author - e.g. bug reporters.
##
## Folks already promoted to AUTHORS:
##
!Akim Demaille
!Alexandre Duret-Lutz
!Andrew James Bettison
!David Warme
!Eric Benjamin Blake
!François Pinard
!Gary V. Vaughan
!James L. Avera
!Joel E. Denny
!John Brzustowski
!John Gatewood Ham
!John Gerard Makecki
!Markus Duft
!Michael Elizabeth Chastain
!Noah Jeffrey Misch
!Pete Chown
!Ralf Wildenhues
!Raphael Poss
!René Seindal
!Thomas Tanner
!Tim Rice
!William C. Cox
!Yuji Minejima
##
## Remove duplicates under alternate names, and add preferred email
## addresses from contributors that don't match git log output here:
##
!Andrew Bettison
!Eric Blake
!Francois Pinard
!Noah Misch
!Rene' Seindal
##
## Add bug reporters, patch Authors you forgot to attribute at commit
## time with 'git commit --author=...' and other non-patch contributers
## below:
##
Akiko Matsushita matusita@sra.co.jp
Alan Magnuson awm@osc.edu
Albert Chin m4-discuss@mlists.thewrittenword.com
Alexander Lehmann alex@hal.rhein-main.de
Amos Shapira amoss@cs.huji.ac.il
Andreas Büning andreas.buening@nexgo.de
Andreas Gustafsson gson@niksula.hut.fi
Andreas Schultz aschultz@warp10.net
Andreas Schwab schwab@ls5.informatik.uni-dortmund.de
Andrew Athan athan@morgan.com
Assar Westerlund assar@nada.kth.se
Ben A. Mesander ben@piglet.cr.usgs.gov
Ben Elliston bje@cygnus.com
Bengt Mertensson bengt@mathematik.uni-bremen.de
Bernhard Daeubler daeb@physik.uni-ulm.de
Bill Bumgarner bbum@thoughtport.com
Bjorn R. Bjornsson brb@falcon.is
Bob Badour bob@badour.net
Bob Proulx bob@proulx.com
Brendan Kehoe brendan@cygnus.com
Brian J. Fox bfox@datawave.net
Brian D. Carlstrom bdc@clark.lcs.mit.edu
Cesar Strauss cestrauss@gmail.com
Charles Wilson cygwin@cwilson.fastmail.fm
Chris McGuire chris@wso.net
Chris Penev xpenev@gmail.com
Damian Menscher menscher@uiuc.edu
Dan Jacobson jidanni@jidanni.org
Daniel Richard G. skunk@iskunk.org
David J. MacKenzie djm@uunet.uu.net
David Perlin davep@nanosoft.com
Elbert Pol elbert.pol@gmail.com
Elias Benali elptr@users.sourceforge.net
Erez Zadok ezk@cs.columbia.edu
Eric Allman eric@cs.berkeley.edu
Eric Backus ericb@lsid.hp.com
Eric Fischer enf1@ellis.uchicago.edu
Erick Branderhorst Erick.Branderhorst@asml.nl
Fernando Carrijo fcarrijo1980@gmail.com
Frank Schwidom schwidom@impernet.de
Gary Affonso Gary_Affonso@iqinc.com
Geoff Russell grussell@guest.adelaide.edu.au
Giovanni Toffetti toffettg@lu.unisi.ch
Greg A. Woods woods@web.apc.org
Greg McGary gkm@cstone.net
Hal Peterson hrp@pecan.cray.com
Hoang Uong hoang@ornews.intel.com
Hongjiu Lu hjl@nynexst.com
Ian Taylor ian@cygnus.com
Ilya N. Golubev gin@mo.msk.ru
Jan Djarv Jan.Djarv@sa.erisoft.se
Jason Merrill jason@jarthur.claremont.edu
Jay Krell jay.krell@cornell.edu
Jean-Charles Longuet jclonguet@free.fr
Jens Rehsack rehsack@googlemail.com
Jim Avera jima@netcom.com
Jim Kingdom kingdon@cygnus.com
Jim Meyering meyering@acm.org
Joel Sherrill jsherril@uahcs2.cs.uah.edu
John David Anglin dave@hiauly1.hia.nrc.ca
Josef T. Burger bolo@bolo.com
Joseph E. Sacco jsacco@ssl.com
Joseph S. Myers jsm28@cam.ac.uk
Joshua R. Poulson jrp@plaza.ds.adp.com
Karl Berry karl@freefriends.org
Karl Nelson nelson85@llnl.gov
Karl Vogel vogelke@c-17igp.wpafb.af.mil
Kaveh R. Ghazi ghazi@noc.rutgers.edu
Keith Bostic bostic@abyssinian.sleepycat.com
Konrad Schwarz konrad.schwarz@siemens.com
Kristine Lund lund@lpnaxp.in2p3.fr
Krste Asanovic krste@icsi.berkeley.edu
Lawson Chan Lawson.Chan@tdsecurities.com
M. Levinson levinsm@users.sourceforge.net
Marcus Daniels marcus@ee.pdx.edu
Marion Hakanson hakanson@cse.ogi.edu
Mark Seiden mis@seiden.com
Martin Koeppe mkoeppe@gmx.de
Massimo Dal Zotto dz@cs.unitn.it
Matt Kraai kraai@debian.org
Matthew Woehlke mw_triad@users.sourceforge.net
Matthias Rabe rabe@mathematik.uni-bielefeld.de
Mehul Sanghvi mehul.sanghvi@gmail.com
Michael Fetterman mafetter@ichips.intel.com
Michael L. Welcome welcome@bigbird.llnl.gov
Mike Andrews kramer@fragile.termfrost.org
Mike Dupont jamesmikedupont@googlemail.com
Mike Frysinger vapier@gentoo.org
Mike Howard mike@clove.com
Mike Lijewski lijewski@theory.tc.cornell.edu
Mike R. mroberge@aol.com
Mike Stump mikestump@comcast.net
Mikhail Teterin Mikhail.Teterin@murex.com
Nelson H. F. Beebe beebe@math.utah.edu
Nick S. Kanakakorn skanan@otl.scu.edu
Nicolas Lichtmaier nick@technisys.com.ar
Nicolas Pioch pioch@inf.enst.fr
Noah Friedman friedman@gnu.org
Per Bothner per@bothner.com
Pierre Gaumond gaumondp@ere.umontreal.ca
Pierre Mathieu mathieu@geod.emr.ca
Rafael Corvalan rafael@club-internet.fr
Rainer Tammer tammer@tammer.net
Richard A Nelson cowboy@vnet.ibm.com
Richard Ling richard@research.canon.oz.au
Richard Stallman rms@gnu.org
Robert Bernstein rocky@panix.com
Robert Bihlmeyer robbe@orcus.priv.at
Roderick Koehle Roderick.Koehle@infineon.com
Roland H. Pesch roland@wrs.com
Roland McGrath roland@gnu.org
Ronny Peine RonnyPeine@gmx.de
Sami Liedes sliedes@cc.hut.fi
Santiago Vila sanvila@debian.org
Scott Bartram deneb!scottb
Sergey Poznyakoff gray@gnu.org.ua
Simon Leinen simon@lia.di.epfl.ch
Skip Montanaro skip@automatrix.com
Stephen Perkins perkins@cps.msu.edu
Steve Williamson willy@uinpla.npl.uiuc.edu
Steven Augart saugart@yahoo.com
Terry Jones terry@cliffs.ucsd.edu
Thomas Klausner tk@giga.or.at
Thorsten Ohl ohl@physics.harvard.edu
Todd Rinaldo toddr@cpanel.net
Tom G. Christensen tgc@jupiterrise.com
Tom McConnell tmcconne@sedona.intel.com
Tom Quinn trq@dionysos.thphys.ox.ac.uk
Tom Tromey tromey@cns.caltech.edu
Ulrich Drepper drepper@gnu.org
Vern Paxson vern@ee.lbl.gov
Vic Abell abe@cc.purdue.edu
Vincent Lonngren Vincent.lonngren.759@student.lu.se
Vivek P. Singhal singhal@cs.utexas.edu
Walter Wong wcw+@cmu.edu

90
README
View File

@ -9,92 +9,20 @@ GNU `m4' was originally written by Rene' Seindal, from Denmark.
GNU `m4' has a web site at http://www.gnu.org/software/m4/.
If GNU `m4' is meant to serve GNU `autoconf', beware that `m4'
should be fully installed *prior to* configuring `autoconf' itself.
Likewise, if you intend on hacking GNU `m4' from git, the bootstrap
process requires that you first install a released copy of GNU `m4'.
If you are just trying to build `m4' from a released tarball, you
should not normally need to run `./bootstrap' or `autoreconf'; just go
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 `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.
See file `COPYING' for copying conditions. Note that M4 is distributed
under the GNU Public License version 3 or later. Some files in the
distribution are copied from the gnulib project, and hence bear the
designation version 2 or later because they are unmodified from gnulib;
however, if you modify these files using M4 rather than gnulib as the
source, you must update the license to be GPLv3 or later.
See file `INSTALL' for compilation and installation instructions.
See file `ABOUT-NLS' for how to customize this program to your language.
See file `NEWS' for a list of major changes in the current release.
See file `AUTHORS' for the names of maintainers.
See file `THANKS' for a list of contributors.
By using `./configure --with-gmp, you get multiple precision integral
and rational arithmetic using mpeval. The implementation depends on the
GNU gmp v2 library.
By using `./configure --with-modules=`foo bar baz', you get an m4 with only
the named modules preloaded. The default modules (preloaded if you do not
use this option) are sufficient to do the job of GNU m4-1.4. Additional
modules may be desirable, or necessary if libltdl does not support your
host architecture. The implementation uses libltdl interface, details of
which are in the libtool manual. See file `modules/README' for a more
detailed description.
By default, the `syscmd' and `esyscmd' macros try to use the first
instance of `sh' found by `command -p getconf PATH' at configure time,
with a default of `/bin/sh'. If that default is inappropriate, you
can use `./configure --with-syscmd-shell=location' to specify the
shell to use.
By using `./configure --with-dmalloc', GNU m4 is linked with Gray
Watson's dmalloc package. It is a debugging option for finding memory
management problems. Gray Watson's dmalloc package is available at
ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz.
GNU M4 uses GNU Libtool in order to build shared libraries on a
variety of systems. While this is very nice for making usable
binaries, it can be a pain when trying to debug a program. For that
reason, compilation of shared libraries can be turned off by
specifying the `--disable-shared' option to `configure'. However,
without shared libraries, modules that are not preloaded will not be
available for use.
Send bug reports, comments or ideas to `bug-m4@gnu.org'. A bug report
is an adequate description of the problem: your input, what you
expected, what you got, and why this is wrong. Diffs are welcome, but
they only describe a solution, from which the problem might be uneasy to
infer. Don't forget all relevant information about your operating
system, compiler, libraries, ...
The easiest way to remember this information is by using the
testsuite. Any test failures are automatically logged, along with
lots of useful information about your setup; simply mailing
tests/testsuite.log to `bug-m4@gnu.org' is a good start. If you want
to dive in and debug a failure, you may find it useful to fine-tune
the execution of the testsuite. For example, running test 12 in
verbose mode can be done with:
make check TESTSUITEFLAGS='-v -d -x 12'
The testsuite understands --help to tell you more about the current
set of tests.
This repository has several branches. The one you have checked out
does not have any code. Instead, you will want to check out one of:
- branch-1.4: Latest stable release, most up-to-date
- branch-1.6: Some improvements to 1.4, but not yet finalized and released
- branch-2.0: Many new experimental features, hasn't been worked on in years
For any copyright year range specified as YYYY-ZZZZ in this package
note that the range specifies every single year in that closed interval.
note that the range includes years in that closed interval; a more
precise determination of copyrightable changes can be obtained from
inspecting version control logs.
========================================================================
Copyright (C) 2000, 2005-2011, 2013-2014, 2017 Free Software Foundation,
Inc.
Copyright (C) 2000-2021 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or

150
TODO
View File

@ -1,150 +0,0 @@
GNU m4 TODO - Tasks that need implementing. -*- outline -*-
Copyright (C) 2000-2001, 2006-2008, 2010, 2013-2014, 2017 Free Software
Foundation, Inc.
Tell the maintainers at <bug-m4@gnu.org> if you feel like volunteering
for any of these ideas or if you have others to add.
* KNOWN BUGS
+ The following patch needs to be ported from the branch:
http://lists.gnu.org/archive/html/m4-patches/2007-03/msg00005.html
May be a couple of issues in that thread.
+ The format builtin needs more power to be like printf(1):
http://lists.gnu.org/archive/html/m4-discuss/2007-05/msg00015.html
But be aware of compatibility issues in making too many changes.
+ The test case `other-tests/stackovf.test' does not work.
+ stack overflow is basically broken
The routines to detect stack overflow throuh segv are basically
broken. The idea may be fine, but it ends up calling a sigv handler
that uses gettext, printf, stdout... all of which are definitely NOT
sig-safe. Pity, because the hardcode routine is basically very careful
to use write(2), to avoid this.
I haven't checked that translation magic is signal-safe.
- I doubt it;
- stdio is not signal-safe in any kind of portable setting anyways.
--
Marc Espie
espie@schutzenberger.liafa.jussieu.fr
Perhaps the gnulib c-stack module or libsigsegv would be useful:
http://lists.gnu.org/archive/html/bug-gnu-utils/2008-01/msg00042.html
* FEATURES OR PROBLEMS
+ m4 should keep an ``execution stack'' of macros, which applications could
use in their error messages.
+ Implement discarding comment delimiters with the syntax table.
+ Implement qindir. Like indir, except that the result of the macro call
is not expanded. Because the input stack might contain a file or a
string, it is probably best achieved by making note that the TOS input
should be copied rather than rescanned.
$ echo "a'b" > f
$ m4
define(a,z)dnl
include(f)dnl
z'b
indir(`include', f)dnl
z'b
qindir(`include', f)dnl
a'b
define(b,NONO)dnl
patsubst(qindir(`include', f), `b', x)
z'x
+ Use the TOS input quoting for qindir to fix this undesirable POSIX
behavior:
define(`x', -'-)
define(y, defn(`x'))
y
--'
--
Stepan Kasal <kasal@ucw.cz>
+ If configured --with-gmp for multiple precision arithmetic there are
some warnings, but it passes the tests.
+ Make m4 show include dependencies like gcc so Makefile targets are
updated when their (included) input files are updated (Erick B).
+ Add support for wide character sets.
* OPTIMIZATION AND CLEAN UP
+ Have NULs go really undisturbed through GNU m4
GNU m4 is lousy regarding NULs in streams (this would require
maintaining the string lengths, and avoiding strlen, strcpy,
etc.). (Almost there, once argv_ref is ported).
+ The argument count limits are handled for all tokens passed around by
the internals: we should enable attaching these values to text macros
too.
+ The context parameter is just a placeholder for formerly global state.
We should be making the library reentrant so that multiple instances
of m4 can be run in the same process at the same time.
+ The path management stuff (in path.c/m4private.h) is reinventing the
wheel. There are a bunch of fast path management and search functions
in ltdl.c: These need to be sanitized, exported through ltdl.h, and
then wrapped by the m4module.h path api. path.c can probably be removed
entirely at that point.
* MODULE SPECIFIC ISSUES
+ Some way of linking a module statically is needed, for systems
without support for dynamic loading.
+ Some sort of module interface versioning system needs to be implemented
in the module loader and the freezer so that m4 can tell if it is being
asked to load a frozen file that requires versions of modules with
interface versions unsupported by the current release.
+ The module API should probably use functions, not data exports:
http://lists.gnu.org/archive/html/m4-patches/2007-09/msg00012.html
Actually, there are several good ideas for module in that thread.
+ Setting of the module search path within m4 scripts:
append(__modulepath__, `/some/modules/live/here')
+ Module autoloader. This would allow an m4 core with no builtins except
for loadmodule(). A default startup script would mark the recognised
set of builtins for autoload from the installed module directory on first
use. A new cli parameter would inhibit initialisation from this script,
so that customised m4 interpreters could be built on the fly!
+ The module loader needs to differentiate between modules that are in
memory and modules that are loaded (i.e. visible) from various context
structures.
+ The perl module should only be built if a suitable perl interpreter
is found on the build machine. For that matter, it has been a
while since the perl module has even been built, and perl has had
new releases in the meantime.
Local Variables:
mode: outline
outline-regexp: " *[-+*.] \\| "
End:
Copyright (C) 2000, 2006, 2007, 2009, 2010 Free Software Foundation,
Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the ``GNU Free
Documentation License'' file as part of this distribution.

5100
bootstrap

File diff suppressed because it is too large Load Diff

View File

@ -1,160 +0,0 @@
# bootstrap.conf (GNU M4) version 2017-01-03
# Written by Gary V. Vaughan, 2010
# Copyright (C) 2010, 2013-2014, 2017 Free Software Foundation, Inc.
# This file is part of GNU M4.
#
# GNU M4 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GNU M4 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
## -------------- ##
## Configuration. ##
## -------------- ##
copyright_holder="Free Software Foundation, Inc."
# List of programs (and minimum versions) required to bootstrap, maintain
# and release Libtool.
buildreq='
help2man 1.29 http://www.gnu.org/s/help2man
makeinfo 4.13 http://www.gnu.org/s/texinfo
xz - http://tukaani.org/xz
'
# Instructions on how to install packages in $buildreq.
buildreq_readme=HACKING
# A file only visible in a vcs working directory.
checkout_only_file=HACKING
# Local gnulib submodule path.
gnulib_path=build-aux/gnulib
# Additional gnulib-tool options to use.
gnulib_tool_options=$gnulib_tool_options'
--libtool
'
# gnulib_modules must remain empty in order to get --update style
# gnulib-tool invocations, so we add the bootstrap components here.
gnulib_non_module_files=$gnulib_non_module_files"
build-aux/bootstrap.in
build-aux/extract-trace
build-aux/funclib.sh
build-aux/inline-source
build-aux/options-parser"
# List dependencies here too; we don't extract them, otherwise dependent
# modules could end up being imported to src/ *and* gnu/!
src_modules='
assure
getopt-gnu
getopt-posix
version-etc-fsf
version-etc
xstrtol
'
# What ignore files to maintain.
vc_ignore=".gitignore"
## --------------- ##
## Hook functions. ##
## --------------- ##
# m4_precopy_git_version_gen
# --------------------------
# Autopoint gets confused if git-version-gen is missing.
m4_precopy_git_version_gen ()
{
$debug_cmd
$require_build_aux
func_gnulib_tool_copy_file build-aux/git-version-gen $build_aux/git-version-gen
}
func_add_hook func_prep m4_precopy_git_version_gen
# m4_install_texinfo_diff_driver
# ------------------------------
# Help git to do a better job of merging texinfo files.
m4_install_texinfo_diff_driver ()
{
$debug_cmd
$require_git
test true = "$GIT" || {
if $GIT config diff.texinfo.funcname >/dev/null ; then
:
else
func_echo "initializing git texinfo diff driver"
git config diff.texinfo.funcname '^@node[ \t][ \t]*\\([^,][^,]*\\)'
fi
}
}
func_add_hook func_prep m4_install_texinfo_diff_driver
# m4_copy_src_modules
# -------------------
# Copy $src_modules from gnulib to src directory.
m4_copy_src_modules ()
{
$debug_cmd
$require_gnulib_tool
test true = "$gnulib_tool" || {
$require_macro_dir
for file in `$gnulib_tool --extract-filelist $src_modules | sort -u`
do
maybe_exit_cmd=:
func_basename $file
dest=$func_basename_result
case $file in
lib/*) dest=src/$dest ;;
m4/*) dest=$macro_dir/$dest ;;
*) func_error "$file: unknown file"
maybe_exit_cmd="exit $EXIT_FAILURE"
dest= ;;
esac
# Be sure to show all copying errors before bailing out
if test -n "$dest"; then
func_gnulib_tool_copy_file "$file" "$dest"
fi
done
$maybe_exit_cmd
}
}
func_add_hook func_gnulib_tool m4_copy_src_modules
# Local variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "# bootstrap.conf (GNU M4) version "
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "$"
# End:

File diff suppressed because it is too large Load Diff

View File

@ -1,420 +0,0 @@
#! /bin/sh
# Extract macro arguments from autotools input with GNU M4.
# Written by Gary V. Vaughan, 2010
#
# Copyright (C) 2010-2014, 2017 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# Make sure we've evaluated scripts we depend on.
test -z "$progpath" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/funclib.sh
test extract-trace = "$progname" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/options-parser
# Set a version string.
scriptversion=2014-01-04.01; # UTC
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Please report bugs or propose patches to gary@gnu.org.
## ------ ##
## Usage. ##
## ------ ##
# Run './extract-trace --help' for help with using this script from the
# command line.
#
# Or source first 'options-parser' and then this file into your own
# scripts in order to make use of the function and variable framework
# they define, and also to avoid the overhead of forking to run this
# script in its own process on every call.
## ----------------- ##
## Helper functions. ##
## ----------------- ##
# This section contains the helper functions used by the rest of
# 'extract-trace'.
# func_autoconf_configure MAYBE-CONFIGURE-FILE
# --------------------------------------------
# Ensure that MAYBE-CONFIGURE-FILE is the name of a file in the current
# directory that contains an uncommented call to AC_INIT.
func_autoconf_configure ()
{
$debug_cmd
_G_sed_no_comment='
s|#.*$||
s|^dnl .*$||
s| dnl .*$||'
_G_ac_init=
# If we were passed a genuine file, make sure it calls AC_INIT.
test -f "$1" \
&& _G_ac_init=`$SED "$_G_sed_no_comment" "$1" |$GREP AC_INIT`
# Otherwise it is not a genuine Autoconf input file.
test -n "$_G_ac_init"
_G_status=$?
test 0 -ne "$_G_status" \
&& func_verbose "'$1' not using Autoconf"
(exit $_G_status)
}
# func_find_tool ENVVAR NAMES...
# ------------------------------
# Search for a required program. Use the value of ENVVAR, if set,
# otherwise find the first of the NAMES that can be run (i.e.,
# supports --version). If found, set ENVVAR to the program name,
# die otherwise.
func_find_tool ()
{
$debug_cmd
_G_find_tool_envvar=$1
shift
_G_find_tool_names=$@
eval "_G_find_tool_res=\$$_G_find_tool_envvar"
if test -n "$_G_find_tool_res"; then
_G_find_tool_error_prefix="\$$find_tool_envvar: "
else
for _G_prog
do
if func_tool_version_output $_G_prog >/dev/null; then
_G_find_tool_res=$_G_prog
break
fi
done
fi
if test -n "$_G_find_tool_res"; then
func_tool_version_output >/dev/null $_G_find_tool_res "\
${_G_find_tool_error_prefix}Cannot run '$_G_find_tool_res --version'"
# Make sure the result is exported to the environment for children
# to use.
eval "$_G_find_tool_envvar=\$_G_find_tool_res"
eval "export $_G_find_tool_envvar"
else
func_error "\
One of these is required:
$_G_find_tool_names"
fi
}
# func_tool_version_output CMD [FATAL-ERROR-MSG]
# ----------------------------------------------
# Attempt to run 'CMD --version', discarding errors. The output can be
# ignored by redirecting stdout, and this function used simply to test
# whether the command exists and exits normally when passed a
# '--version' argument.
# When FATAL-ERROR-MSG is given, then this function will display the
# message and exit if running 'CMD --version' returns a non-zero exit
# status.
func_tool_version_output ()
{
$debug_cmd
_G_cmd=$1
_G_fatal_error_msg=$2
# Some tools, like 'git2cl' produce thousands of lines of output
# unless stdin is /dev/null - in that case we want to return
# successfully without saving all of that output. Other tools,
# such as 'help2man' exit with a non-zero status when stdin comes
# from /dev/null, so we re-execute without /dev/null if that
# happens. This means that occasionally, the output from both calls
# ends up in the result, but the alternative would be to discard the
# output from one call, and hope the other produces something useful.
{ $_G_cmd --version </dev/null || $_G_cmd --version; } 2>/dev/null
_G_status=$?
test 0 -ne "$_G_status" && test -n "$_G_fatal_error_msg" \
&& func_fatal_error "$_G_fatal_error_msg"
(exit $_G_status)
}
## -------------------- ##
## Resource management. ##
## -------------------- ##
# This section contains definitions for functions that each ensure a
# particular resource (a file, or a non-empty configuration variable for
# example) is available, and if appropriate to extract default values
# from pertinent package files. Where a variable already has a non-
# empty value (as set by the package's 'bootstrap.conf'), that value is
# used in preference to deriving the default. Call them using their
# associated 'require_*' variable to ensure that they are executed, at
# most, once.
#
# It's entirely deliberate that calling these functions can set
# variables that don't obey the namespace limitations obeyed by the rest
# of this file, in order that that they be as useful as possible to
# callers.
# require_configure_ac
# --------------------
# Ensure that there is a 'configure.ac' or 'configure.in' file in the
# current directory that contains an uncommented call to AC_INIT, and
# that '$configure_ac' contains its name.
require_configure_ac=func_require_configure_ac
func_require_configure_ac ()
{
$debug_cmd
test -z "$configure_ac" \
&& func_autoconf_configure configure.ac && configure_ac=configure.ac
test -z "$configure_ac" \
&& func_autoconf_configure configure.in && configure_ac=configure.in
test -z "$configure_ac" \
|| func_verbose "found '$configure_ac'"
require_configure_ac=:
}
# require_gnu_m4
# --------------
# Search for GNU M4, and export it in $M4.
require_gnu_m4=func_require_gnu_m4
func_require_gnu_m4 ()
{
$debug_cmd
test -n "$M4" || {
# Find the first m4 binary that responds to --version.
func_find_tool M4 gm4 gnum4 m4
}
test -n "$M4" || func_fatal_error "\
Please install GNU M4, or 'export M4=/path/to/gnu/m4'."
func_verbose "export M4='$M4'"
# Make sure the search result is visible to subshells
export M4
require_gnu_m4=:
}
## --------------- ##
## Core functions. ##
## --------------- ##
# This section contains the high level functions used when calling this
# file as a script. 'func_extract_trace' is probably the only one that you
# won't want to replace if you source this file into your own script.
# func_extract_trace MACRO_NAMES [FILENAME]...
# --------------------------------------------
# set '$func_extract_trace_result' to a colon delimited list of arguments
# to any of the comma separated list of MACRO_NAMES in FILENAME. If no
# FILENAME is given, then '$configure_ac' is assumed.
func_extract_trace ()
{
$debug_cmd
$require_configure_ac
$require_gnu_m4
_G_m4_traces=`$ECHO "--trace=$1" |$SED 's%,% --trace=%g'`
_G_re_macros=`$ECHO "($1)" |$SED 's%,%|%g'`
_G_macros="$1"; shift
test $# -gt 0 || {
set dummy $configure_ac
shift
}
# Generate an error if the first file is missing
<"$1"
# Sadly, we can't use 'autom4te' tracing to extract macro arguments,
# because it complains about things we want to ignore at bootstrap
# time - like missing m4_include files; AC_PREREQ being newer than
# the installed autoconf; and returns nothing when tracing
# 'AM_INIT_AUTOMAKE' when aclocal hasn't been generated yet.
#
# The following tries to emulate a less persnickety version of (and
# due to not having to wait for Perl startup on every invocation,
# it's probably faster too):
#
# autom4te --language=Autoconf --trace=$my_macro:\$% "$@"
#
# First we give a minimal set of macro declarations to M4 to prime
# it for reading Autoconf macros, while still providing some of the
# functionality generally used at m4-time to supply dynamic
# arguments to Autocof functions, but without following
# 'm4_s?include' files.
_G_mini='
# Initialisation.
m4_changequote([,])
m4_define([m4_copy], [m4_define([$2], m4_defn([$1]))])
m4_define([m4_rename], [m4_copy([$1], [$2])m4_undefine([$1])])
# Disable these macros.
m4_undefine([m4_dnl])
m4_undefine([m4_include])
m4_undefine([m4_m4exit])
m4_undefine([m4_m4wrap])
m4_undefine([m4_maketemp])
# Copy and rename macros not handled by "m4 --prefix".
m4_define([dnl], [m4_builtin([dnl])])
m4_copy([m4_define], [m4_defun])
m4_rename([m4_ifelse], [m4_if])
m4_ifdef([m4_mkstemp], [m4_undefine([m4_mkstemp])])
m4_rename([m4_patsubst], [m4_bpatsubst])
m4_rename([m4_regexp], [m4_bregexp])
# "m4sugar.mini" - useful m4-time macros for dynamic arguments.
# If we discover packages that need more m4 macros defined in
# order to bootstrap correctly, add them here:
m4_define([m4_bmatch],
[m4_if([$#], 0, [], [$#], 1, [], [$#], 2, [$2],
[m4_if(m4_bregexp([$1], [$2]), -1,
[$0([$1], m4_shift3($@))], [$3])])])
m4_define([m4_ifndef], [m4_ifdef([$1], [$3], [$2])])
m4_define([m4_ifset],
[m4_ifdef([$1], [m4_ifval(m4_defn([$1]), [$2], [$3])], [$3])])
m4_define([m4_require], [$1])
m4_define([m4_shift3], [m4_shift(m4shift(m4shift($@)))])
# "autoconf.mini" - things from autoconf macros we care about.
m4_copy([m4_defun], [AC_DEFUN])
# Dummy definitions for the macros we want to trace.
# AM_INIT_AUTOMAKE at least produces no trace without this.
'
_G_save=$IFS
IFS=,
for _G_macro in $_G_macros; do
IFS=$_G_save
func_append _G_mini "AC_DEFUN([$_G_macro])$nl"
done
IFS=$_G_save
# We discard M4's stdout, but the M4 trace output from reading our
# "autoconf.mini" followed by any other files passed to this
# function is then scanned by sed to transform it into a colon
# delimited argument list assigned to a shell variable.
_G_transform='s|#.*$||; s|^dnl .*$||; s| dnl .*$||;'
# Unfortunately, alternation in regexp addresses doesn't work in at
# least BSD (and hence Mac OS X) sed, so we have to append a capture
# and print block for each traced macro to the sed transform script.
_G_save=$IFS
IFS=,
for _G_macro in $_G_macros; do
IFS=$_G_save
func_append _G_transform '
/^m4trace: -1- '"$_G_macro"'/ {
s|^m4trace: -1- '"$_G_macro"'[([]*||
s|], [[]|:|g
s|[])]*$|:|
s|\(.\):$|\1|
p
}'
done
IFS=$_G_save
# Save the command pipeline results for further use by callers of
# this function.
func_extract_trace_result=`$ECHO "$_G_mini" \
|$M4 -daq --prefix $_G_m4_traces - "$@" 2>&1 1>/dev/null \
|$SED -n -e "$_G_transform"`
}
# func_extract_trace_first MACRO_NAMES [FILENAME]...
# --------------------------------------------------
# Exactly like func_extract_trace, except that only the first argument
# to the first invocation of one of the comma separated MACRO_NAMES is
# returned in '$func_extract_trace_first_result'.
func_extract_trace_first ()
{
$debug_cmd
func_extract_trace ${1+"$@"}
func_extract_trace_first_result=`$ECHO "$func_extract_trace_result" \
|$SED -e 's|:.*$||g' -e 1q`
}
# func_main [ARG]...
# ------------------
func_main ()
{
$debug_cmd
# Configuration.
usage='$progname MACRO_NAME FILE [...]'
long_help_message='
The first argument to this program is the name of an autotools macro
whose arguments you want to extract by examining the files listed in the
remaining arguments using the same tool that Autoconf and Automake use,
GNU M4.
The arguments are returned separated by colons, with each traced call
on a separate line.'
# Option processing.
func_options "$@"
eval set dummy "$func_options_result"; shift
# Validate remaining non-option arguments.
test $# -gt 1 \
|| func_fatal_help "not enough arguments"
# Pass non-option arguments to extraction function.
func_extract_trace "$@"
# Display results.
test -n "$func_extract_trace_result" \
&& $ECHO "$func_extract_trace_result"
# The End.
exit $EXIT_SUCCESS
}
## --------------------------- ##
## Actually perform the trace. ##
## --------------------------- ##
# Only call 'func_main' if this script was called directly.
test extract-trace = "$progname" && func_main "$@"
# Local variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-pattern: "20/scriptversion=%:y-%02m-%02d.%02H; # UTC"
# time-stamp-time-zone: "UTC"
# End:

File diff suppressed because it is too large Load Diff

View File

@ -1,164 +0,0 @@
#! /bin/sh
# Output the contents of a shell script with sourced files inlined.
# Written by Gary V. Vaughan, 2012
# Copyright (C) 2012-2014, 2017 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# Source required external libraries:
. `echo "$0" |${SED-sed} 's|[^/]*$||'`"funclib.sh"
. `echo "$0" |${SED-sed} 's|[^/]*$||'`"options-parser"
# Set a version string for *this* script.
scriptversion=2014-01-03.01; # UTC
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Please report bugs or propose patches to bug-libtool@gnu.org.
## ------ ##
## Usage. ##
## ------ ##
# Run 'build-aux/inline-source --help' for help with using this script
# from the command line.
# Recursively scan through a FILE passed on the command line, replacing
# either of the following:
# . "relative/file"
# . `echo "$0" |edit`"relative/file"
# with the contents of the referenced files.
## ---------------- ##
## Options parsing. ##
## ---------------- ##
usage='$progpath [OPTION]... FILE'
# Short help message in response to '-h'.
usage_message='Options:
--debug enable verbose shell tracing
--version print version information and exit
-h, --help print help message and exit
'
long_help_message="\
Report bugs to <bug-libtool@gnu.org>
General help using GNU software: <http://www.gnu.org/gethelp/>."
func_options ${1+"$@"}
eval set dummy "$func_options_result"; shift
## -------------------- ##
## Resource management. ##
## -------------------- ##
# require_AWK
# -----------
# Search for a "not hopeless" awk.
require_AWK=func_require_AWK
func_require_AWK ()
{
$debug_cmd
test -n "$AWK" || {
# Find the first executable in the list.
for _G_prog in gawk mawk nawk awk
do
require_AWK_IFS=$IFS
IFS=${PATH_SEPARATOR-:}
for _G_dir in $PATH
do
IFS=$require_AWK_IFS
if test -f "$_G_dir/$_G_prog" && test -x "$_G_dir/$_G_prog"
then
AWK=$_G_dir/$_G_prog
break 2
fi
done
IFS=$require_AWK_IFS
done
}
test -n "$AWK" || func_fatal_error "\
Please install GNU Awk, or 'export AWK=/path/to/gnu/awk'."
func_verbose "found '$AWK'."
require_AWK=:
}
## --------------- ##
## Core functions. ##
## --------------- ##
# func_include LINE
# -----------------
# Output the contents of file included by LINE.
func_include ()
{
$require_AWK
test -f "$1" \
|| func_fatal_error "file '$1' not found"
_G_scriptdir=`echo "$1" |$SED 's|[^/]*$||'`
test -n "$_G_scriptdir" || _G_scriptdir="./"
$AWK '
BEGIN { magic = '${_RECURSE_MAGIC-0}'; }
/^#!/ && magic == 0 {
print $0;
print "## DO NOT EDIT - This file generated from '$1'";
print "## by '$progname' v'$scriptversion'";
magic++;
next;
}
/^\. ['\''"].*['\''"]$/ {
file = substr ($2, 2, length ($2) -2);
system (sprintf ("env _RECURSE_MAGIC=%d '$progpath' %s", magic, file));
next;
}
/^\. `echo [^`]*`['\''"][^'\''"]*['\''"]$/ {
tail = substr ($0, match ($0, /`['\''"]/));
file = substr (tail, 3, length (tail) -3);
system (sprintf ("env _RECURSE_MAGIC=%d '$progpath' '"$_G_scriptdir"'%s", magic, file));
next;
}
{ print; }
' < "$1"
}
func_include "$1"
exit 0
# Local variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-pattern: "20/scriptversion=%:y-%02m-%02d.%02H; # UTC"
# time-stamp-time-zone: "UTC"
# End:

View File

@ -1,608 +0,0 @@
#! /bin/sh
# Set a version string for this script.
scriptversion=2014-01-07.03; # UTC
# A portable, pluggable option parser for Bourne shell.
# Written by Gary V. Vaughan, 2010
# Copyright (C) 2010-2014, 2017 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Please report bugs or propose patches to gary@gnu.org.
## ------ ##
## Usage. ##
## ------ ##
# This file is a library for parsing options in your shell scripts along
# with assorted other useful supporting features that you can make use
# of too.
#
# For the simplest scripts you might need only:
#
# #!/bin/sh
# . relative/path/to/funclib.sh
# . relative/path/to/options-parser
# scriptversion=1.0
# func_options ${1+"$@"}
# eval set dummy "$func_options_result"; shift
# ...rest of your script...
#
# In order for the '--version' option to work, you will need to have a
# suitably formatted comment like the one at the top of this file
# starting with '# Written by ' and ending with '# warranty; '.
#
# For '-h' and '--help' to work, you will also need a one line
# description of your script's purpose in a comment directly above the
# '# Written by ' line, like the one at the top of this file.
#
# The default options also support '--debug', which will turn on shell
# execution tracing (see the comment above debug_cmd below for another
# use), and '--verbose' and the func_verbose function to allow your script
# to display verbose messages only when your user has specified
# '--verbose'.
#
# After sourcing this file, you can plug processing for additional
# options by amending the variables from the 'Configuration' section
# below, and following the instructions in the 'Option parsing'
# section further down.
## -------------- ##
## Configuration. ##
## -------------- ##
# You should override these variables in your script after sourcing this
# file so that they reflect the customisations you have added to the
# option parser.
# The usage line for option parsing errors and the start of '-h' and
# '--help' output messages. You can embed shell variables for delayed
# expansion at the time the message is displayed, but you will need to
# quote other shell meta-characters carefully to prevent them being
# expanded when the contents are evaled.
usage='$progpath [OPTION]...'
# Short help message in response to '-h' and '--help'. Add to this or
# override it after sourcing this library to reflect the full set of
# options your script accepts.
usage_message="\
--debug enable verbose shell tracing
-W, --warnings=CATEGORY
report the warnings falling in CATEGORY [all]
-v, --verbose verbosely report processing
--version print version information and exit
-h, --help print short or long help message and exit
"
# Additional text appended to 'usage_message' in response to '--help'.
long_help_message="
Warning categories include:
'all' show all warnings
'none' turn off all the warnings
'error' warnings are treated as fatal errors"
# Help message printed before fatal option parsing errors.
fatal_help="Try '\$progname --help' for more information."
## ------------------------- ##
## Hook function management. ##
## ------------------------- ##
# This section contains functions for adding, removing, and running hooks
# to the main code. A hook is just a named list of of function, that can
# be run in order later on.
# func_hookable FUNC_NAME
# -----------------------
# Declare that FUNC_NAME will run hooks added with
# 'func_add_hook FUNC_NAME ...'.
func_hookable ()
{
$debug_cmd
func_append hookable_fns " $1"
}
# func_add_hook FUNC_NAME HOOK_FUNC
# ---------------------------------
# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
# first have been declared "hookable" by a call to 'func_hookable'.
func_add_hook ()
{
$debug_cmd
case " $hookable_fns " in
*" $1 "*) ;;
*) func_fatal_error "'$1' does not accept hook functions." ;;
esac
eval func_append ${1}_hooks '" $2"'
}
# func_remove_hook FUNC_NAME HOOK_FUNC
# ------------------------------------
# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
func_remove_hook ()
{
$debug_cmd
eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
}
# func_run_hooks FUNC_NAME [ARG]...
# ---------------------------------
# Run all hook functions registered to FUNC_NAME.
# It is assumed that the list of hook functions contains nothing more
# than a whitespace-delimited list of legal shell function names, and
# no effort is wasted trying to catch shell meta-characters or preserve
# whitespace.
func_run_hooks ()
{
$debug_cmd
case " $hookable_fns " in
*" $1 "*) ;;
*) func_fatal_error "'$1' does not support hook funcions.n" ;;
esac
eval _G_hook_fns=\$$1_hooks; shift
for _G_hook in $_G_hook_fns; do
eval $_G_hook '"$@"'
# store returned options list back into positional
# parameters for next 'cmd' execution.
eval _G_hook_result=\$${_G_hook}_result
eval set dummy "$_G_hook_result"; shift
done
func_quote_for_eval ${1+"$@"}
func_run_hooks_result=$func_quote_for_eval_result
}
## --------------- ##
## Option parsing. ##
## --------------- ##
# In order to add your own option parsing hooks, you must accept the
# full positional parameter list in your hook function, remove any
# options that you action, and then pass back the remaining unprocessed
# options in '<hooked_function_name>_result', escaped suitably for
# 'eval'. Like this:
#
# my_options_prep ()
# {
# $debug_cmd
#
# # Extend the existing usage message.
# usage_message=$usage_message'
# -s, --silent don'\''t print informational messages
# '
#
# func_quote_for_eval ${1+"$@"}
# my_options_prep_result=$func_quote_for_eval_result
# }
# func_add_hook func_options_prep my_options_prep
#
#
# my_silent_option ()
# {
# $debug_cmd
#
# # Note that for efficiency, we parse as many options as we can
# # recognise in a loop before passing the remainder back to the
# # caller on the first unrecognised argument we encounter.
# while test $# -gt 0; do
# opt=$1; shift
# case $opt in
# --silent|-s) opt_silent=: ;;
# # Separate non-argument short options:
# -s*) func_split_short_opt "$_G_opt"
# set dummy "$func_split_short_opt_name" \
# "-$func_split_short_opt_arg" ${1+"$@"}
# shift
# ;;
# *) set dummy "$_G_opt" "$*"; shift; break ;;
# esac
# done
#
# func_quote_for_eval ${1+"$@"}
# my_silent_option_result=$func_quote_for_eval_result
# }
# func_add_hook func_parse_options my_silent_option
#
#
# my_option_validation ()
# {
# $debug_cmd
#
# $opt_silent && $opt_verbose && func_fatal_help "\
# '--silent' and '--verbose' options are mutually exclusive."
#
# func_quote_for_eval ${1+"$@"}
# my_option_validation_result=$func_quote_for_eval_result
# }
# func_add_hook func_validate_options my_option_validation
#
# You'll alse need to manually amend $usage_message to reflect the extra
# options you parse. It's preferable to append if you can, so that
# multiple option parsing hooks can be added safely.
# func_options [ARG]...
# ---------------------
# All the functions called inside func_options are hookable. See the
# individual implementations for details.
func_hookable func_options
func_options ()
{
$debug_cmd
func_options_prep ${1+"$@"}
eval func_parse_options \
${func_options_prep_result+"$func_options_prep_result"}
eval func_validate_options \
${func_parse_options_result+"$func_parse_options_result"}
eval func_run_hooks func_options \
${func_validate_options_result+"$func_validate_options_result"}
# save modified positional parameters for caller
func_options_result=$func_run_hooks_result
}
# func_options_prep [ARG]...
# --------------------------
# All initialisations required before starting the option parse loop.
# Note that when calling hook functions, we pass through the list of
# positional parameters. If a hook function modifies that list, and
# needs to propogate that back to rest of this script, then the complete
# modified list must be put in 'func_run_hooks_result' before
# returning.
func_hookable func_options_prep
func_options_prep ()
{
$debug_cmd
# Option defaults:
opt_verbose=false
opt_warning_types=
func_run_hooks func_options_prep ${1+"$@"}
# save modified positional parameters for caller
func_options_prep_result=$func_run_hooks_result
}
# func_parse_options [ARG]...
# ---------------------------
# The main option parsing loop.
func_hookable func_parse_options
func_parse_options ()
{
$debug_cmd
func_parse_options_result=
# this just eases exit handling
while test $# -gt 0; do
# Defer to hook functions for initial option parsing, so they
# get priority in the event of reusing an option name.
func_run_hooks func_parse_options ${1+"$@"}
# Adjust func_parse_options positional parameters to match
eval set dummy "$func_run_hooks_result"; shift
# Break out of the loop if we already parsed every option.
test $# -gt 0 || break
_G_opt=$1
shift
case $_G_opt in
--debug|-x) debug_cmd='set -x'
func_echo "enabling shell trace mode"
$debug_cmd
;;
--no-warnings|--no-warning|--no-warn)
set dummy --warnings none ${1+"$@"}
shift
;;
--warnings|--warning|-W)
test $# = 0 && func_missing_arg $_G_opt && break
case " $warning_categories $1" in
*" $1 "*)
# trailing space prevents matching last $1 above
func_append_uniq opt_warning_types " $1"
;;
*all)
opt_warning_types=$warning_categories
;;
*none)
opt_warning_types=none
warning_func=:
;;
*error)
opt_warning_types=$warning_categories
warning_func=func_fatal_error
;;
*)
func_fatal_error \
"unsupported warning category: '$1'"
;;
esac
shift
;;
--verbose|-v) opt_verbose=: ;;
--version) func_version ;;
-\?|-h) func_usage ;;
--help) func_help ;;
# Separate optargs to long options (plugins may need this):
--*=*) func_split_equals "$_G_opt"
set dummy "$func_split_equals_lhs" \
"$func_split_equals_rhs" ${1+"$@"}
shift
;;
# Separate optargs to short options:
-W*)
func_split_short_opt "$_G_opt"
set dummy "$func_split_short_opt_name" \
"$func_split_short_opt_arg" ${1+"$@"}
shift
;;
# Separate non-argument short options:
-\?*|-h*|-v*|-x*)
func_split_short_opt "$_G_opt"
set dummy "$func_split_short_opt_name" \
"-$func_split_short_opt_arg" ${1+"$@"}
shift
;;
--) break ;;
-*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
*) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
esac
done
# save modified positional parameters for caller
func_quote_for_eval ${1+"$@"}
func_parse_options_result=$func_quote_for_eval_result
}
# func_validate_options [ARG]...
# ------------------------------
# Perform any sanity checks on option settings and/or unconsumed
# arguments.
func_hookable func_validate_options
func_validate_options ()
{
$debug_cmd
# Display all warnings if -W was not given.
test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
func_run_hooks func_validate_options ${1+"$@"}
# Bail if the options were screwed!
$exit_cmd $EXIT_FAILURE
# save modified positional parameters for caller
func_validate_options_result=$func_run_hooks_result
}
## ----------------- ##
## Helper functions. ##
## ----------------- ##
# This section contains the helper functions used by the rest of the
# hookable option parser framework in ascii-betical order.
# func_fatal_help ARG...
# ----------------------
# Echo program name prefixed message to standard error, followed by
# a help hint, and exit.
func_fatal_help ()
{
$debug_cmd
eval \$ECHO \""Usage: $usage"\"
eval \$ECHO \""$fatal_help"\"
func_error ${1+"$@"}
exit $EXIT_FAILURE
}
# func_help
# ---------
# Echo long help message to standard output and exit.
func_help ()
{
$debug_cmd
func_usage_message
$ECHO "$long_help_message"
exit 0
}
# func_missing_arg ARGNAME
# ------------------------
# Echo program name prefixed message to standard error and set global
# exit_cmd.
func_missing_arg ()
{
$debug_cmd
func_error "Missing argument for '$1'."
exit_cmd=exit
}
# func_split_equals STRING
# ------------------------
# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
# splitting STRING at the '=' sign.
test -z "$_G_HAVE_XSI_OPS" \
&& (eval 'x=a/b/c;
test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
&& _G_HAVE_XSI_OPS=yes
if test yes = "$_G_HAVE_XSI_OPS"
then
# This is an XSI compatible shell, allowing a faster implementation...
eval 'func_split_equals ()
{
$debug_cmd
func_split_equals_lhs=${1%%=*}
func_split_equals_rhs=${1#*=}
test "x$func_split_equals_lhs" = "x$1" \
&& func_split_equals_rhs=
}'
else
# ...otherwise fall back to using expr, which is often a shell builtin.
func_split_equals ()
{
$debug_cmd
func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
func_split_equals_rhs=
test "x$func_split_equals_lhs" = "x$1" \
|| func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
}
fi #func_split_equals
# func_split_short_opt SHORTOPT
# -----------------------------
# Set func_split_short_opt_name and func_split_short_opt_arg shell
# variables after splitting SHORTOPT after the 2nd character.
if test yes = "$_G_HAVE_XSI_OPS"
then
# This is an XSI compatible shell, allowing a faster implementation...
eval 'func_split_short_opt ()
{
$debug_cmd
func_split_short_opt_arg=${1#??}
func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
}'
else
# ...otherwise fall back to using expr, which is often a shell builtin.
func_split_short_opt ()
{
$debug_cmd
func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
}
fi #func_split_short_opt
# func_usage
# ----------
# Echo short help message to standard output and exit.
func_usage ()
{
$debug_cmd
func_usage_message
$ECHO "Run '$progname --help |${PAGER-more}' for full usage"
exit 0
}
# func_usage_message
# ------------------
# Echo short help message to standard output.
func_usage_message ()
{
$debug_cmd
eval \$ECHO \""Usage: $usage"\"
echo
$SED -n 's|^# ||
/^Written by/{
x;p;x
}
h
/^Written by/q' < "$progpath"
echo
eval \$ECHO \""$usage_message"\"
}
# func_version
# ------------
# Echo version message to standard output and exit.
func_version ()
{
$debug_cmd
printf '%s\n' "$progname $scriptversion"
$SED -n '
/(C)/!b go
:more
/\./!{
N
s|\n# | |
b more
}
:go
/^# Written by /,/# warranty; / {
s|^# ||
s|^# *$||
s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
p
}
/^# Written by / {
s|^# ||
p
}
/^warranty; /q' < "$progpath"
exit $?
}
# Local variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
# time-stamp-time-zone: "UTC"
# End:

View File

@ -1,14 +0,0 @@
diff --git i/lib/clean-temp.c w/lib/clean-temp.c
index 40ec02f..1053312 100644
--- i/lib/clean-temp.c
+++ w/lib/clean-temp.c
@@ -582,6 +582,9 @@ static bool
supports_delete_on_close ()
{
static int known; /* 1 = yes, -1 = no, 0 = unknown */
+ /* M4 wants to close and later reopen a temporary file, so
+ delete-on-close must not be used. */
+ known = -1;
if (!known)
{
OSVERSIONINFO v;

@ -1 +0,0 @@
Subproject commit 31bc499696c19bb64741e56c8cd13e1a2ead87c2

View File

@ -1,94 +0,0 @@
## -*- Autoconf -*-
## debug.m4 -- massage compiler flags for debugging/optimisation
##
## Copyright (C) 2000-2001, 2003, 2005-2007, 2010, 2013-2014, 2017 Free
## Software Foundation, Inc.
## Copyright (C) 1999-2000 Ralf S. Engelschall
## Written by <rse@engelschall.com>
## Modified for M4 by Gary V. Vaughan <gary@gnu.org>
##
## This file is part of GNU M4.
##
## GNU M4 is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## GNU M4 is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
# serial 9
# M4_CHECK_DEBUGGING
# ------------------
# Debugging Support
AC_DEFUN([M4_CHECK_DEBUGGING],
[AC_REQUIRE([AC_PROG_CC])
AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
[build for debugging [default=no]])])
AC_MSG_CHECKING([for compilation debug mode])
AC_MSG_RESULT([${enable_debug-no}])
: ${rm=rm -f}
: ${RM=rm -f}
set dummy $CC
compiler="${compiler-[$]2}"
test -n "$rm" || rm="rm -f"
if test "X$enable_debug" = Xyes; then
AC_DISABLE_SHARED
AC_DEFINE([DEBUG], [1],
[Define this to enable additional runtime debugging])
M4_default_preload="m4 traditional gnu load \
import modtest mpeval shadow stdlib time"
if test "$GCC" = yes; then
case "$CFLAGS" in
*-O* ) CFLAGS=`echo $CFLAGS | $SED 's/-O[[^ ]]* / /;s/-O[[^ ]]*$//'` ;;
esac
case "$CFLAGS" in
*-g* ) ;;
* ) AC_LIBTOOL_COMPILER_OPTION([if $compiler accepts -ggdb3],
[M4_cv_prog_compiler_ggdb3],
[-ggdb3 -c conftest.$ac_ext], [],
[CFLAGS="$CFLAGS -ggdb3"],
[CFLAGS="$CFLAGS -g"])
;;
esac
CFLAGS="$CFLAGS -Wall"
WMORE="-Wshadow -Wpointer-arith -Wcast-align -Wnested-externs"
WMORE="$WMORE -Wmissing-prototypes -Wmissing-declarations -Winline"
AC_LIBTOOL_COMPILER_OPTION([if $compiler accepts $WMORE],
[M4_cv_prog_compiler_warning_flags],
[$WMORE -c conftest.$ac_ext], [],
[CFLAGS="$CFLAGS $WMORE"])
AC_LIBTOOL_COMPILER_OPTION([if $compiler accepts -Wno-long-long],
[M4_cv_prog_compiler_wnolonglong],
[-Wno-long-long -c conftest.$ac_ext], [],
[CFLAGS="$CFLAGS -Wno-long-long"])
else
case "$CFLAGS" in
*-g* ) ;;
* ) CFLAGS="$CFLAGS -g" ;;
esac
fi
else
AC_ENABLE_SHARED
case "$CFLAGS" in
*-g* ) CFLAGS=`echo "$CFLAGS" |\
$SED -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'`
;;
esac
case "$CXXFLAGS" in
*-g* ) CXXFLAGS=`echo "$CXXFLAGS" |\
$SED -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'`
;;
esac
fi
])# M4_CHECK_DEBUGGING

View File

@ -1,77 +0,0 @@
## -*- Autoconf -*-
## Copyright (C) 2000-2001, 2003, 2006-2008, 2010, 2013-2014, 2017 Free
## Software Foundation, Inc.
##
## This file is part of GNU M4.
##
## GNU M4 is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## GNU M4 is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
# serial 10
m4_define([_M4_LIB_GMP],
[AC_ARG_WITH([gmp],
[AS_HELP_STRING([--without-gmp],
[don't use GNU multiple precision arithmetic library])],
[use_gmp=$withval], [use_gmp=yes])
case $use_gmp:$LIBADD_GMP:$ac_cv_header_gmp_h in
no:*)
M4_cv_using_lib_gmp=no
;;
*::yes)
AC_MSG_WARN([gmp library not found or does not appear to work
but `gmp.h' is present])
M4_cv_using_lib_gmp=no
;;
*:-lgmp:no)
AC_MSG_WARN([gmp works but `gmp.h' is missing])
M4_cv_using_lib_gmp=no
;;
yes:*:yes)
M4_cv_using_lib_gmp=yes
;;
*)
M4_cv_using_lib_gmp=no
AC_MSG_WARN([could not detect gmp library])
;;
esac
])# _M4_LIB_GMP
AC_DEFUN([M4_LIB_GMP],
[AC_PREREQ([2.56])dnl We use the new compiler based header checking in 2.56
AC_CHECK_HEADERS([gmp.h], [], [], [AC_INCLUDES_DEFAULT])
m4_pattern_allow([^M4_gmp_save_LIBS$])
# Some versions of gmp provide mpq_init as a macro, so we need to
# include the header file, otherwise the detection will fail.
M4_gmp_save_LIBS="$LIBS"
LIBS="$LIBS -lgmp"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_GMP_H
# include <gmp.h>
#endif]],
[[mpq_t n; mpq_init (n);]])],
[LIBADD_GMP=-lgmp])
LIBS=$M4_gmp_save_LIBS
AC_SUBST([LIBADD_GMP])
_M4_LIB_GMP
# Don't try to link in libgmp if we are not using it after the last call
if test "$M4_cv_using_lib_gmp" = yes; then
AC_DEFINE([USE_GMP], [1],
[Define to 1 if using the GNU multiple precision library.])
fi
AC_SUBST([USE_GMP], [$M4_cv_using_lib_gmp])
])# M4_LIB_GMP

View File

@ -1,120 +0,0 @@
# Copyright (C) 2002-2017 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
# contains a configuration script generated by Autoconf, under
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
#
# This file represents the specification of how gnulib-tool is used.
# It acts as a cache: It is written and read by gnulib-tool.
# In projects that use version control, this file is meant to be put under
# version control, like the configure.ac and various Makefile.am files.
# Specification in the form of a command-line invocation:
# gnulib-tool --import --local-dir=build-aux/gl --lib=libgnu --source-base=m4/gnu --m4-base=build-aux/m4 --doc-base=doc --tests-base=tests/gnu --aux-dir=build-aux --with-tests --with-c++-tests --no-conditional-dependencies --libtool --macro-prefix=M4 assert autobuild avltree-oset binary-io bitrotate clean-temp cloexec close-stream closein config-h configmake dirname error execute fclose fdl-1.3 fflush filenamecat flexmember fopen fopen-safer freadptr freadseek fseeko gendocs gettext git-version-gen gitlog-to-changelog gnumakefile gnupload gpl-3.0 intprops inttypes maintainer-makefile manywarnings memchr2 memcmp2 memmem mkstemp obstack obstack-printf-posix progname propername quote regex regexprops-generic rename setenv sigpipe snprintf-posix spawn-pipe sprintf-posix stdbool stdlib-safer strnlen strtod tempname unlocked-io unsetenv update-copyright vasnprintf-posix verify verror wait-process xalloc xalloc-die xmemdup0 xoset xprintf-posix xstrndup xvasprintf-posix
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([build-aux/gl])
gl_MODULES([
assert
autobuild
avltree-oset
binary-io
bitrotate
clean-temp
cloexec
close-stream
closein
config-h
configmake
dirname
error
execute
fclose
fdl-1.3
fflush
filenamecat
flexmember
fopen
fopen-safer
freadptr
freadseek
fseeko
gendocs
gettext
git-version-gen
gitlog-to-changelog
gnumakefile
gnupload
gpl-3.0
intprops
inttypes
maintainer-makefile
manywarnings
memchr2
memcmp2
memmem
mkstemp
obstack
obstack-printf-posix
progname
propername
quote
regex
regexprops-generic
rename
setenv
sigpipe
snprintf-posix
spawn-pipe
sprintf-posix
stdbool
stdlib-safer
strnlen
strtod
tempname
unlocked-io
unsetenv
update-copyright
vasnprintf-posix
verify
verror
wait-process
xalloc
xalloc-die
xmemdup0
xoset
xprintf-posix
xstrndup
xvasprintf-posix
])
gl_WITH_CXX_TESTS
gl_AVOID([])
gl_SOURCE_BASE([m4/gnu])
gl_M4_BASE([build-aux/m4])
gl_PO_BASE([])
gl_DOC_BASE([doc])
gl_TESTS_BASE([tests/gnu])
gl_WITH_TESTS
gl_LIB([libgnu])
gl_MAKEFILE_NAME([])
gl_LIBTOOL
gl_MACRO_PREFIX([M4])
gl_PO_DOMAIN([])
gl_WITNESS_C_MACRO([])

View File

@ -1,41 +0,0 @@
# -*- Autoconf -*-
# m4-error.m4 -- Use the installed version of error.h if available.
# Written by Gary V. Vaughan <gary@gnu.org>
#
# Copyright (C) 2003-2004, 2006-2007, 2010, 2013-2014, 2017 Free
# Software Foundation, Inc.
#
# This file is part of GNU M4.
#
# GNU M4 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GNU M4 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# serial 4
# M4_ERROR
# --------
# Use the installed version of error.h if available.
AC_DEFUN([M4_ERROR],
[AC_BEFORE([gl_ERROR], [M4_ERROR])
AC_CHECK_HEADERS([error.h],
[ERROR_H=""], [ERROR_H="error.h"], [AC_INCLUDES_DEFAULT])
AC_SUBST([ERROR_H])
if test $ac_cv_header_error_h = yes; then
INCLUDE_ERROR_H='#include <error.h>'
else
INCLUDE_ERROR_H='#include <gnu/error.h>'
fi
AC_SUBST([INCLUDE_ERROR_H])
])# M4_ERROR

View File

@ -1,35 +0,0 @@
# -*- Autoconf -*-
# m4-getopt.m4 -- Use the installed version of getopt.h if available.
# Written by Gary V. Vaughan <gary@gnu.org>
#
# Copyright (C) 2005-2007, 2009-2010, 2013-2014, 2017 Free Software
# Foundation, Inc.
#
# This file is part of GNU M4.
#
# GNU M4 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GNU M4 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# serial 3
# M4_GETOPT
# ---------
# Use the installed version of getopt.h if available.
AC_DEFUN([M4_GETOPT],
[
m4_divert_text([INIT_PREPARE], [M4_replace_getopt=])
m4_pushdef([AC_LIBOBJ], [M4_replace_getopt=:])
AC_REQUIRE([gl_FUNC_GETOPT_GNU])
m4_popdef([AC_LIBOBJ])
AM_CONDITIONAL([GETOPT], [test -n "$M4_replace_getopt"])
])# M4_GETOPT

View File

@ -1,35 +0,0 @@
# -*- Autoconf -*-
# m4-gettext.m4 -- Use the installed version of GNU gettext if available.
# Written by Gary V. Vaughan <gary@gnu.org>
#
# Copyright (C) 2003-2004, 2006-2007, 2010, 2013-2014, 2017 Free
# Software Foundation, Inc.
#
# This file is part of GNU M4.
#
# GNU M4 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GNU M4 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# serial 3
# M4_GNU_GETTEXT
# --------------
# Use the installed version of GNU gettext if available.
AC_DEFUN([M4_GNU_GETTEXT],
[AC_BEFORE([AM_GNU_GETTEXT], [M4_GNU_GETTEXT])
AC_CHECK_HEADERS([gettext.h],
[GETTEXT_H=""], [GETTEXT_H="gettext.h"], [AC_INCLUDES_DEFAULT])
AC_SUBST([GETTEXT_H])
AC_CONFIG_FILES([po/Makefile.in])
])# M4_GNU_GETTEXT

View File

@ -1,50 +0,0 @@
# -*- Autoconf -*-
# m4-obstack.m4 -- the libc supplied version of obstacks if available.
#
# Copyright (C) 2000-2001, 2003-2004, 2006-2007, 2010, 2013-2014, 2017
# Free Software Foundation, Inc.
# Written by Gary V. Vaughan <gary@gnu.org>
#
# This file is part of GNU M4.
#
# GNU M4 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GNU M4 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# serial 10
# M4_OBSTACK
# ----------
# Use the libc supplied version of obstacks if available.
AC_DEFUN([M4_OBSTACK],
[AC_PREREQ([2.56])dnl We use the compiler based header checking in 2.56
AC_BEFORE([gl_OBSTACK], [M4_OBSTACK])
AC_ARG_WITH([included-obstack],
[AS_HELP_STRING([--with-included-obstack],
[use the obstack implementation included here])])
AC_CHECK_HEADERS([obstack.h], [], [], [AC_INCLUDES_DEFAULT])
if test "x${with_included_obstack-no}" != xno; then
ac_cv_func_obstack=no
fi
OBSTACK_H=
if test $ac_cv_func_obstack = yes; then
INCLUDE_OBSTACK_H='#include <obstack.h>'
else
INCLUDE_OBSTACK_H='#include <gnu/obstack.h>'
OBSTACK_H=obstack.h
fi
AC_SUBST([OBSTACK_H])
AC_SUBST([INCLUDE_OBSTACK_H])
])# M4_FUNC_OBSTACK

View File

@ -1,39 +0,0 @@
# -*- Autoconf -*-
# m4-regex.m4 -- Use the installed regex if it is good enough.
# Written by Gary V. Vaughan <gary@gnu.org>
#
# Copyright (C) 2003-2004, 2006-2007, 2010, 2013-2014, 2017 Free
# Software Foundation, Inc.
#
# This file is part of GNU M4.
#
# GNU M4 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GNU M4 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# serial 4
# M4_REGEX([path/to/regex.c])
# ---------------------------
# Use the installed regex if it is good enough.
AC_DEFUN([M4_REGEX],
[AC_BEFORE([gl_REGEX], [M4_REGEX])
if test $ac_use_included_regex = no; then
INCLUDE_REGEX_H='#include <regex.h>'
REGEX_H=
else
INCLUDE_REGEX_H='#include <gnu/regex.h>'
REGEX_H=regex.h
fi
AC_SUBST([REGEX_H])
AC_SUBST([INCLUDE_REGEX_H])
])# M4_REGEX

View File

@ -1,46 +0,0 @@
# -*- Autoconf -*-
# m4-rename.m4 -- Test the abilities of rename.
# Written by Eric Blake <ebb9@byu.net>
#
# Copyright (C) 2008, 2010, 2013-2014, 2017 Free Software Foundation,
# Inc.
#
# This file is part of GNU M4.
#
# GNU M4 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GNU M4 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# serial 1
# M4_RENAME
# ---------
# Detect platforms like mingw where rename can't move open files.
AC_DEFUN([M4_RENAME],
[AC_CACHE_CHECK([whether an open file can be renamed],
[M4_cv_func_rename_open_file_works],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[FILE *f = fopen ("conftest.1", "w+");
int result = rename ("conftest.1", "conftest.2");
fclose (f); remove ("conftest.1"); remove ("conftest.2");
return result;])],
[M4_cv_func_rename_open_file_works=yes],
[M4_cv_func_rename_open_file_works=no],
[M4_cv_func_rename_open_file_works='guessing no'])])
if test "$M4_cv_func_rename_open_file_works" = yes ; then
M4_rename_open_works=1
else
M4_rename_open_works=0
fi
AC_DEFINE_UNQUOTED([RENAME_OPEN_FILE_WORKS], [$M4_rename_open_works],
[Define to 1 if a file can be renamed while open, or to 0 if not.])
])

View File

@ -1,60 +0,0 @@
# -*- Autoconf -*-
# m4-syscmd.m4 -- Allow choice of syscmd shell.
# Written by Eric Blake <ebb9@byu.net>
#
# Copyright (C) 2009-2010, 2013-2014, 2017 Free Software Foundation,
# Inc.
#
# This file is part of GNU M4.
#
# GNU M4 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GNU M4 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# serial 1
# M4_SYSCMD
# ---------
# Allow user to choose different shell than /bin/sh for e?syscmd.
AC_DEFUN([M4_SYSCMD],
[AC_MSG_CHECKING([[which shell to use for syscmd]])
AC_ARG_WITH([syscmd-shell],
[AS_HELP_STRING([--with-syscmd-shell], [shell used by syscmd [/bin/sh]])],
[case $withval in
yes[)] with_syscmd_shell=no;;
esac], [with_syscmd_shell=no])
if test "$with_syscmd_shell" = no ; then
with_syscmd_shell=/bin/sh
if test "$cross_compiling" != yes ; then
dnl Give mingw a default that is more likely to be available.
AS_IF([AS_EXECUTABLE_P([/bin/sh$EXEEXT])], [],
[if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi])
dnl Too bad _AS_PATH_WALK is not public.
M4_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for M4_dir in `if (command -p getconf PATH) 2>/dev/null ; then
command -p getconf PATH
else
echo "/bin$PATH_SEPARATOR$PATH"
fi`
do
IFS=$M4_save_IFS
test -z "$M4_dir" && continue
AS_EXECUTABLE_P(["$M4_dir/sh"]) \
&& { with_syscmd_shell=$M4_dir/sh; break; }
done
IFS=$M4_save_IFS
fi
fi
AC_MSG_RESULT([$with_syscmd_shell])
AC_DEFINE_UNQUOTED([M4_SYSCMD_SHELL], ["$with_syscmd_shell"],
[Shell used by syscmd and esyscmd, must accept -c argument.])
])

View File

@ -1,91 +0,0 @@
# -*- Autoconf -*-
# stackovf.m4 -- how do we deal with stack overflow?
#
# Copyright (C) 2000, 2003, 2006-2007, 2010, 2013-2014, 2017 Free
# Software Foundation, Inc.
#
# This file is part of GNU M4.
#
# GNU M4 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GNU M4 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# serial 7
# M4_SYS_STACKOVF
# ---------------
AC_DEFUN([M4_SYS_STACKOVF],
[AC_PREREQ([2.60])dnl We use the _ONCE variants
AC_REQUIRE([AC_TYPE_SIGNAL])dnl
AC_CHECK_HEADERS_ONCE([siginfo.h])
AC_CHECK_FUNCS_ONCE([sigaction sigaltstack sigstack sigvec])
AC_CHECK_MEMBERS([stack_t.ss_sp], [], [],
[[#include <signal.h>
#if HAVE_SIGINFO_H
# include <siginfo.h>
#endif
]])
# Code from Jim Avera <jima@netcom.com>.
# stackovf.c requires:
# 1. Either sigaction with SA_ONSTACK, or sigvec with SV_ONSTACK
# 2. Either sigaltstack or sigstack
# 3. getrlimit, including support for RLIMIT_STACK
AC_CACHE_CHECK([if stack overflow is detectable], [M4_cv_use_stackovf],
[M4_cv_use_stackovf=no
if test "$ac_cv_func_sigaction" = yes || test "$ac_cv_func_sigvec" = yes; then
if test "$ac_cv_func_sigaltstack" = yes || test "$ac_cv_func_sigstack" = yes; then
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>
#include <sys/resource.h>
#include <signal.h>
]], [[struct rlimit r; getrlimit (RLIMIT_STACK, &r);
#if (!defined HAVE_SIGACTION || !defined SA_ONSTACK) \
&& (!defined HAVE_SIGVEC || !defined SV_ONSTACK)
choke me /* SA_ONSTACK and/or SV_ONSTACK are not defined */
#endif
]])], [M4_cv_use_stackovf=yes])
fi
fi])
AM_CONDITIONAL([STACKOVF], [test "$M4_cv_use_stackovf" = yes])
if test "$M4_cv_use_stackovf" = yes; then
AC_DEFINE([USE_STACKOVF], [1],
[Define to 1 if using stack overflow detection.])
AC_CHECK_TYPES([rlim_t], [],
[AC_DEFINE([rlim_t], [int],
[Define to int if rlim_t is not defined in sys/resource.h])],
[[#include <sys/resource.h>
]])
AC_CHECK_TYPES([stack_t], [],
[AC_DEFINE([stack_t], [struct sigaltstack],
[Define to struct sigaltstack if stack_t is not in signal.h])],
[[#include <signal.h>
]])
AC_CHECK_TYPES([sigcontext], [], [], [[#include <signal.h>
]])
AC_CHECK_TYPES([siginfo_t], [], [], [[#include <signal.h>
#if HAVE_SIGINFO_H
# include <siginfo.h>
#endif
]])
AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], [], [],
[[#include <signal.h>
]])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>
]],
[[struct sigaltstack x; x.ss_base = 0;]])],
[AC_DEFINE([ss_sp], [ss_base],
[Define to ss_base if stack_t has ss_base instead of ss_sp.])])
fi
])# M4_SYS_STACKOVF

View File

@ -1,20 +0,0 @@
#!/usr/bin/perl -nl
# Use Perl's multi-byte alignment code, via sprintf, while
# performing a rudimentary check for duplicate names and
# removing duplicate name,email pairs.
use Encode;
BEGIN { my (%elide, %seen, %name) }
chomp;
my ($name, $email) = split '\0', decode ('UTF-8', $_);
if ($elide{"!$name"}) {
; # ignore this author
} elsif (index ($name, '!') == 0) {
$elide{$name}++;
} elsif ($seen{$name}++) {
warn "$0: NO-THANKS: duplicate name: $name\n";
} else {
print encode ('UTF-8', sprintf ('%-36s', $name)), $email;
}

63
cfg.mk
View File

@ -1,63 +0,0 @@
# Customize maint.mk. -*- makefile -*-
# Copyright (C) 2003-2011, 2013-2014, 2017 Free Software Foundation,
# Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# We intentionally hide the submodule in a subdirectory
gnulib_dir = $(srcdir)/build-aux/gnulib
# Used in maint.mk's web-manual rule
manual_title = GNU macro processor
# Always use shorthand copyrights.
update-copyright-env = \
UPDATE_COPYRIGHT_USE_INTERVALS=1 \
UPDATE_COPYRIGHT_MAX_LINE_LENGTH=72
# Tests not to run as part of "make syntax-check".
# M4 intentionally uses a coding style that compiles under C++.
# sc_proper_name_utf8_requires_ICONV doesn't work with non-recursive Makefile
# sc_po_check assumes a directory layout that we don't quite provide
local-checks-to-skip = sc_cast_of_x_alloc_return_value \
sc_proper_name_utf8_requires_ICONV \
sc_po_check \
sc_bindtextdomain
# PRAGMA_SYSTEM_HEADER includes #, which does not work through a
# Makefile variable, so we exempt it.
_makefile_at_at_check_exceptions = ' && !/PRAGMA_SYSTEM_HEADER/'
# Hash of NEWS contents, to ensure we don't add entries to wrong section.
old_NEWS_hash = 761ae30101b24be4aea2f564e9ceee75
# Indent only with spaces.
sc_prohibit_tab_based_indentation:
@re='^ * ' \
msg='TAB in indentation; use only spaces' \
$(_prohibit_regexp)
# List all syntax-check exemptions:
exclude_file_name_regexp--sc_cast_of_argument_to_free = ^m4/m4private.h$
exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
^Makefile.am$$
exclude_file_name_regexp--sc_prohibit_strncpy = ^m4/path.c$$
exclude_file_name_regexp--sc_prohibit_tab_based_indentation = \
(^(GNU)?Makefile(\.am)?|\.mk|^HACKING|^ChangeLog.*)$$
exclude_file_name_regexp--sc_require_config_h = \
^modules/(evalparse|format)\.c$$
exclude_file_name_regexp--sc_require_config_h_first = \
^modules/(evalparse|format)\.c$$
exclude_file_name_regexp--update_copyright = \
^(doc/m4\.texi|ltdl/m4/gnulib-cache.m4)$$

View File

@ -1,362 +0,0 @@
# Configure template for GNU m4. -*-Autoconf-*-
# Copyright (C) 1991-1994, 2000-2002, 2004-2014, 2017 Free Software
# Foundation, Inc.
#
# This file is part of GNU M4.
#
# GNU M4 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GNU M4 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
dnl We depend on autotest's ./testsuite -C.
AC_PREREQ([2.62])
## ------------------------ ##
## Autoconf initialization. ##
## ------------------------ ##
m4_define([M4_VERSION],
m4_esyscmd([build-aux/git-version-gen .tarball-version]))
m4_bmatch(m4_defn([M4_VERSION]), [^[0-9]], [],
[m4_define([M4_VERSION], [1.9a])])
AC_INIT([GNU M4], m4_defn([M4_VERSION]), [bug-m4@gnu.org])
AC_CONFIG_SRCDIR([src/m4.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([build-aux/m4])
AC_CONFIG_LIBOBJ_DIR([m4/gnu])
AC_CONFIG_TESTDIR([tests])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([tests/m4], [chmod +x tests/m4])
## -------------------------- ##
## M4 specific configuration. ##
## -------------------------- ##
dnl Autoconf recommends that packages use lowercase for their package-specific
dnl prefix for cache variables. But in the case of m4, that collides with
dnl the m4_ namespace provided by m4sugar, so we prefer M4_ as our
dnl package-specific prefix.
m4_pattern_forbid([^M4_[A-Z]])
AC_DEFUN([M4_DEFAULT_PRELOAD], [])
M4_default_preload="M4_DEFAULT_PRELOAD"
## ------------------------ ##
## Automake Initialization. ##
## ------------------------ ##
AM_INIT_AUTOMAKE([1.11.6 subdir-objects dist-bzip2 dist-xz
color-tests parallel-tests silent-rules]
m4_if(m4_index(m4_defn([M4_VERSION]), [-]), [-1], [gnits], [gnu]))
AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
## ------------------ ##
## C compiler checks. ##
## ------------------ ##
AC_PROG_CC
AC_DEFUN([gl_CXX_CHOICE_DEFAULT_NO])
M4_EARLY
# Maintainer note - comment this line out if you plan to rerun
# GNULIB_POSIXCHECK testing to see if M4 should be using more modules.
# Leave it uncommented for normal releases, for faster ./configure.
gl_ASSERT_NO_GNULIB_POSIXCHECK
AC_SYS_LARGEFILE
AC_PROG_CPP
AM_PROG_CC_C_O
M4_CHECK_DEBUGGING
## --------------------------- ##
## C compiler characteristics. ##
## --------------------------- ##
AC_TYPE_SIZE_T
AC_CHECK_SIZEOF([long long int])
AS_CASE([$host], [*-*-os2*], [OS2_LDFLAGS=-Zargs-resp])
AC_SUBST([OS2_LDFLAGS])
## ----------------------- ##
## Libtool initialization. ##
## ----------------------- ##
LT_PREREQ([2.2])
LT_INIT([shared dlopen win32-dll])
AC_ARG_ENABLE([gcc-warnings],
[AS_HELP_STRING([--enable-gcc-warnings],
[turn on lots of GCC warnings (for developers)])],
[case $enableval in
yes|no) ;;
*) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
esac
gl_gcc_warnings=$enableval],
[gl_gcc_warnings=no]
)
if test "$gl_gcc_warnings" = yes; then
gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
AC_SUBST([WERROR_CFLAGS])
# This, $nw, is the list of warnings we disable.
nw=
nw="$nw -Waggregate-return" # K&R is anachronistic
nw="$nw -Wtraditional-conversion" # K&R is anachronistic
nw="$nw -Wundef" # K&R is anachronistic
nw="$nw -Wlong-long" # C90 is anachronistic
nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
nw="$nw -Wpadded" # Our structs are not packed
nw="$nw -Wformat-nonliteral" # Needed in builtin.c
nw="$nw -Wconversion" # Too many warnings for now
nw="$nw -Wsign-conversion" # Too many warnings for now
nw="$nw -Wcast-qual" # Too many warnings for now
nw="$nw -Wswitch-enum" # Too many warnings for now
# gcc 4.4.6 complains enum-compare is C++ only; gcc 4.7.0 implies it in -Wall
nw="$nw -Wenum-compare"
# Gnulib uses '#pragma GCC diagnostic push' to silence some
# warnings, but older gcc doesn't support this.
AC_CACHE_CHECK([whether pragma GCC diagnostic push works],
[M4_cv_gcc_pragma_push_works], [
save_CFLAGS=$CFLAGS
CFLAGS='-Wunknown-pragmas -Werror'
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#pragma GCC diagnostic push
#pragma GCC diagnostic pop
]])],
[M4_cv_gcc_pragma_push_works=yes],
[M4_cv_gcc_pragma_push_works=no])
CFLAGS=$save_CFLAGS])
if test $M4_cv_gcc_pragma_push_works = no; then
nw="$nw -Wmissing-prototypes"
nw="$nw -Wmissing-declarations"
nw="$nw -Wunreachable-code"
fi
gl_MANYWARN_ALL_GCC([ws])
gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
for w in $ws; do
gl_WARN_ADD([$w])
done
gl_WARN_ADD([-fdiagnostics-show-option])
gl_WARN_ADD([-funit-at-a-time])
AC_SUBST([WARN_CFLAGS])
AH_VERBATIM([FORTIFY_SOURCE],
[/* Enable compile-time and run-time bounds-checking, and some warnings,
without upsetting newer glibc. */
#if defined __OPTIMIZE__ && __OPTIMIZE__
# define _FORTIFY_SOURCE 2
#endif
])
fi
# Use gcc's -pipe option if available: for faster compilation.
case "$CFLAGS" in
*-pipe* ) ;;
* ) _LT_COMPILER_OPTION([if $compiler supports -pipe],
[M4_cv_prog_compiler_pipe],
[-pipe -c conftest.$ac_ext], [],
[CFLAGS="$CFLAGS -pipe"])
;;
esac
## ------------------------------- ##
## Dynamic Loader Characteristics. ##
## ------------------------------- ##
LT_LIB_DLLOAD
LT_SYS_SYMBOL_USCORE
LT_SYS_MODULE_EXT
if test yes = "$sys_symbol_underscore"; then
libm4_shlibext=$libltdl_cv_shlibext
AC_MSG_CHECKING([whether dlsym requires underscore prefixed symbols])
AC_CACHE_VAL([libm4_cv_sys_dlsym_uscore], [dnl
libname=conftmod # stay within 8.3 filename limits!
cat >$libname.$ac_ext <<_M4_EOF
[#line $LINENO "configure"
#include "confdefs.h"
/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
int fnord () { return 42; }]
_M4_EOF
# fn_module_cmds module_cmds
# Execute tilde-delimited MODULE_CMDS with environment primed for
# ${module_cmds} or ${archive_cmds} type content.
fn_module_cmds ()
{( # subshell avoids polluting parent global environment
module_cmds_save_ifs=$IFS; IFS='~'
for cmd in $1; do
IFS=$module_cmds_save_ifs
libobjs=$libname.$ac_objext; lib=$libname$libm4_shlibext
rpath=/not-exists; soname=$libname$libm4_shlibext; output_objdir=.
major=; versuffix=; verstring=; deplibs=
ECHO=echo; wl=$lt_prog_compiler_wl; allow_undefined_flag=
eval $cmd
done
IFS=$module_cmds_save_ifs
)}
# Compile a loadable module using libtool macro expansion results.
$CC $pic_flag -c $libname.$ac_ext
fn_module_cmds "${module_cmds:-$archive_cmds}"
# Try to fetch fnord with dlsym().
libm4_dlunknown=0; libm4_dlnouscore=1; libm4_dluscore=2
cat >conftest.$ac_ext <<_M4_EOF
[#line $LINENO "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
#include <dlfcn.h>
#endif
#include <stdio.h>
#ifndef RTLD_GLOBAL
# ifdef DL_GLOBAL
# define RTLD_GLOBAL DL_GLOBAL
# else
# define RTLD_GLOBAL 0
# endif
#endif
#ifndef RTLD_NOW
# ifdef DL_NOW
# define RTLD_NOW DL_NOW
# else
# define RTLD_NOW 0
# endif
#endif
int main () {
void *handle = dlopen ("`pwd`/$libname$libm4_shlibext", RTLD_GLOBAL|RTLD_NOW);
int status = $libm4_dlunknown;
if (handle) {
if (dlsym (handle, "fnord"))
status = $libm4_dlnouscore;
else {
if (dlsym (handle, "_fnord"))
status = $libm4_dluscore;
else
puts (dlerror ());
}
dlclose (handle);
} else
puts (dlerror ());
return status;
}]
_M4_EOF
if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
libm4_status=$?
case x$libm4_status in
x$libm4_dlnouscore) libm4_cv_sys_dlsym_uscore=no ;;
x$libm4_dluscore) libm4_cv_sys_dlsym_uscore=yes ;;
x*) libm4_cv_sys_dlsym_uscore=unknown ;;
esac
fi
rm -rf conftest* $libname*
])
sys_dlsym_uscore=$libm4_cv_sys_dlsym_uscore
AC_MSG_RESULT($sys_dlsym_uscore)
if test yes = "$sys_dlsym_uscore"; then
AC_DEFINE([DLSYM_USCORE], [1],
[Define if dlsym() requires a leading underscore in symbol names.])
fi
fi
AC_DEFINE_UNQUOTED([PATH_SEPARATOR], ['$PATH_SEPARATOR'],
[Define this to system search path delimiter])
## ---------------- ##
## Gettext support. ##
## ---------------- ##
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_NEED([need-formatstring-macros])
AM_GNU_GETTEXT_VERSION([0.16])
M4_GNU_GETTEXT
## --------------- ##
## Gnulib support. ##
## --------------- ##
M4_INIT
gl_VERSION_ETC
# Gnulib doesn't always do things quite the way M4 would like...
M4_ERROR
M4_GETOPT
M4_OBSTACK
M4_REGEX
M4_RENAME
## ------------------------- ##
## C headers required by M4. ##
## ------------------------- ##
AC_CHECK_HEADERS_ONCE([limits.h])
if test $ac_cv_header_stdbool_h = yes; then
INCLUDE_STDBOOL_H='#include <stdbool.h>'
else
INCLUDE_STDBOOL_H='#include <gnu/stdbool.h>'
fi
AC_SUBST([INCLUDE_STDBOOL_H])
## --------------------------------- ##
## Library functions required by M4. ##
## --------------------------------- ##
AC_CHECK_FUNCS_ONCE([calloc strerror])
AM_WITH_DMALLOC
M4_SYS_STACKOVF
# This is for the modules
AC_STRUCT_TM
AC_FUNC_STRFTIME
AC_CHECK_FUNCS_ONCE([getcwd gethostname mktime uname])
## ------------------ ##
## Configure options. ##
## ------------------ ##
M4_LIB_GMP
AM_CONDITIONAL([USE_GMP], [test "x$USE_GMP" = xyes])
M4_SYSCMD
## -------- ##
## Outputs. ##
## -------- ##
AC_CONFIG_FILES([
Makefile
doc/Makefile
m4/gnu/Makefile
m4/system.h:m4/system_.h
tests/atlocal
tests/gnu/Makefile
])
AC_OUTPUT

View File

@ -1,38 +0,0 @@
## Makefile.am - template for generating Makefile via Automake
##
## Copyright (C) 2000-2001, 2003-2010, 2013-2014, 2017 Free Software
## Foundation, Inc.
##
## This file is part of GNU M4.
##
## GNU M4 is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## GNU M4 is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
## Written by Gary V. Vaughan <gary@gnu.org>
config_aux_dir = build-aux
info_TEXINFOS = m4.texi
m4_TEXINFOS = regexprops-generic.texi fdl-1.3.texi gpl-3.0.texi
dist_man_MANS = $(srcdir)/m4.1
EXTRA_DIST = gendocs_template
MAINTAINERCLEANFILES = gendocs_template
HELP2MAN = $(SHELL) $(top_srcdir)/$(config_aux_dir)/missing --run help2man
# Build the man page once in the srcdir, rather than in every VPATH build
# dir, to match how automake builds info pages. This is safe for 'make
# distcheck' since it is distributed pre-built.
$(srcdir)/m4.1: $(top_srcdir)/.version $(top_srcdir)/src/main.c
@echo "Updating the \`man' page \`$@'"; \
$(HELP2MAN) --name="macro processor" --source=FSF \
--info-page=m4 --output=$@ $(top_srcdir)/src/m4$(EXEEXT)

100
doc/STYLE
View File

@ -1,100 +0,0 @@
GNU m4 STYLE - The way this code should look. -*- outline -*-
Before all else this code follows the GNU coding standards and
indentation style described in standards.info. Additionally the
following restrictions on coding style apply:
* SPACING
+ Avoid TABs in .h and .c files. See HACKING for details.
* C STANDARD
+ All of this code is ANSI-C, GNU C extensions are conditional so that
the code will compile cleanly on non GLIBC/GCC systems.
* SYMBOL NAMES
+ All non-static symbols have a prefix either `M4' or `m4'.
+ All exported symbols which are part of the library api have the
prefix `m4_'.
+ Symbols which are exported from the library (for efficiency perhaps)
but are not part of the supported library api have the prefix
`m4__',
+ Function names should be verb phrases; m4_module_get_field.
+ Functions which exist to be used as callbacks from API functions, and
hence which likely have strange looking parameters are named with the
suffix `_CB', to make it obvious why they look a little odd.
+ Macros which implement fast versions of functions share the
same name as the function they replace, and may not evaluate
parameters more than once.
+ Otherwise macros are in uppercase, prefixed `M4' if they are visible
to the user after installation, to help the user know when to be
careful about multiple evaluations of parameters.
+ Function names should contain the name of the module they belong to,
usually immediately after the namespace prefix: m4_module_load.
+ Variables should not be exported (not true, but I'm working on it),
but accessor functions used instead. Note the `get'/`set' part of
the symbol name comes before the module part: m4_get_module_macros.
+ Structures come with accessor macros named <struct name>_<field
name> (in upper case), to make refactoring of nested structures much
easier: SYMBOL_FLAGS.
+ Structures are typedeffed separately, and the structure itself
generally not exported unless in the `m4__' namespace to support
fast accessor macros.
+ An opaque abstract data type (ADT) can have public and private fields:
By convention public fields will have exported accessor functions (and
maybe also fast macro versions of the same), and private fields will
not export accessors at all. However, there should be non-exported
(or at least in the `m4__' namespace) accessor functions for even the
private fields of an ADT to aid possible later refactoring.
* ARCHITECTURE
+ There are four groups of sources in subdirectories: `gnu' contains
the files maintained outside of m4, as a portability layer when building
the souce for non-glibc2 machines; `m4' contains the functionality for
libm4 and enables the user to write modules; `modules' implements the
builtin macros for the m4 binary; `src' is a small wrapper program
which links libm4 and loads initial modules to implement the m4 engine.
+ The headers in gnu need to be managed carefully: gnulib headers
can be included by other files in the same directory using `#include
"file.h"', and from files in other directories with `#include
<m4/file.h>'. The include path to invocations of the compiler from
various Makefile.am are set to prevent the possibility of picking up
an m4/file.h when the system file.h (e.g stdbool.h) is present. This,
in turn means the replacement headers can live in gnulib/m4 without
suffering a renaming scheme at configure time. Don't break with the
`#include' convention, or the compile will go wrong in hard to debug
ways on some platforms.
+ Low coupling. Classes (and in C, by this I mean files of functions)
should not rely on a web of other classes to be useful, they should
communicate with as few other classes as possible.
+ High cohesion. The api and caller boundaries should be well defined
and adhered to; a class should do one thing only.
========================================================================
Copyright (C) 2003, 2006, 2010, 2013-2014, 2017 Free Software
Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the ``GNU Free
Documentation License'' file as part of this distribution.

View File

@ -1,8 +0,0 @@
The files in this directory provide example uses of GNU M4.
The following copyright notice applies to each of these
description files.
Copyright (C) 2006, 2010, 2013-2014, 2017 Free Software Foundation, Inc.
This file is free software; the Free Software Foundation
gives unlimited permission to copy and/or distribute it,
with or without modifications, as long as this notice is preserved.

View File

@ -1,8 +0,0 @@
The files in this directory provide example uses of GNU M4.
The following copyright notice applies to each of these
description files.
Copyright (C) 2006, 2010, 2013-2014, 2017 Free Software Foundation, Inc.
This file is free software; the Free Software Foundation
gives unlimited permission to copy and/or distribute it,
with or without modifications, as long as this notice is preserved.

View File

@ -1,45 +0,0 @@
M4 = ./m4/src/m4
M4OPTS = -Im4lib
VPATH = .:m4lib
HTM = _footer.htm _header.htm bugs.htm changelog.htm download.htm \
features.htm feedback.htm index.htm lists.htm modules.htm \
news.htm readme.htm thanks.htm thissite.htm todo.htm uses.htm \
visions.htm whatis.htm
M4LIB = m4lib/bugs.m4 m4lib/changelog.m4 m4lib/download.m4 \
m4lib/features.m4 m4lib/feedback.m4 m4lib/html.m4 \
m4lib/index.m4 m4lib/layout.m4 m4lib/lists.m4 m4lib/menu.m4 \
m4lib/modules.m4 m4lib/news.m4 m4lib/readme.m4 \
m4lib/setup.m4 m4lib/test.m4 m4lib/thanks.m4 \
m4lib/thissite.m4 m4lib/tmpl.m4 m4lib/todo.m4 m4lib/uses.m4 \
m4lib/visions.m4 m4lib/whatis.m4
all: ./m4 $(HTM)
./m4:
ln -s ../.. m4
%.htm: %.m4
@$(M4) $(M4OPTS) $< >new.htm && \
if cmp new.htm $@ >/dev/null 2>&1; then \
rm new.htm; \
echo "$@ has not changed"; \
else \
echo "$@ updated"; \
mv new.htm $@; \
fi
.FORCE:
$(HTM): .FORCE $(M4LIB)
changelog.htm: m4/ChangeLog
readme.htm: m4/README
todo.htm: m4/TODO
news.htm: m4/NEWS
modules.htm: m4/modules/README
.PHONY: man
man:
cd man; $(MAKE)

View File

@ -1,10 +0,0 @@
</TD>
</TR>
</TABLE>
</BODY>
</HTML>

View File

@ -1,231 +0,0 @@
<!DOCTYPE html public "-//w3c//dtd html 4.0 transitional//en">
<HTML>
<HEAD>
<TITLE>GNU m4 - Development site</TITLE>
<META NAME="AUTHOR" CONTENT="René Seindal">
<META NAME="GENERATOR" CONTENT="GNU m4 __m4_version__">
</HEAD>
<BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
<TABLE cellpadding=5 width="100%">
<TR align=left valign=bottom>
<TD align=center valign=middle colspan="3" width="100%" bgcolor="#FF9900">
<H1>GNU m4</H1>
<H2>Discussion Forum</H2>
</TD>
</TR>
<TR >
<TD align=left valign=top width="15%" bgcolor="#FF9900">
<TABLE >
<TR>
<TD bgcolor="#CC6600">
<P>
<B>General info</B>
</P>
</TD>
</TR>
<TR>
<TD>
<P>
<FONT size=-1><B><A HREF="/rene/gnu/whatis.htm">What is m4</A><BR>
<A HREF="/rene/gnu/features.htm">Features</A><BR>
<A HREF="/rene/gnu/uses.htm">Uses of m4</A></B></FONT>
</P>
</TD>
</TR>
<TR>
<TD height=5>
</TD>
</TR>
<TR>
<TD bgcolor="#CC6600">
<P>
<B>Documentation</B>
</P>
</TD>
</TR>
<TR>
<TD>
<P>
<FONT size=-1><B><A HREF="/rene/gnu/man/m4_toc.html">Manual</A></B></FONT>
</P>
</TD>
</TR>
<TR>
<TD height=5>
</TD>
</TR>
<TR>
<TD bgcolor="#CC6600">
<P>
<B>Source files</B>
</P>
</TD>
</TR>
<TR>
<TD>
<P>
<FONT size=-1><B><A HREF="/rene/gnu/readme.htm">README</A><BR>
<A HREF="/rene/gnu/todo.htm">TODO</A><BR>
<A HREF="/rene/gnu/news.htm">NEWS</A><BR>
<A HREF="/rene/gnu/changelog.htm">ChangeLog</A><BR>
<A HREF="/rene/gnu/thanks.htm">Contributors</A><BR>
<A HREF="/rene/gnu/m4/">Browse it</A></B></FONT>
</P>
</TD>
</TR>
<TR>
<TD height=5>
</TD>
</TR>
<TR>
<TD bgcolor="#CC6600">
<P>
<B>The Future</B>
</P>
</TD>
</TR>
<TR>
<TD>
<P>
<FONT size=-1><B><A HREF="/rene/gnu/modules.htm">Modules</A><BR>
<A HREF="/rene/gnu/visions.htm">Visions</A></B></FONT>
</P>
</TD>
</TR>
<TR>
<TD height=5>
</TD>
</TR>
<TR>
<TD bgcolor="#CC6600">
<P>
<B>Feedback</B>
</P>
</TD>
</TR>
<TR>
<TD>
<P>
<FONT size=-1><B><A HREF="/rene/gnu/lists.htm">Mailing-lists</A><BR>
<A HREF="/rene/gnu/feedback.htm">Feedback</A><BR>
</P>
</TD>
</TR>
<TR>
<TD height=5>
</TD>
</TR>
<TR>
<TD bgcolor="#CC6600">
<P>
<B>Development</B>
</P>
</TD>
</TR>
<TR>
<TD>
<P>
<FONT size=-1><B><A HREF="/rene/gnu/download.htm">Download</A><BR>
<A HREF="/rene/gnu/bugs.htm">Known bugs</A></B></FONT>
</P>
</TD>
</TR>
<TR>
<TD height=5>
</TD>
</TR>
<TR>
<TD bgcolor="#CC6600">
<P>
<B>Examples</B>
</P>
</TD>
</TR>
<TR>
<TD>
<P>
<FONT size=-1><B><A HREF="/rene/gnu/thissite.htm">This site</A></B></FONT>
</P>
</TD>
</TR>
</TABLE>
</TD>
<TD align=left valign=top width="90%">

View File

@ -1,8 +0,0 @@
The files in this directory provide example uses of GNU M4.
The following copyright notice applies to each of these
description files.
Copyright (C) 2006, 2010, 2013-2014, 2017 Free Software Foundation, Inc.
This file is free software; the Free Software Foundation
gives unlimited permission to copy and/or distribute it,
with or without modifications, as long as this notice is preserved.

View File

@ -1,53 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([Known bugs in GNU m4 \__m4_version__])
\divert(1)
\h2([Known bugs in GNU m4])
\define([fixed], [\p([Fixed in version 1.4$1])])
\define([notme], [\p([A <A
HREF="mailto:m4-feedback@seindal.dk?subject=GNU m4: \defn([_item])"
>volunteer</A> is badly needed for this, as I have no way of testing
this myself.])])
\ul([
\item([undivert], [undivert(0) might read from standard output],
[\p([If calling \tt(undivert(0)) when diverting to a non-zero diversion
will cause m4 to read from standard output in an attempt to bring back
diversion 0, which is not possible.])
\fixed(n)
])
\item([sigaltstack], [failure if sigaltstack or sigstack returns ENOSYS],
[\p([If stack overflow detection is configured but the system doesn't
support sigaltstack(2) or sigstack(2), m4 fails when the system call
returns ENOSYS. It should silently revert to default behaviour.])
\notme
])
])
\p([See also the \link(todo.htm, TODO) file.])
\print_items
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)
\item([], [],
[\p([])
])
\undivert

View File

@ -1,18 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([ChangeLog])
\divert(1)
<PRE>\dnl
\changesyntax([A<>])\dnl
\changequote(,)\dnl
\include(m4/ChangeLog)
\changequote([,])\dnl
\changesyntax([O<>])\dnl
</PRE>
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)

View File

@ -1,24 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([Download])
\divert(1)
\p([In the download area there are usually several version
present. Please take only the latest.])
\p([The files are name \tt(m4-1.4\i(X).tar.gz) where X is a letter.])
\p([\link([ftp://ftp.seindal.dk/pub/rene/gnu/], [Download latest
development version]).])
\p([\link([ftp://ftp.seindal.dk/pub/rene/gnu/m4-1.4.tar.gz],[Download
latest stable version]).])
\p([\link([ftp://ftp.seindal.dk/pub/rene/gnu/djgpp/],[Download
DOS/Windows port of latest stable version]).])
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)

View File

@ -1,58 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([New feaures since version 1.4])
\divert(1)
\p(Please look at the \link(news.htm, NEWS) and the \link(changelog.htm,
ChangeLog) for all the gory details.)
\dl(
\dt(\b(GNU m4 uses GNU Automake and GNU Autoconf for configuration.))
\dd(\p(This has been long overdue, and now hit is done thanks to Erick
Branderhorst.))
\dt(\b(GNU m4 uses GNU gettext for internationalisation.))
\dd(\p(GNU m4 now speaks several languages. Translations for
german, french, italian, japanese, dutch, polish, romenian and swedish
have been made.))
\dt(\b(Support for multiple precision arithmetic in eval.))
\dd(\p(If appropriately configured, GNU m4 can now do multiple precision
arithmetic in the built in macro 'eval'. If not configured, GNU m4
will use the largest integer available for its calculations.))
\dt(\b(An input syntax table to change how input is parsed.))
\dd(\p(A new build in macro 'changesyntax' allows finer control over how input
characters are parsed into input tokens.&nbsp; It is now possible to have
several one character quote strings or comment delimiters, to change the
format of macro calls, to use active characters like in TeX, and probably
most useful, to change what input characters are treated as letters when
looking for macro calls.)
\p(See the \link(man/m4_7.html#SEC41, manual section) for more details.))
\dt(\b(Support for loadable modules.))
\dd(\p(GNU m4 now has support for dynamic loading of compiled modules at
runtime. A module can define any number of new built in macros, which
will be indistinguishable from the standard set of built in
macros. Modules can also override existing built in macros.)
)
\dt(\b(Better control of sync-lines generation.))
\dd(\p(The new built in macro 'syncoutput' allows better control of the
generation of sync-lines. They can now be turned on or off at
will.))
)
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)

View File

@ -1,20 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([Feedback])
\divert(1)
\p(Bug reports should be sent to \link(mailto:bug-m4@gnu.org,
bug-m4@gnu.org).)
\p(Generel discussion about GNU m4 should take place on
\link(mailto:m4-forum@seindal.dk, m4-forum).)
\p(Informal comments about this site and GNU m4 can be sent to
\link(mailto:m4-feedback@seindal.dk, m4-feedback).)
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)

View File

@ -1,122 +0,0 @@
\define([n], [
])
\define([concat], [\ifelse($#, 0, ,
$#, 1, [$1],
[$1 \concat(\shift($@))])])
\define([toupper], [\translit([$*], [a-z], [A-Z])])
\define([container],
[\pushdef([_tag], \toupper([$1]))\dnl
\ifelse($#, 1, [<\_tag></[\_tag]>],
$#, 2, [<\_tag>$2</\_tag>],
$#, 3, [<\_tag $2>$3</\_tag>],
[<\_tag $2>\concat(\shift(\shift($@)))</\_tag>])\dnl
\popdef([_tag])\dnl
])
\define([large_container],
[\pushdef([_tag], \toupper([$1]))\dnl
\ifelse($#, 1, [<\_tag></\_tag>\n],
$#, 2, [<\_tag>\n[]$2\n</\_tag>\n],
$#, 3, [<\_tag $2>\n[]$3\n</\_tag>\n],
[<\_tag $2>\n\concat(\shift(\shift($@)))\n</\_tag>\n])\dnl
\popdef([_tag])\dnl
])
\define([large_simple_container],
[\pushdef([_tag], \toupper([$1]))\dnl
<\_tag>\n\concat(\shift($@))\n</\_tag>\n\dnl
\popdef([_tag])\dnl
])
\define([simple_container],
[\pushdef([_tag], \toupper([$1]))\dnl
<\_tag>\concat(\shift($@))</\_tag>\dnl
\popdef([_tag])\dnl
])
\define([simple_tag],
[\pushdef([_tag], \toupper([$1]))\dnl
\ifelse([$2], [], [<\_tag>], [<\_tag $2>])\dnl
\popdef([_tag])\dnl
])
\define([doctype], [\simple_tag([!DOCTYPE], $@)])
\define([html], [\large_simple_container([$0], $@)])
\define([head], [\large_simple_container([$0], $@)])
\define([title], [\simple_container([$0], $@)])
\define([meta], [\n<META NAME="[$1]" CONTENT="[$2]">])
\define([http_equiv], [\n<META HTTP-EQUIV="[$1]" CONTENT="[$2]">])
\define([body], [\large_container([$0], $@)])
\define([center], [\large_simple_container([$0], $@)])
\define([right], [\large_simple_container([$0], $@)])
\define([left], [\large_simple_container([$0], $@)])
\define([div], [\large_container([$0], $@)])
\define([b], [\simple_container([$0], $@)])
\define([i], [\simple_container([$0], $@)])
\define([tt], [\simple_container([$0], $@)])
\define([table], [\large_container([$0], $@)])
\define([tr], [\large_container([$0], $@)])
\define([td], [\large_container([$0], $@)])
\define([th], [\large_container([$0], $@)])
\define([link], [<A HREF="$1">\shift($*)</A>])
\define([target], [<A NAME="$1">\shift($*)</A>])
\define([font], [\n\container([$0], $@)\n])
\define([h1], [\n\container([$0], $@)\n])
\define([h2], [\n\container([$0], $@)\n])
\define([h3], [\n\container([$0], $@)\n])
\define([h4], [\n\container([$0], $@)\n])
\define([h5], [\n\container([$0], $@)\n])
\define([h6], [\n\container([$0], $@)\n])
\define([p], [\large_simple_container([$0], $@)])
\define([hr], [\simple_tag([$0], $@)])
\define([ul], [\large_container([$0], $@)])
\define([ol], [\large_container([$0], $@)])
\define([li], [\simple_tag([$0], $@)])
\define([blockquote], [\large_simple_container([$0], $@)])
\define([dl], [\large_simple_container([$0], $@)])
\define([dt], [\simple_container([$0], $@)])
\define([dd], [\large_simple_container([$0], $@)])
\define([br], [\simple_tag([$0], $@)])
\define([hline], [\simple_tag([$0], $@)])
\define([pre], [\simple_container([$0], $@)])
\define([set_title], [\define([_TITLE], [$*])])
\set_title(_TITLE)
\define([set_author], [\define([_AUTHOR], [$*])])
\set_author()
\define([set_generator], [\define([_GENERATOR], [$*])])
\set_generator([GNU m4 \__m4_version__])
\define([set_keywords], [\define([_KEYWORDS], [$*])])
\set_keywords()
\define([set_body], [\define([_BODY], [$*])])
\set_body()
\define([meta_if_set],
[\ifelse(\defn([_$1]), [], [], \meta([$1], \defn([_$1])))]\dnl
)

View File

@ -1,36 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([Development site])
\divert(1)
\h2([Current development version is \__m4_version__.])
\p([Development versions contain new features and experiments that might
or might not make it into the next official release. The current
development version contains among other things (browse the
\link([features.htm], [new features]) for more detail):])
\ul([
\li Uses GNU Automake and GNU Autoconf for configuration.
\li Uses GNU gettext for internationalisation.
\li Support for multiple precision arithmetic in eval.
\li An input syntax table to change how input is parsed.
\li Support for loadable modules.
\li Better control of sync-lines generation.
\li Various bug-fixes.
])
\p([A new release is expected ready for Spring 2000.])
\p([GNU \tt(m4) 1.4 is from october 1994 and can be considered stable.])
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)

View File

@ -1,65 +0,0 @@
\divert(-1);
The semicolons are just to get GNU Emacs C mode to indent properly.
\define([C_TEXT], [text="#000000"]);
\define([C_LINK], [link="#0000EF"]);
\define([C_ALINK], [vlink="#51188E"]);
\define([C_VLINK], [alink="#FF0000"]);
\define([C_BG1], [bgcolor="#FFCC99"]);
\define([C_BG2], [bgcolor="#FF9900"]);
\define([C_BG3], [bgcolor="#CC6600"]);
\define([DO_HEADER],
[\head([\title([GNU m4 - \defn([_TITLE])])],
[\meta_if_set([AUTHOR])],
[\meta_if_set([GENERATOR])],
[\meta_if_set([KEYWORDS])],
)]);
\define([DO_BODY],
[\body([\C_TEXT \C_BG1 \C_LINK \C_VLINK \C_ALINK],
[\table([cellpadding=5 width="100%"],
[\tr([align=left valign=bottom],
[\td([align=center valign=middle colspan="3" width="100%" \C_BG2],
[\h1([GNU m4])],
[\h2(\defn([_TITLE]))],
)],
)],
[\tr([],
[\td([align=left valign=top width="15%" \C_BG2],
[\include([menu.m4])],
)],
[\td([align=left valign=top width="90%"],
[$*],
)],
)],
)],
)]
);
\define([DO_LAYOUT],
[\doctype([html public "-//w3c//dtd html 4.0 transitional//en"])
\html([\DO_HEADER], [\DO_BODY([$*])])]
);
\define([<], [&lt;]);
\define([>], [&gt;]);
\define([showlink], [\link($1, $1)]);
\define([mailto], [\link(mailto:$1, $1)]);
<!-- These macros are for having first a simple toc and later a more
thorough description of each item -->
\define([print_items], [\undivert(2)])
\define([item], [\li \link([[#]$1], [$2.])
\pushdef([_div], \divnum)\dnl
\divert(2)\dnl
\hr([align=center width="50%"])\dnl
\h2([\target([$1], [$2])])\dnl
$3\dnl
\divert(\_div)\dnl
\popdef([_div])\dnl
])

View File

@ -1,32 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([Mailing lists])
\define([me], \link([mailto:rene@seindal.dk], [rene@seindal.dk]))
\divert(1)
\h3(There are two mailing lists for GNU m4)
\dl(
\dt(\b(\link(mailto:m4-forum@seindal.dk, m4-forum@seindal.dk)))
\dd(\p(This list is intended for discussions between people interested
and/or participating in the further development of m4.))
\dt(\b(m4-announce@seindal.dk))
\dd(\p(Announcements regarding GNU m4 will posted here.)
\p(The volume will certainly be very low.))
)
\p(Currently these lists are maintained manually. Send a message to \me
saying whether you want to subscribe or unsubscribe to any of these
lists.)
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)

View File

@ -1,74 +0,0 @@
\pushdef([header], [\tr([\td([\C_BG3], [\p([\b([$1])])])])])
\pushdef([separator], [\tr([\td([height=5], [])])])
\pushdef([_row], [\link([$1], [$2])])
\pushdef([_rows],
[\ifelse($#, 0, [],
$#, 1, [],
$#, 2, [\_row([$1], [$2])],
$#, 3, [\_row([$1], [$2])],
[\_row([$1], [$2])\br\n\_rows(\shift(\shift($@)))])])
\pushdef([rows], [\tr([\td([\p([\font([size=-1], [\b([\_rows($@)])])])])])])
\table([],
[\header([General info])],
[\rows(
[whatis.htm], [What is m4],
[features.htm], [Features],
[uses.htm], [Uses of m4],
)],
[\separator],
[\header([Documentation])],
[\rows(
[man/m4_toc.html], [Manual],
)],
[\separator],
[\header([Source files])],
[\rows(
[readme.htm], [README],
[todo.htm], [TODO],
[news.htm], [NEWS],
[changelog.htm], [ChangeLog],
[thanks.htm], [Contributors],
[m4/], [Browse it],
)],
[\separator],
[\header([The Future])],
[\rows(
[modules.htm], [Modules],
[visions.htm], [Visions],
)],
[\separator],
[\header([Feedback])],
[\rows(
[lists.htm], [Mailing-lists],
[feedback.htm], [Feedback],
[/forum/list.php3?num=2], [Discussion Forum],
)],
[\separator],
[\header([Development])],
[\rows(
[download.htm], [Download],
[bugs.htm], [Known bugs],
)],
[\separator],
[\header([Examples])],
[\rows(
[thissite.htm], [This site],
)],
)
\popdef([header])
\popdef([rows])
\popdef([_rows])
\popdef([_row])
\popdef([separator])

View File

@ -1,18 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([Modules])
\divert(1)
<PRE>\dnl
\changesyntax([A<>])\dnl
\changequote(,)\dnl
\include(m4/modules/README)
\changequote([,])\dnl
\changesyntax([O<>])\dnl
</PRE>
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)

View File

@ -1,18 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([NEWS - History of user-visible changes])
\divert(1)
<PRE>\dnl
\changesyntax([A<>])\dnl
\changequote(,)\dnl
\include(m4/NEWS)
\changequote([,])\dnl
\changesyntax([O<>])\dnl
</PRE>
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)

View File

@ -1,18 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([README])
\divert(1)
<PRE>\dnl
\changesyntax([A<>])\dnl
\changequote(,)\dnl
\include(m4/README)
\changequote([,])\dnl
\changesyntax([O<>])\dnl
</PRE>
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)

View File

@ -1,7 +0,0 @@
divert(-1)
changequote([,])
changecom([<!--], [-->])
changesyntax([@\])
\include([html.m4])
\include([layout.m4])

View File

@ -1,29 +0,0 @@
include(`setup.m4')
\divert(1)
\define([_ideas], [])
\define([register_idea],
[\define([H_$1], [$2])\dnl
\define([T_$1], [$3])\dnl
\define([_ideas], [\print_idea([$1])]\defn([_ideas]))])
\define([print_idea], [
\target([$1], [\h2([\indir([H_$1])])])
\indir([T_$1])
])
\define([print_ideas], [\indir([_ideas])])
\define([idea], [\li \p([\link([[#]$1], [$2.])])\register_idea([$1], [$2], [$3])])
\idea([guile], [Guile as an extension language], [gfhjdsfsarhgew])
\idea([pquote], [Persistent quotes],[asdffhfdghgdsfh])
\idea([deps], [Dependencies generation],[afsdffasdf])
\print_ideas
\undivert(1)
\defn([_ideas])

View File

@ -1,18 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([People who have contributed to m4])
\divert(1)
<PRE>\dnl
\changesyntax([A<>])\dnl
\changequote(,)\dnl
\include(m4/THANKS)
\changequote([,])\dnl
\changesyntax([O<>])\dnl
</PRE>
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)

View File

@ -1,42 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([This site])
\divert(1)
\p([This GNU m4 site is maintained by René Seindal,
(\mailto(rene@seindal.dk)).])
\p([All files are generated using GNU m4 \__m4_version__. You can view
the \link(m4lib/, source files). They are very simple. They use some
features from GNU m4 1.4l])
\p([The basic M4 definitions of quotes, comments, escapes are in
\showlink(m4lib/setup.m4). This is first included by all files to
configure the enviroment correctly for the other files. To avoid have
macros called by accident, an escape character is defined with
changesyntax. \i(This is a new feature in m4 1.4l).])
\p([Some fairly general macros to generate various HTML construct are
found in \showlink(m4lib/html.m4). There are macros for simple tags,
containers with and without attributes, links and a few utility macros.])
\p([The visual aspects of the pages are in \showlink(m4lib/layout.m4).
The macros herein generate the complete HTML structure for the pages.
There are macros for making the header and the body of the document.])
\p([The definition of the left hand menu is in \showlink(m4lib/menu.m4).
I convinced GNU Emacs to do the indentation by switching to c-mode.])
\p([The page body is passed to the layout definitions as an argument. As
the text can be large, it is first diverted and the text passed to the
layout macros is simply a call to undivert. That way a very large text
can be passed around with very little cost. This page is made with
\link(m4lib/thissite.m4, these definitions).])
\p([There is a single file for each HTML file.])
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)

View File

@ -1,11 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([])
\divert(1)
\h2([])
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)

View File

@ -1,18 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([TODO - Things still to be done])
\divert(1)
<PRE>\dnl
\changesyntax([A<>])\dnl
\changequote(,)\dnl
\include(m4/TODO)
\changequote([,])\dnl
\changesyntax([O<>])\dnl
</PRE>
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)

View File

@ -1,43 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([Current uses of m4])
\divert(1)
\p(The MTA sendmail uses \tt(m4) for generating configuration files.)
\p(\link(http://www.gnu.org/software/autoconf/autoconf.html, GNU
Autoconf) uses \tt(m4) to generate "configure" scripts, that are used
for configuring \link(http://www.gnu.org/, GNU) software for a
particular platform.)
\p(Htm4l is a set of macros for generating HTML. Html4 is written by
Terry Jones (terry@cliffs.ucsd.edu). See
\showlink(http://cliffs.ucsd.edu/terry/htm4l/htm4l/main.html) for
details. )
\p(Various programs uses m4 to preprocess configuration files, for
example the X11 window manager fvwm.)
\p(There is an \link(http://www.ssc.com/lg/issue22/using_m4.html,
article in the Linux Gazette) about writing HTML with GNU m4 written by
\link(mailto:bhepple@bit.net.au, Bob Hepple) . More recent versions
are kept at \link(http://www.bit.net.au/~bhepple, Bob's home site).
The macros are used to maintain a large commercial site at
\showlink(http://www.finder.com.au).)
\p(Other examples of GNU m4 generated HTML pages, written by
\link(mailto:max@alcyone.com, Erik Max Francis) can be found at the sites
\showlink(http://www.alcyone.com/max/),
\showlink(http://www.catcam.com/),
\showlink(http://www.crank.net/) and
\showlink(http://www.pollywannacracka.com/).
)
\p(\link(thissite.htm, These files are created with GNU m4 \__m4_version__).)
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)

View File

@ -1,232 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([The Road Ahead])
\define([originator],
[\p([Idea contributed by [$1]]\ifelse($#, 2, [ (\mailto([$2]))])[.])])
\define([noone], [\p([There is no-one working on this now. Do you want
to <A HREF="mailto:m4-feedback@seindal.dk?subject=GNU m4: \defn([_item])" >volunteer</A>?])])
\define([done], [\p([Done in version 1.4$1])])
\divert(1)
\h2([Ideas for future versions of GNU m4])
\p([Here are some ideas and suggestion for the future of GNU m4, large
and small. The order here is fairly random.])
\ul([
\item([guile], [Guile as an extension language],
[\p([\link([http://www.red-bean.com/guile/], [Guile]) can be used as an
extension language so complicated macros can be written in Scheme while
still maintaining the m4 interface. It will require some changes to the
base code, as guile cannot be used from a module.])
\noone <!-- \originator([René Seindal], [rene@seindal]) -->
])
\item([utf8], [UTF-8 or wide characters],
[\p([GNU m4 should be able to handle UTF-8 input or wide characters so
it can be more usable for different environments.])
\noone <!-- \originator([François Pinard]) -->
])
\item([pquote], [Syntax: persistent quotes],
[\p([Persistent quotes is a way of getting text unharmed through m4's
processing. While normal quotes are stripped when a quoted string is
read, the persistent quotes are removed just before being output. This
will ensure that the quoted text is always output verbatim.])
\p([The bulk of the changes will be in the parser (in input.c function
next_token). Persistent quotes cannot be nested, they must balance
within a normally quoted string, but normal quotes need not balance
within persistent quotes (neither within persistent quotes within normal
quotes). The quotes should be removed before being shipped out (in
macro.c).])
\noone <!-- \originator([Keith Bostic]) -->
])
\item([comment2], [Syntax: removable comments],
[\p([With the syntax table a category for discardable comments can be
defined, causing that type of comments to be discarded.])
\noone
])
\item([comment1], [Option: remove comments],
[\p([There should be an option (--discard-comments) to get m4 to discard
comments instead of passing them to the output.])
\done(n)
])
\item([deps], [Option: show dependencies],
[\p([There should be an options to generate makefile dependencies for an
M4 input file.])
\p([It is not enough to scan the files for includes, as file names can
be generated and builtins renamed. To make it work, m4 will have to do
a complete run of the input file, discard the output and print the
dependencies instead.])
\p([It cannot be made to work in all cases when input file names are
generated on the fly.])
\noone <!-- \originator([Erick Branderhorst]) -->
])
\item([safer], [Option: render GNU m4 safer],
[\p([There should be a --safer option that disables all functions, that
could compromise system security if used by root. It will have to
include various functions, such as file inclusion, sub shells, module
loading, ...])
\noone <!-- \originator([Santiago Vila]) -->
])
\item([import], [Option: import environment],
[\p([An option to defined each environment variable as a macro on
startup would be useful in many cases.])
\done(n) <!-- \originator([René Seindal]) -->
])
\item([m4expand], [Builtin: quote expanded text],
[\p([A builtin to quote expanded text would be useful. Now it is not
possible to quote the expansion of a macro; the macro itself has to
provide the quotes. Some builtins return quoted strings, others
don't.])
\p([A possible solution is a build in macro that takes one argument. It
expands this argument fully and returns the quoted expansion.])
\p([It will require changes to input handling and macro expansion code.])
\noone <!-- \originator([Axel Boldt]) -->
])
\item([perl], [Module: embedded perl],
[\p([Perl could be embedded in m4, giving users a powerful programming
language for writing macros. A single builtin "perleval" could do the
job. First argument could be a perl function and the rest arguments.
The return value of the function as a string would be the expansion.])
\p([The perl interpreter should be set up when the module is loaded and
closed down before m4 exits, using the appropriate hooks in the module
interface.])
\p([A perl module could potentially give users access to any facility
perl has access to, such as databases.])
\p([On systems with perl compiled as a shared library the size penalty
would be minimal.])
\p([(It might not be workable as a module, as it will need to link with non-shared libraries. Don't know how it can be fixed. (RS))])
\noone <!-- \originator([René Seindal]) -->
])
\item([output], [Module: better output control],
[\p([It has been suggested a couple of times that it should be possible
to divert to named files, in order to create several output files.])
\p([I think this a bit a misunderstanding. Diversion are inteded to be
brought back later, ie, they are temporary and recoverable. Output
text, on the other hand, once output it is lost (for m4). Therefore
better output control should be made in a different way.])
\p([My suggestion is a set of builtins defined by a module:])
\pre([setoutput(file)
appendoutput(file)
pipeoutput(command)])
\p([With these output can be directed better, diversion can be sent to
different files, and groups of files can be built by a single m4 run.
Calling \tt(setoutput) without arguments should resume output to
standard output.])
\p([(Admittedly, diversion 0 (standard output) has always been
different, as it cannot be undiverted.)])
\noone <!-- \originator([René Seindal]) -->
])
\item([require], [Module: require/provide functionality],
[\p([Two new builtins \tt(require) and \tt(provide) could provide a
handy interface to include. It has proven difficult to write these
robustly as normal macros. As an example, the files \tt(test.m4) and
\tt(../test.m4) could be the same file or different files depending on
the search path.])
\noone <!-- \originator([Terry Jones]) -->
])
])
\p([See also the \link(todo.htm, TODO) file.])
\print_items
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)
\divert(3)saljdfnaskdjfndsa\divert(-1)
\item([], [],
[\p([])
\noone
])
\undivert

View File

@ -1,48 +0,0 @@
include(`setup.m4')
\set_author([René Seindal])
\set_title([What is GNU m4])
\divert(1)
\p([GNU \tt(m4) is an implementation of the traditional Unix macro
processor. GNU m4 is mostly compatible with the System V, Release 3
version, and SVR4, although it has some extensions (for example,
handling more than 9 positional parameters to macros). GNU \tt(m4)
also has built-in functions for including files, running shell
commands, doing arithmetic, etc.])
\p([GNU \tt(m4) is a macro processor, in the sense that it copies its
input to the output, expanding macros as it goes. Macros are either
builtin or user-defined, and can take any number of arguments. Besides
just doing macro expansion, m4 has builtin functions for including named
files, running UNIX commands, doing integer arithmetic, manipulating
text in various ways, recursion, etc... m4 can be used either as a
front-end to a compiler, or as a macro processor in its own right.])
\p([The m4 macro processor is widely available on all UNIXes. Usually,
only a small percentage of users are aware of its existence. However,
those who do often become commited users. The growing popularity of GNU
Autoconf, which prerequires GNU m4 for generating the `configure'
scripts, is an incentive for many to install it, while these people will
not themselves program in m4.])
\p([Some people found m4 to be fairly addictive. They first use m4 for
simple problems, then take bigger and bigger challenges, learning how to
write complex m4 sets of macros along the way. Once really addicted,
users pursue writing of sophisticated m4 applications even to solve
simple problems, devoting more time debugging their m4 scripts than
doing real work. Beware that m4 may be dangerous for the health of
compulsive programmers.])
\p([Autoconf needs GNU m4 for generating `configure' scripts, but not for
running them.])
\p([GNU m4 is a Unix program. It is designed to work in a Unix-like
environment. GNU m4 1.4 has, however, been ported to DJGPP, the GNU C
compiler for DOS/Windows. These files are present in the
\link(download.htm, download area).])
\divert(0)\dnl
\DO_LAYOUT([\undivert(1)])
\divert(-1)

View File

@ -1,12 +0,0 @@
divert(`-1')
# upcase(text)
# downcase(text)
# capitalize(text)
# change case of text, simple version
define(`upcase', `translit(`$*', `a-z', `A-Z')')
define(`downcase', `translit(`$*', `A-Z', `a-z')')
define(`_capitalize',
`regexp(`$1', `^\(\w\)\(\w*\)',
`upcase(`\1')`'downcase(`\2')')')
define(`capitalize', `patsubst(`$1', `\w+', `_$0(`\&')')')
divert`'dnl

View File

@ -1,19 +0,0 @@
divert(`-1')
# upcase(text)
# downcase(text)
# capitalize(text)
# change case of text, improved version
define(`upcase', `translit(`$*', `a-z', `A-Z')')
define(`downcase', `translit(`$*', `A-Z', `a-z')')
define(`_arg1', `$1')
define(`_to_alt', `changequote(`<<[', `]>>')')
define(`_from_alt', `changequote(<<[`]>>, <<[']>>)')
define(`_upcase_alt', `translit(<<[$*]>>, <<[a-z]>>, <<[A-Z]>>)')
define(`_downcase_alt', `translit(<<[$*]>>, <<[A-Z]>>, <<[a-z]>>)')
define(`_capitalize_alt',
`regexp(<<[$1]>>, <<[^\(\w\)\(\w*\)]>>,
<<[_upcase_alt(<<[<<[\1]>>]>>)_downcase_alt(<<[<<[\2]>>]>>)]>>)')
define(`capitalize',
`_arg1(_to_alt()patsubst(<<[<<[$*]>>]>>, <<[\w+]>>,
_from_alt()`]>>_$0_alt(<<[\&]>>)<<['_to_alt())_from_alt())')
divert`'dnl

View File

@ -1,7 +0,0 @@
# An ordinary comment
define(`foo', # A comment in a macro
`Macro `foo' expansion')
foo
define(`comment', `*** Macro `comment' expansion ***')
changecom(`@', `@')
foo

View File

@ -1,7 +0,0 @@
divert(`-1')
# curry(macro, args)
# Expand to a macro call that takes one argument, then invoke
# macro(args, extra).
define(`curry', `$1(shift($@,)_$0')
define(`_curry', ``$1')')
divert`'dnl

View File

@ -1,4 +0,0 @@
divert(1)Text diverted a first time.
divert(0)undivert(1)dnl
divert(1)Text diverted a second time.
divert(0)undivert(1)dnl

View File

@ -1,4 +0,0 @@
define(`countdown', `$1 ifelse(eval($1 > 0), 1, `countdown(decr($1))', `Liftoff')')
debugmode(`aeqc')
traceon(`countdown')
countdown(2)

View File

@ -1,6 +0,0 @@
# Cannot use real hostname program because test would fail
define(`hostname', esyscmd(`echo www.gnu.org'))dnl
`hostname = >>'hostname`<<'
define(`hostname',
pushdef(`_tmp', `$1')_tmp(translit(esyscmd(`echo www.gnu.org'), `.', `,'))`'popdef(`_tmp'))dnl
`hostname = >>'hostname`<<'

View File

@ -1,3 +0,0 @@
define(`countdown', `$1
ifelse(eval($1 > 0), 1, `countdown(decr($1))', `Done')')dnl
countdown(7)

View File

@ -1,8 +0,0 @@
divert(`-1')
# foreach(x, (item_1, item_2, ..., item_n), stmt)
# parenthesized list, simple version
define(`foreach', `pushdef(`$1')_foreach($@)popdef(`$1')')
define(`_arg1', `$1')
define(`_foreach', `ifelse(`$2', `()', `',
`define(`$1', _arg1$2)$3`'$0(`$1', (shift$2), `$3')')')
divert`'dnl

View File

@ -1,10 +0,0 @@
include(`quote.m4')dnl
divert(`-1')
# foreach(x, (item_1, item_2, ..., item_n), stmt)
# parenthesized list, improved version
define(`foreach', `pushdef(`$1')_$0(`$1',
(dquote(dquote_elt$2)), `$3')popdef(`$1')')
define(`_arg1', `$1')
define(`_foreach', `ifelse(`$2', `(`')', `',
`define(`$1', _arg1$2)$3`'$0(`$1', (dquote(shift$2)), `$3')')')
divert`'dnl

View File

@ -1,9 +0,0 @@
include(`quote.m4')dnl
divert(`-1')
# foreachq(x, `item_1, item_2, ..., item_n', stmt)
# quoted list, simple version
define(`foreachq', `pushdef(`$1')_foreachq($@)popdef(`$1')')
define(`_arg1', `$1')
define(`_foreachq', `ifelse(quote($2), `', `',
`define(`$1', `_arg1($2)')$3`'$0(`$1', `shift($2)', `$3')')')
divert`'dnl

View File

@ -1,10 +0,0 @@
include(`quote.m4')dnl
divert(`-1')
# foreachq(x, `item_1, item_2, ..., item_n', stmt)
# quoted list, improved version
define(`foreachq', `pushdef(`$1')_$0($@)popdef(`$1')')
define(`_arg1q', ``$1'')
define(`_rest', `ifelse(`$#', `1', `', `dquote(shift($@))')')
define(`_foreachq', `ifelse(`$2', `', `',
`define(`$1', _arg1q($2))$3`'$0(`$1', _rest($2), `$3')')')
divert`'dnl

View File

@ -1,9 +0,0 @@
divert(`-1')
# foreachq(x, `item_1, item_2, ..., item_n', stmt)
# quoted list, alternate improved version
define(`foreachq', `ifelse(`$2', `', `',
`pushdef(`$1')_$0(`$1', `$3', `', $2)popdef(`$1')')')
define(`_foreachq', `ifelse(`$#', `3', `',
`define(`$1', `$4')$2`'$0(`$1', `$2',
shift(shift(shift($@))))')')
divert`'dnl

View File

@ -1,13 +0,0 @@
include(`forloop2.m4')dnl
divert(`-1')
# foreachq(x, `item_1, item_2, ..., item_n', stmt)
# quoted list, version based on forloop
define(`foreachq',
`ifelse(`$2', `', `', `_$0(`$1', `$3', $2)')')
define(`_foreachq',
`pushdef(`$1', forloop(`$1', `3', `$#',
`$0_(`1', `2', indir(`$1'))')`popdef(
`$1')')indir(`$1', $@)')
define(`_foreachq_',
``define(`$$1', `$$3')$$2`''')
divert`'dnl

View File

@ -1,6 +0,0 @@
divert(`-1')
# forloop(var, from, to, stmt) - simple version
define(`forloop', `pushdef(`$1', `$2')_forloop($@)popdef(`$1')')
define(`_forloop',
`$4`'ifelse($1, `$3', `', `define(`$1', incr($1))$0($@)')')
divert`'dnl

View File

@ -1,12 +0,0 @@
divert(`-1')
# forloop(var, from, to, stmt) - improved version:
# works even if VAR is not a strict macro name
# performs sanity check that FROM is larger than TO
# allows complex numerical expressions in TO and FROM
define(`forloop', `ifelse(eval(`($2) <= ($3)'), `1',
`pushdef(`$1')_$0(`$1', eval(`$2'),
eval(`$3'), `$4')popdef(`$1')')')
define(`_forloop',
`define(`$1', `$2')$4`'ifelse(`$2', `$3', `',
`$0(`$1', incr(`$2'), `$3', `$4')')')
divert`'dnl

View File

@ -1,13 +0,0 @@
divert(`-1')
# forloop_arg(from, to, macro) - invoke MACRO(value) for
# each value between FROM and TO, without define overhead
define(`forloop_arg', `ifelse(eval(`($1) <= ($2)'), `1',
`_forloop(`$1', eval(`$2'), `$3(', `)')')')
# forloop(var, from, to, stmt) - refactored to share code
define(`forloop', `ifelse(eval(`($2) <= ($3)'), `1',
`pushdef(`$1')_forloop(eval(`$2'), eval(`$3'),
`define(`$1',', `)$4')popdef(`$1')')')
define(`_forloop',
`$3`$1'$4`'ifelse(`$1', `$2', `',
`$0(incr(`$1'), `$2', `$3', `$4')')')
divert`'dnl

View File

@ -1,6 +0,0 @@
define(`concat', `translit(``$*'', ` ')')
define(`fsent', `format(`%-25s %-16s nfs %-16s 0 0', `$1:$2', `$3', concat$4)')
fsent(freja, /home/gevn, /home/gevn, (rw, soft, bg, grpid))
fsent(freja, /home/freja, /home/freja, (rw, soft, grpid))
fsent(rimfaxe, /home/rimfaxe, /home/rimfaxe, (rw, soft, bg))

View File

@ -1,17 +0,0 @@
divert(-1)
# move(from, to)
define(`move', `Move one disk from `$1' to `$2'.
')
# _hanoi (cnt, from, to, aux)
define(`_hanoi', `ifelse(eval(`$1'<=1), 1, `move($2, $3)',
`$0(decr($1), $2, $4, $3)move($2, $3)$0(decr($1), $4, $3, $2)')')
# hanoi (cnt)
define(`hanoi', `_$0(`$1', source, destination, auxilliary)')
# traceon(`move', `_hanoi', `decr')
divert`'dnl
hanoi(3)

View File

@ -1,3 +0,0 @@
dnl noauto
`include test file.'
define()

View File

@ -1,3 +0,0 @@
Include file start
foo
Include file end

View File

@ -1,7 +0,0 @@
Beginning.
include(`NOFILE')
Intermediate
include(`incl-test.m4')
After
include(`NOFILE')
very late

View File

@ -1,10 +0,0 @@
define(`%%$$##', `>>>$0<<< cnt $#')
# indir(`%%$$##', nonsense, nonsense)
indir(`%%$$##', nonsense, nonsense)
# indir(`indir', `%%$$##', nonsense)
indir(`indir', `%%$$##', nonsense)
# indir(`indir', `indir', `indir', `indir', `%%$$##')
indir(`indir', `indir', `indir', `indir', `%%$$##')

View File

@ -1,15 +0,0 @@
divert(`-1')
# join(sep, args) - join each non-empty ARG into a single
# string, with each element separated by SEP
define(`join',
`ifelse(`$#', `2', ``$2'',
`ifelse(`$2', `', `', ``$2'_')$0(`$1', shift(shift($@)))')')
define(`_join',
`ifelse(`$#$2', `2', `',
`ifelse(`$2', `', `', ``$1$2'')$0(`$1', shift(shift($@)))')')
# joinall(sep, args) - join each ARG, including empty ones,
# into a single string, with each element separated by SEP
define(`joinall', ``$2'_$0(`$1', shift($@))')
define(`_joinall',
`ifelse(`$#', `2', `', ``$1$3'$0(`$1', shift(shift($@)))')')
divert`'dnl

View File

@ -1,18 +0,0 @@
dnl Stress test for recursion algorithms. Usage:
dnl m4 -Ipath/to/examples [-Doptions] loop.m4
dnl Options include:
dnl -Dalt[=<n>] - test with foreachq<n> instead of foreachq2, default 3
dnl -Dlimit=<num> - set upper limit of sequence to <num>, default 1000
dnl -Dverbose - print the sequence to the screen, rather than discarding
dnl -Ddebug[=<code>] - execute <code> after forloop but before foreach
dnl -Dsleep=<num> - sleep for <num> seconds before exit, to allow time
dnl to examine peak process memory usage
include(`forloop2.m4')dnl
include(`quote.m4')dnl
ifelse(alt, `alt', `define(`alt', `2')', alt, `', `define(`alt', `3')')dnl
include(`foreachq'alt`.m4')dnl
ifdef(`limit', `', `define(`limit', `1000')')dnl
ifdef(`verbose', `', `divert(`-1')')dnl
ifdef(`debug', `', `define(`debug')')dnl
foreachq(`i', dquote(1forloop(`i', `2', limit, `,i'))debug, ` i')
ifdef(`sleep',`syscmd(`echo done>/dev/tty;sleep 'sleep)')dnl

View File

@ -1,8 +0,0 @@
divert(-1)
define(`USER', `root')
define(`TMP', maketemp(`/tmp/hejXXXXXX'))
syscmd(`grep "^'USER`:" /etc/passwd | awk -F: "{print \$3}"' > TMP)
define(`UID', include(TMP))
syscmd(`rm -f' TMP)
divert
UID

View File

@ -1,8 +0,0 @@
dnl Copyright (C) 2006, 2010, 2013-2014, 2017 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it
dnl with or without modifications, as long as this notice is preserved.
load(`modtest')
test
Dumpdef: dumpdef(`test').

View File

@ -1,17 +0,0 @@
traceon
changequote([,])dnl
changequote([``], [''])dnl
````traceon''''
define(``foo'', ````FOO'''')dnl
dumpdef(``foo'')dnl
changequote(``!'', ``!'')dnl
!foo!
foo
dumpdef(!foo!)dnl
define(!bar!, !BAR!)
bar
changequote(!>*>*>*>*>!, !<*<*<*<*<!)dnl five of each
>*>*>*>*>foo bar<*<*<*<*<
foo bar
>*>*>*>*>*>*><*<*<*<*<*<*<
dumpdef(>*>*>*>*>foo<*<*<*<*<, >*>*>*>*>bar<*<*<*<*<)dnl

View File

@ -1,8 +0,0 @@
# traceon(`patsubst')
patsubst(`GNUs not Unix.', `^', `OBS: ')
patsubst(`GNUs not Unix.', `\<', `OBS: ')
patsubst(`GNUs not Unix.', `\<\w', `\0=')
patsubst(`GNUs not Unix.', `\w*', `(\0)')
patsubst(`GNUs not Unix.', `\w+', `(\0)')
patsubst(`GNUs not Unix.', `\w+')
patsubst(`GNUs not '` Unix.', `[ ]+', ` ')

View File

@ -1,25 +0,0 @@
divert(-1)
pushdef(`hej', `def 1.')
dumpdef(`hej')
pushdef(`hej', `def 2.')
dumpdef(`hej')
pushdef(`hej', `def 3.')
dumpdef(`hej')
pushdef(`hej', `def 4.')
dumpdef(`hej')
popdef(`hej')
dumpdef(`hej')
popdef(`hej')
dumpdef(`hej')
popdef(`hej')
dumpdef(`hej')
popdef(`hej')
dumpdef(`hej')
popdef(`hej')
dumpdef(`hej')
popdef(`hej')
dumpdef(`mac2')
popdef(`mac2')
dumpdef(`mac2')

View File

@ -1,9 +0,0 @@
divert(`-1')
# quote(args) - convert args to single-quoted string
define(`quote', `ifelse(`$#', `0', `', ``$*'')')
# dquote(args) - convert args to quoted list of quoted strings
define(`dquote', ``$@'')
# dquote_elt(args) - convert args to list of double-quoted strings
define(`dquote_elt', `ifelse(`$#', `0', `', `$#', `1', ```$1''',
```$1'',$0(shift($@))')')
divert`'dnl

View File

@ -1,12 +0,0 @@
traceon(`regexp')dnl
regexp(`hej med dig', `.*', `>>\0<<')
regexp(`hej med dig', `\w*', `>>\0<<')
regexp(`hej med dig', `.+', `>>\0<<')
regexp(`hej med dig', `m\w+', `>>\0<<')
regexp(`hej med dig', `m\(.*\)', `>>\0<< >>\1<<')
regexp(`hej med dig', `.*')
regexp(`hej med dig', `\w*')
regexp(`hej med dig', `.+')
regexp(`hej med dig', `m\w+')
regexp(`hej med dig', `m\(.*\)')

Some files were not shown because too many files have changed in this diff Show More