]> git.draconx.ca Git - cdecl99.git/log
cdecl99.git
5 years agoUpdate .gitignore.
Nick Bowler [Sun, 6 Jan 2019 17:19:25 +0000 (12:19 -0500)]
Update .gitignore.

The ignored m4 files list has bitrotted slightly, fix it up.

5 years agoBump dxcommon for depfiles updates.
Nick Bowler [Sun, 6 Jan 2019 17:12:48 +0000 (12:12 -0500)]
Bump dxcommon for depfiles updates.

The older snippets fail with Automake 1.16.

Also update the URIs used in gitmodules to HTTPS variants.

9 years agoBump gnulib for gettext updates.
Nick Bowler [Fri, 29 Aug 2014 23:48:50 +0000 (19:48 -0400)]
Bump gnulib for gettext updates.

This eliminates bootstrap warnings about AM_PROG_MKDIR_P.  Update to the
v0.1 tag so we have a known checkpoint.

9 years agoBump dxcommon for fix-gnulib updates.
Nick Bowler [Fri, 29 Aug 2014 23:42:09 +0000 (19:42 -0400)]
Bump dxcommon for fix-gnulib updates.

Latest versions no longer require List::Compare so let's update.

11 years agoFix silent-rules alignment in Automake 1.12.
Nick Bowler [Wed, 9 Jan 2013 00:01:53 +0000 (19:01 -0500)]
Fix silent-rules alignment in Automake 1.12.

Automake 1.12 changes the alignment of silent-rules output, which
looks ugly.  Use the new compatibility helpers in dxcommon to fix
the alignment of flex/bison printouts in a backwards-compatible way.

11 years agoUpdate .gitignore for Automake-1.12.
Nick Bowler [Thu, 6 Dec 2012 00:45:22 +0000 (19:45 -0500)]
Update .gitignore for Automake-1.12.

11 years agoMove GLOBAL_SYMBOL_PIPE definition into dxcommon code.
Nick Bowler [Thu, 6 Dec 2012 00:43:34 +0000 (19:43 -0500)]
Move GLOBAL_SYMBOL_PIPE definition into dxcommon code.

This got left behind when exported.sh was moved.

11 years agoAdd basic readline history support.
Nick Bowler [Thu, 30 Aug 2012 00:29:03 +0000 (20:29 -0400)]
Add basic readline history support.

Bump gnulib as later versions include a free check for history.h
already, then implement a wrapper for add_history that should work
even when support is not available.

11 years agoWork around breakage caused by newer Bison versions.
Nick Bowler [Wed, 29 Aug 2012 22:35:55 +0000 (18:35 -0400)]
Work around breakage caused by newer Bison versions.

Newer versions of GNU Bison automagically add a prototype for yyparse to
the header file, where previous versions did not.  Unfortunately, the
use of yyscan_t in %parse-param causes a build failure now, as yyscan_t
is declared in scan.h.  Moreover, since scan.h includes parse.h, we
cannot simply include scan.h in parse.h to get the type definition.

Work around the problem by declaring yyparse as taking a void *
directly.

11 years agoDon't allow restrict-qualified pointers to functions.
Nick Bowler [Wed, 29 Aug 2012 00:44:09 +0000 (20:44 -0400)]
Don't allow restrict-qualified pointers to functions.

Such pointers are prohibited by the C language, so we must reject them.

11 years agoUpdate dxcommon to latest version.
Nick Bowler [Wed, 29 Aug 2012 00:42:16 +0000 (20:42 -0400)]
Update dxcommon to latest version.

This is to get exported.sh updates.

11 years agoAdd missing test script to the distribution.
Nick Bowler [Sat, 18 Aug 2012 01:31:19 +0000 (21:31 -0400)]
Add missing test script to the distribution.

This fixes a test failure in distcheck.

11 years agoUpdate dxcommon to get its version of exported.sh.in.
Nick Bowler [Sat, 18 Aug 2012 01:29:00 +0000 (21:29 -0400)]
Update dxcommon to get its version of exported.sh.in.

11 years agoWorkaround Gentoo's silly Automake wrapper in bootstrap.
Nick Bowler [Wed, 15 Aug 2012 00:34:44 +0000 (20:34 -0400)]
Workaround Gentoo's silly Automake wrapper in bootstrap.

It's pretty annoying when running bootstrap doesn't actually rebuild
using newly-installed tool versions.  This happens because Gentoo's
automake wrapper script detects that stuff has been previously built
with a particular version of Automake, and runs that instead of the
latest.

Since we're going to recreate them anyway, delete the generated files so
that Gentoo's script picks the latest.

11 years agoPrevent gratuitous Automake failures.
Nick Bowler [Wed, 15 Aug 2012 00:20:52 +0000 (20:20 -0400)]
Prevent gratuitous Automake failures.

Automake-1.12 introduces some new warnings, as well as fixing an earlier
bug that prevented -Wall from enabling all warnings.  Since we were
using -Werror, this causes Automake to fail.

However, the warnings are gratuitous: some are warning about stuff
provided by libtool (which should be fixed in libtool, not worked
around in this package), and the others are warning about the non-
portability of (hopefully!) portable constructs.  Most are automake
bug #9587 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9587>, but
Automake also warns about the $(.FEATURES) trick to use order-only
dependencies when available.

11 years agoMove some gettext bits to dxcommon.
Nick Bowler [Sat, 28 Jul 2012 20:32:18 +0000 (16:32 -0400)]
Move some gettext bits to dxcommon.

Migrate the mostly-package-agnostic parts of the gettext support into
dxcommon, thus allowing these bits to be shared with other packages.

We remove the AC_CONFIG_MACRO_DIR from configure.ac because its
behaviour is not clearly specified, and it's not obvious how (if it's
even possible at all) one handles multiple directories containing macro
definitions.  Moreover, even if this macro is specified you still need
to define ACLOCAL_AMFLAGS anyway, and this definition must be kept
consistent with the AC_CONFIG_MACRO_DIR usage.

In the end, it looks like the only thing AC_CONFIG_MACRO_DIR does is
silence a single warning from libtoolize, without doing anything else
meaningful.  In light of the above, the warning seems preferable at
this time.

11 years agoAdd copyright header to bootstrap.
Nick Bowler [Thu, 10 May 2012 01:28:58 +0000 (21:28 -0400)]
Add copyright header to bootstrap.

11 years agoImprove bootstrap error messages.
Nick Bowler [Thu, 10 May 2012 01:26:21 +0000 (21:26 -0400)]
Improve bootstrap error messages.

Kill off the silly trap handler while we're at it, because it never
actually worked properly.  Just don't call die from a subshell.

11 years agoBring in fix-gnulib from a submodule.
Nick Bowler [Thu, 10 May 2012 01:08:15 +0000 (21:08 -0400)]
Bring in fix-gnulib from a submodule.

This should make it easier to keep this stuff in sync with other
projects.

11 years agoBetter document fix-gnulib.
Nick Bowler [Thu, 10 May 2012 00:02:29 +0000 (20:02 -0400)]
Better document fix-gnulib.

Add a big blurb in the comments describing the main bits required to use
the script in a project.  Also rename the header variables a bit so we
can ensure future compatibility with the documented behaviour.

11 years agoMake fix-gnulib only need a single output file.
Nick Bowler [Wed, 9 May 2012 23:59:32 +0000 (19:59 -0400)]
Make fix-gnulib only need a single output file.

We combine the Automake and M4 bits into a single polyglot that can be
interpreted by either, so all one needs to do is include the makefile
fragment in configure.ac.  I've created a monster.

11 years agoTest invalid English declarations as well.
Nick Bowler [Thu, 3 May 2012 23:54:30 +0000 (19:54 -0400)]
Test invalid English declarations as well.

12 years agoTest more bogus declarations.
Nick Bowler [Wed, 28 Mar 2012 15:29:34 +0000 (11:29 -0400)]
Test more bogus declarations.

12 years agoAdd a check to reject extra specifiers on void function parameters.
Nick Bowler [Sat, 24 Mar 2012 16:12:22 +0000 (12:12 -0400)]
Add a check to reject extra specifiers on void function parameters.

12 years agoAdd a simple test to check if cdecl99 rejects bogus input.
Nick Bowler [Fri, 23 Mar 2012 19:38:49 +0000 (15:38 -0400)]
Add a simple test to check if cdecl99 rejects bogus input.

12 years agoActually generate (void) function parameter lists in randomdecl.
Nick Bowler [Mon, 19 Mar 2012 01:44:56 +0000 (21:44 -0400)]
Actually generate (void) function parameter lists in randomdecl.

12 years agoAdd a sanity test for randomdecl.
Nick Bowler [Sun, 18 Mar 2012 22:10:36 +0000 (18:10 -0400)]
Add a sanity test for randomdecl.

12 years agoAdd an English output mode to randomdecl.
Nick Bowler [Sun, 18 Mar 2012 22:09:06 +0000 (18:09 -0400)]
Add an English output mode to randomdecl.

12 years agoUnbreak random array declarators.
Nick Bowler [Sun, 18 Mar 2012 22:05:05 +0000 (18:05 -0400)]
Unbreak random array declarators.

Passing really big values to gsl_rng_uniform_int is not supported by the
library.  Instead, add a function to generate any possible uintmax_t
value uniformly at random.

12 years agoFix bogus switch cases in declgen.
Nick Bowler [Sun, 18 Mar 2012 20:54:43 +0000 (16:54 -0400)]
Fix bogus switch cases in declgen.

One of the switch statements in declgen has completely bogus case
labels: '0', '1', ... instead of 0, 1, ...

Fix this up and also add a default: assert(0); which would have caught
this earlier.  Improve the test case output when a randomdecl failure
causes the test to fail.

Also add a comment to the one switch statement in this file which
intentionally does not have a default: assert(0).

12 years agoBatch up crossparse tests to improve performance.
Nick Bowler [Sat, 3 Mar 2012 03:30:15 +0000 (22:30 -0500)]
Batch up crossparse tests to improve performance.

A significant portion of the crossparse test time is spent just starting
the program hundreds of times.  Batch up the random declarations to
reduce this.  This makes the test script somewhat more complex, but the
gain is significant: the test time (500 iterations) on my machine is
shortened from 7 seconds to a mere .7 seconds.

12 years agoFree memory in randomdecl.
Nick Bowler [Thu, 1 Mar 2012 02:56:36 +0000 (21:56 -0500)]
Free memory in randomdecl.

Kind of silly to continuously allocate memory for a program intended to
run a long time.

12 years agoDon't generate invalid void function parameters in randomdecl.
Nick Bowler [Thu, 1 Mar 2012 01:29:58 +0000 (20:29 -0500)]
Don't generate invalid void function parameters in randomdecl.

Only parameters that are pointers or functions may have the "void" type
specifier.

This apparently doesn't come up often, so increase the default number of
test iterations to make it more likely.

12 years agoAdd a test case to check if libcdecl can parse its own output.
Nick Bowler [Thu, 1 Mar 2012 01:14:49 +0000 (20:14 -0500)]
Add a test case to check if libcdecl can parse its own output.

12 years agoAvoid recursively calling glthread_once in error init.
Nick Bowler [Wed, 29 Feb 2012 01:05:06 +0000 (20:05 -0500)]
Avoid recursively calling glthread_once in error init.

Apparently at least the GNU C library will deadlock when pthread_once is
called recursively on the same control variable.  This behaviour of the
library doesn't seem to be consistent with the POSIX standard, but it's
easy enough to avoid in this instance.

This can all go away once all the error paths have been updated to
cdecl__set_error.

12 years agoAdd a test case to verify symbol prefixes.
Nick Bowler [Sun, 26 Feb 2012 22:13:53 +0000 (17:13 -0500)]
Add a test case to verify symbol prefixes.

Our very first automated test case!

12 years agoFix libtest dependencies.
Nick Bowler [Sat, 25 Feb 2012 19:22:04 +0000 (14:22 -0500)]
Fix libtest dependencies.

Anything that includes <config.h> must depend on the gnulib headers.

12 years agoSimplify glconfig include mechanism.
Nick Bowler [Sat, 25 Feb 2012 17:08:23 +0000 (12:08 -0500)]
Simplify glconfig include mechanism.

Instead of relying on include order to select the right config.h, modify
config.h to include the glconfig header conditionally.

This allows the use of Automake's default include paths again, and is
conceptually simpler.

12 years agoAdd missing test files to the distribution.
Nick Bowler [Sat, 25 Feb 2012 16:27:36 +0000 (11:27 -0500)]
Add missing test files to the distribution.

Oops; distcheck wasn't testing this (yet) so half the files in test/
were not actually included in the distribution.

Also switch to using check_LTLIBRARIES instead of EXTRA_LTLIBRARIES
because the latter does not clean properly for some reason (and the
former is more appropriate conceptually, anyway).

12 years agoAdd more missing source files to the distribution.
Nick Bowler [Sat, 25 Feb 2012 04:07:19 +0000 (23:07 -0500)]
Add more missing source files to the distribution.

Somehow parse.y and scan.l managed to get omitted from the distribution.

12 years agoMark dist hooks as phony.
Nick Bowler [Sat, 25 Feb 2012 02:37:58 +0000 (21:37 -0500)]
Mark dist hooks as phony.

12 years agoAvoid per-target CFLAGS (for now).
Nick Bowler [Sat, 25 Feb 2012 02:28:51 +0000 (21:28 -0500)]
Avoid per-target CFLAGS (for now).

There's no real reason to use per-target CFLAGS to specify $(GSL_CFLAGS)
only on libtest, as the flags will simply be harmless (and useless) on
other targets.  Set them globally and completely avoid the mess
resulting from the use of per-target flags.

12 years agoFix GSL detection when using the default --with-gsl=auto.
Nick Bowler [Sat, 25 Feb 2012 02:25:21 +0000 (21:25 -0500)]
Fix GSL detection when using the default --with-gsl=auto.

The use of a shell case statement was preventing the AC_REQUIRE macros
in DX_CHECK_GSL from working correctly in the second case.  Switch to
AS_CASE to avoid the issue.

12 years agoFix "make dist" permissions when using a read-only srcdir.
Nick Bowler [Sat, 25 Feb 2012 01:54:45 +0000 (20:54 -0500)]
Fix "make dist" permissions when using a read-only srcdir.

Apparently Automake copies permissions from the source directory, so
if you run "make dist" in a VPATH build from a read-only srcdir, the
resulting distdir will be read-only.  Beyond the resulting tarball
permissions, this can actually cause dist hooks to fail in some
instances.

Add another dist hook which makes distdir user-writable.

12 years agoProperly describe several files in Makefile.am.
Nick Bowler [Fri, 24 Feb 2012 03:20:07 +0000 (22:20 -0500)]
Properly describe several files in Makefile.am.

A number of source files were missing from the distribution or generated
files were not removed by "make clean".  Fix that up.

12 years agoFix distribution of missing config header.
Nick Bowler [Fri, 24 Feb 2012 03:19:04 +0000 (22:19 -0500)]
Fix distribution of missing config header.

While we're at it, rename cfgtail.h to conf_post.h for consistency with
the example in the autoconf manual.

12 years agoAdd a tool to generate random declarations.
Nick Bowler [Fri, 24 Feb 2012 03:14:46 +0000 (22:14 -0500)]
Add a tool to generate random declarations.

The first of (hopefully) many components of a test suite.

12 years agoTry to fix explanations of "child" declarators in the manual.
Nick Bowler [Fri, 24 Feb 2012 02:51:26 +0000 (21:51 -0500)]
Try to fix explanations of "child" declarators in the manual.

The "child" relationship between declarators is somwhat unintuitive.
Try to explain it properly in the manual.  It's still probably not too
helpful, but it's certainly better than the outright lies that are in
there currently.

12 years agoFix spacing after qualified pointers when rendering C declarations.
Nick Bowler [Fri, 24 Feb 2012 02:31:58 +0000 (21:31 -0500)]
Fix spacing after qualified pointers when rendering C declarations.

We don't want to print spaces after pointer qualifiers all the time: in
particular, things like "type const pointer to array of int" would print
a space between the "const" and the ")", as in:

  int (* const )[]

Fix that up by eliding the space if (a) the pointer has qualifiers, and
(b) the child is not a null declarator.

12 years agoAdd note about old-style function declarations to the manual.
Nick Bowler [Wed, 30 Nov 2011 01:35:05 +0000 (20:35 -0500)]
Add note about old-style function declarations to the manual.

12 years agoMake is_abstract a proper library function.
Nick Bowler [Wed, 30 Nov 2011 01:08:54 +0000 (20:08 -0500)]
Make is_abstract a proper library function.

This function is generally useful.  Add it to the public API.

12 years agoReduce "set +x" noise in (un)install targets.
Nick Bowler [Tue, 29 Nov 2011 03:03:07 +0000 (22:03 -0500)]
Reduce "set +x" noise in (un)install targets.

By judicious use of subshells, we can eliminate the need to call
"set +x" explicitly, which should (slightly) reduce the noise of the
(un)install targets.

12 years agoGenerate the specifier switch statement automatically.
Nick Bowler [Sun, 20 Nov 2011 20:17:52 +0000 (15:17 -0500)]
Generate the specifier switch statement automatically.

We already have a list of specifier names, so use them!

12 years agoSeparate specifier handling from the output routines.
Nick Bowler [Sun, 20 Nov 2011 16:37:00 +0000 (11:37 -0500)]
Separate specifier handling from the output routines.

This moves all the code to handle redundant specifiers and multiple
orderings to the parser, so that the output routines just have to
print them out in order.

This will allow the output routines to be used by test generators.

12 years agoUse #n in strtab.sed.
Nick Bowler [Sun, 23 Oct 2011 16:35:51 +0000 (12:35 -0400)]
Use #n in strtab.sed.

This feature allows us to make all makefile rules which call sed scripts
the same.  This may help reduce code duplication in the makefile later.

12 years agoMake CDECL_SPEC_TYPE non-zero.
Nick Bowler [Sat, 22 Oct 2011 23:53:38 +0000 (19:53 -0400)]
Make CDECL_SPEC_TYPE non-zero.

This allows us to meaningfully OR together the various CDECL_SPEC_
constants.  A bit of code assumes that CDECL_SPEC_TYPE is zero, so that
needs to be fixed.

12 years agoUpdate Gnulib to latest version.
Nick Bowler [Sat, 22 Oct 2011 18:17:31 +0000 (14:17 -0400)]
Update Gnulib to latest version.

12 years agoMangle spliced makefile lines in Gnulib correctly.
Nick Bowler [Sat, 22 Oct 2011 17:37:27 +0000 (13:37 -0400)]
Mangle spliced makefile lines in Gnulib correctly.

Otherwise, target and variable mangling may only apply to the first
line.

12 years agoAdd some examples to the manual.
Nick Bowler [Sat, 22 Oct 2011 16:06:10 +0000 (12:06 -0400)]
Add some examples to the manual.

12 years agoImplement --help.
Nick Bowler [Sat, 8 Oct 2011 14:53:33 +0000 (10:53 -0400)]
Implement --help.

12 years agoAdd support for translated long options.
Nick Bowler [Tue, 4 Oct 2011 22:14:05 +0000 (18:14 -0400)]
Add support for translated long options.

12 years agoIdentify nonterminals in the manual's grammar in an alternate way.
Nick Bowler [Tue, 4 Oct 2011 02:02:28 +0000 (22:02 -0400)]
Identify nonterminals in the manual's grammar in an alternate way.

Some output devices won't render .Va text differently from .Li text when
displaying the man page.  This unfortunately means that nonterminals
look exactly the same as terminals in the grammar.  Add brackets
around nonterminals (which are otherwise unused in the grammar) so
that it is readable on these devices, too.

12 years agoFix typos in manual.
Nick Bowler [Tue, 4 Oct 2011 01:51:09 +0000 (21:51 -0400)]
Fix typos in manual.

Apparently I was too drunk to spell "declaration" when I wrote this.

12 years agoDon't call cdecl_free internally.
Nick Bowler [Tue, 4 Oct 2011 01:24:49 +0000 (21:24 -0400)]
Don't call cdecl_free internally.

Use an exported wrapper function to avoid a local PLT entry in the
shared object.

12 years agoGenerate gettext catalog only from source files.
Nick Bowler [Thu, 29 Sep 2011 13:44:36 +0000 (09:44 -0400)]
Generate gettext catalog only from source files.

Otherwise the catalog is considered out of date even from a freshly
unpacked tarball.

12 years agoStart on a facility to translate error codes into strings.
Nick Bowler [Thu, 29 Sep 2011 03:23:12 +0000 (23:23 -0400)]
Start on a facility to translate error codes into strings.

This will be needed to port the remaining error messages over.

12 years agoStart implementing proper error handling.
Nick Bowler [Thu, 29 Sep 2011 01:57:23 +0000 (21:57 -0400)]
Start implementing proper error handling.

Since the library shouldn't be printing its own error messages, we need
a mechanism to propagate error details to the caller.  Implement a
system using thread-local storage which tracks the most recent errors.

12 years agoDocument libcdecl's slice of the C namespaces.
Nick Bowler [Thu, 29 Sep 2011 01:03:50 +0000 (21:03 -0400)]
Document libcdecl's slice of the C namespaces.

Now that we rename gnulib symbols, this should actually be true.
Document it.

12 years agoUpdate timestamps on generated header files before distributing them.
Nick Bowler [Thu, 29 Sep 2011 00:03:35 +0000 (20:03 -0400)]
Update timestamps on generated header files before distributing them.

Otherwise we risk breaking VPATH builds from the tarball, as make may
attempt to regenerate the headers.

12 years agoAdd installdirs rule for .mo files.
Nick Bowler [Thu, 29 Sep 2011 00:05:55 +0000 (20:05 -0400)]
Add installdirs rule for .mo files.

12 years agoUse (un)install-local to (un)install .mo files.
Nick Bowler [Thu, 29 Sep 2011 00:05:49 +0000 (20:05 -0400)]
Use (un)install-local to (un)install .mo files.

These install rules do not depend on any other installed file, so
there's no need to use the -hook versions which guarantee ordering.
Use -local instead.

12 years agoAdd uninstall rule for .mo files.
Nick Bowler [Thu, 22 Sep 2011 22:58:45 +0000 (18:58 -0400)]
Add uninstall rule for .mo files.

This was apparently forgotten because distcheck seems to not notice when
you leave crap in the install tree.

12 years agoAdd missing copyright headers.
Nick Bowler [Thu, 22 Sep 2011 22:46:35 +0000 (18:46 -0400)]
Add missing copyright headers.

12 years agoAdd -no-undefined to libcdecl LDFLAGS.
Nick Bowler [Thu, 22 Sep 2011 01:46:42 +0000 (21:46 -0400)]
Add -no-undefined to libcdecl LDFLAGS.

This is now true, so setting this allows shared libraries to be built
on Woe32.

12 years agoAvoid gratuitous library dependencies linking gnulib.
Nick Bowler [Thu, 22 Sep 2011 00:58:27 +0000 (20:58 -0400)]
Avoid gratuitous library dependencies linking gnulib.

libcdecl doesn't use the readline module at all, but libtool happily
pulls it in as a dependency.  Handle library dependencies manually to
avoid this problem.

12 years agoTell xgettext about _ and N_ markings.
Nick Bowler [Thu, 22 Sep 2011 00:29:24 +0000 (20:29 -0400)]
Tell xgettext about _ and N_ markings.

Gnulib uses these, and we will too.

12 years agoFix build with NLS disabled.
Nick Bowler [Wed, 21 Sep 2011 23:11:39 +0000 (19:11 -0400)]
Fix build with NLS disabled.

When NLS is disabled, we should not install any .mo files but we still
need to distribute the .po files.  However, ALL_LINGUAS was not being
set in this case, so the POFILES was not set if NLS is disabled, causing
a distcheck failure.

Also fix a build error in this case due to a missing #include.

12 years agoInclude config.h in all C source files.
Nick Bowler [Wed, 21 Sep 2011 23:13:50 +0000 (19:13 -0400)]
Include config.h in all C source files.

Some source files failed to include config.h, which is needed for
some things to work.

12 years agoInclude config.h in scan.l.
Nick Bowler [Wed, 21 Sep 2011 23:12:52 +0000 (19:12 -0400)]
Include config.h in scan.l.

This is required for things to work.  Unfortunately, %top{...} appears
to be the only bit where config.h can be put in a flex scanner, as
headers are included before the first %{...} block is output.  Thus, the
include ends up in the scan.h header file.  Nevertheless, this should
not be a problem since config.h only defines macros.

12 years agoRewrite Gnulib symbols to be in libcdecl's namespace.
Nick Bowler [Wed, 21 Sep 2011 04:51:17 +0000 (00:51 -0400)]
Rewrite Gnulib symbols to be in libcdecl's namespace.

The gnulib symbols are not properly prefixed for libcdecl internal
symbols (e.g. cdecl__blah).  This *will* cause problems when statically
linking against both libcdecl and another library that uses the same
gnulib modules.

Unfortunately, there's no simple way to determine what symbols need
prefixing without compiling all the gnulib objects.  The results can't
be distributed either, because they depend on the configuration.  So,
limited to simple tools and portable make rules, we hack together a
"new" config.h at build time that defines object-like macros to rewrite
the symbols, carefully ensuring that header dependencies are correct.

12 years agoSplit gnulib_headers into 3 variables.
Nick Bowler [Wed, 21 Sep 2011 04:31:15 +0000 (00:31 -0400)]
Split gnulib_headers into 3 variables.

This will be useful for symbol mangling, where additional header files
may need to be added to various points in the dependency chain.

12 years agoMove all Gnulib CLEANFILES variables to the end of the makefile.
Nick Bowler [Mon, 19 Sep 2011 22:44:47 +0000 (18:44 -0400)]
Move all Gnulib CLEANFILES variables to the end of the makefile.

This makes the clean procedure independent of the configuration.

12 years agoHandle gl_LIBOBJS/gl_LTLIBOBJS correctly.
Nick Bowler [Mon, 19 Sep 2011 22:43:34 +0000 (18:43 -0400)]
Handle gl_LIBOBJS/gl_LTLIBOBJS correctly.

These AC_SUBSTed variables reference objects whose sources are located
in lib, thus they need to be rewritten like other AC_SUBSTed variables.

These objects also need the header dependencies like other objects.

12 years agoEliminate use of BUILT_SOURCES from Gnulib.
Nick Bowler [Mon, 19 Sep 2011 03:01:18 +0000 (23:01 -0400)]
Eliminate use of BUILT_SOURCES from Gnulib.

As with recursive make, BUILT_SOURCES is harmful because of inadequate
dependency information.  We can achieve a similar effect with by using
order-only dependencies:  These force the headers to be up-to-date
before anything that might require them is built: but rebuilds are only
triggered based on the accurate dependency information generated by the
normal mechanisms.

Unfortunately, order-only dependencies are a GNU make feature, so we use
a hack which should fall back to ordinary dependencies on other make
implementations.  The worst effect of using ordinary dependencies will
be that files might be needlessly rebuilt when a header changes.

12 years agoIntegrate Gnulib non-recursively.
Nick Bowler [Mon, 19 Sep 2011 01:46:14 +0000 (21:46 -0400)]
Integrate Gnulib non-recursively.

With a little bit of mangling, it's possible to make the makefile
fragment produced by gnulib-tool suitable for use in our non-recursive
makefile.

12 years agoEnable i18n in Bison.
Nick Bowler [Thu, 15 Sep 2011 01:10:19 +0000 (21:10 -0400)]
Enable i18n in Bison.

This makes us require library initialization.  To avoid requiring an
explicit call, we implicitly initialize the library when it is first
required.  Bring in Gnulib's threading library to do this in a
thread-safe manner when available.

12 years agoInitial README.
Nick Bowler [Thu, 15 Sep 2011 22:33:41 +0000 (18:33 -0400)]
Initial README.

12 years agoAllow bootstrap tools to be overridden via environment variables.
Nick Bowler [Sun, 18 Sep 2011 23:32:54 +0000 (19:32 -0400)]
Allow bootstrap tools to be overridden via environment variables.

Useful if you want to use a different installed version of autoreconf,
for instance.

12 years agoAdd nodefault to flex options.
Nick Bowler [Sun, 18 Sep 2011 23:31:32 +0000 (19:31 -0400)]
Add nodefault to flex options.

We don't rely on this behaviour, and the default rule causes gcc to emit
a warning with -D_FORTIFY_SOURCE=2.  Just kill it.

12 years agoAdd WTFPL2 license document.
Nick Bowler [Sun, 18 Sep 2011 23:29:31 +0000 (19:29 -0400)]
Add WTFPL2 license document.

Parts of Cdecl99 are released under the terms of this license, thus it
should be included.

12 years agoFool autoreconf and automake into ignoring gettext.
Nick Bowler [Thu, 15 Sep 2011 01:01:58 +0000 (21:01 -0400)]
Fool autoreconf and automake into ignoring gettext.

Since we define our own makefile rules for gettext, having the autotools
magically perform special actions is counterproductive.

12 years agoEnable conditional dependencies in gnulib.
Nick Bowler [Wed, 14 Sep 2011 23:56:07 +0000 (19:56 -0400)]
Enable conditional dependencies in gnulib.

Seems to shave about 10% off total configure time on my machine.

12 years agoAdd never-interactive flex option.
Nick Bowler [Wed, 14 Sep 2011 23:52:14 +0000 (19:52 -0400)]
Add never-interactive flex option.

This eliminates the (non-ANSI) fileno and isatty calls.  Our input is
always a fixed buffer.

12 years agoInitial i18n infrastructure.
Nick Bowler [Wed, 14 Sep 2011 23:51:24 +0000 (19:51 -0400)]
Initial i18n infrastructure.

12 years agoUse AM_CPPFLAGS for mandatory preprocessor flags.
Nick Bowler [Wed, 14 Sep 2011 01:10:39 +0000 (21:10 -0400)]
Use AM_CPPFLAGS for mandatory preprocessor flags.

CPPFLAGS is meant to be overridable by the user.  Don't use it.

12 years agoUse symlinks for gnulib's m4 files.
Nick Bowler [Wed, 14 Sep 2011 01:10:01 +0000 (21:10 -0400)]
Use symlinks for gnulib's m4 files.

This is nice because it makes it really obvious (when working from git)
what files came directly from gnulib.

12 years agoUse .Pp for paragraph breaks in man pages.
Nick Bowler [Sun, 11 Sep 2011 23:29:12 +0000 (19:29 -0400)]
Use .Pp for paragraph breaks in man pages.

Blank lines are apparently invalid.

12 years agoUse .Va instead of .Fa in man pages when appropriate.
Nick Bowler [Sun, 11 Sep 2011 23:28:57 +0000 (19:28 -0400)]
Use .Va instead of .Fa in man pages when appropriate.

".Va" means "variable name", which is more appropriate than "function
argument" for variables.  Nevertheless, they're probably typeset the
same way, anyway.

12 years agoRe-word description of nonterminals in man page.
Nick Bowler [Sun, 11 Sep 2011 23:28:35 +0000 (19:28 -0400)]
Re-word description of nonterminals in man page.

There's no reason to assume that "function arguments" are typeset with
an underline.  So re-word that sentence to avoid directly stating
typographical conventions by using an example instead.

12 years agoAbort on "impossible" condition.
Nick Bowler [Sun, 11 Sep 2011 23:27:44 +0000 (19:27 -0400)]
Abort on "impossible" condition.

A corrupt or otherwise invalid cdecl structure could make the
explain_prologue function fail to return a value.  Add an assertion to
catch that.