Like copy_string(), copy_unsigned_string() is just a clone of the
stlib's strdup(). We only use it twice. I'm pretty confident that char
signedness is irrelevant in this case.
Akim Demaille [Fri, 4 Dec 2015 15:37:03 +0000 (16:37 +0100)]
Generated skel.c explicitly in srcdir.
Rewrote the target for skel.c to explicitly mention the srcdir. This
should help when building flex from a directory outside the flex
tree. Spread the rule out over several lines to enhance readability.
Akim Demaille [Fri, 4 Dec 2015 15:36:17 +0000 (16:36 +0100)]
Called glibtoolize if libtoolize run fails.
On Mac OS X, libtoolize is known as glibtoolize. In cases where libtoolize is not present, then calling glibtoolize when bootstrapping the build system gives more folks a shot at getting flex built from the ground up.
Mightyjo [Thu, 3 Dec 2015 02:25:11 +0000 (21:25 -0500)]
Checked for (g)texi2dvi. Better bison, help2man checks.
Added test for presence of (g)texi2dvi program. Gave notice if texi2dvi
is unavailable and set TEXI2DVI=: to avoid giving users headaches.
Enhanced tests for bison and help2man with notices when the programs
aren't found. Set their program variables to use the missing script
in build-aux since it's compatible with them.
copy_string() was a clone of the stdlib's strdup(). For safety,
simplicity, and speed, we should use that instead. We introduce xstrdup() which wraps strdup() in a failure upon memory allocation errors.
Mightyjo [Sat, 28 Nov 2015 02:38:23 +0000 (21:38 -0500)]
Replaced CHAR macro with unsigned char type.
Thanks to Michael McConville for pointing out that the old Char macro
causes problems with static analysis. The macro has been removed and
replaced with 'unsigned char' throughout the flex sources. The macro is
not needed at best and was confusing at worst. It was not used in any of
the example files nor was it mentioned in the manual at all.
Stefan Reinauer [Thu, 14 May 2015 18:16:04 +0000 (11:16 -0700)]
Switch function definitions from mixed K&R to consistent ANSI C.
flex was using K&R function definitions for some functions and
ANSI C style in others, sometimes even in the same file. Change
the code to consistently use ANSI C.
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
lukeallardyce [Fri, 13 Nov 2015 19:48:19 +0000 (14:48 -0500)]
Supplied versioning information in flex libraries.
Resolves sourceforge bug #182. On OSX, and possibly other platforms, building the libfl libraries without versioning information caused a build failures.
Will Estes [Fri, 13 Nov 2015 02:44:07 +0000 (21:44 -0500)]
Cleaned up more precisely after make check.
BUILT_SOURCES is now just the list of headers built as per the
automake manual. We provide the list of files to clean to make
rebuilding the test suite programs easier. We then use the CLEANFILES
list in a dist-hook to clean up the distribution that automake gathers
since not distributing flex generated files is foreign to automake's
mindset, but we need exactly that.
Additionally, we locate inputs to the tables-related tests more
precisely. Some files are in srcdir and some are in builddir, which
the arguments to the log compiler are now made aware of.
Will Estes [Wed, 11 Nov 2015 20:20:56 +0000 (15:20 -0500)]
Changed man page dependencies.
The man page is just the --help output as reformatted by help2man. The
--help option is most likely to change when the flex skeleton changes
or one of the option parsing files changes or the configure.ac script
itself changes. The dependencies reflect this now.
It is still necessary, under some circumstances, to rebuild flex
explicitly before building the man page. In theory, it's possible to
have automake arrange to do this all the time, but doing so works out
to be fragile, given the rest of the build system.
Mightyjo [Tue, 27 Oct 2015 03:35:00 +0000 (20:35 -0700)]
Changed several pointers to istream (and ostream) to references in c++-only sections of the skeleton.
Patched up a variety of expected errors caused by changing istream* to istream&.
Added a stray 'make' at line 545. Oops.
Changed the buffer_state struct to store std::streambuf* instead of std::istream* for C++ mode. Changed interfaces in FlexLexer.h to take std::istream& instead of *. Backward compatibility temporarily broken.
Patched up backward compatibility with reasonable behavior in the presence of null pointers.
Re-added backward-compatible versions of the yyFlexLexer methods that take iostream pointers. All tests passing.
Will Estes [Fri, 14 Nov 2014 13:35:24 +0000 (08:35 -0500)]
Ignore directories build-aux/, m4/
Since build-aux/ now contains a number of files previously at the top
level, we ignore build-aux/. Therefore, it's not necessary to list any
files that are now kept in it. Also, explicitly mark m4/ as a directory to ignore.
Will Estes [Fri, 14 Nov 2014 13:29:44 +0000 (08:29 -0500)]
added back call to AC_CONFIG_AUX_DIR.
In an effort to reduce top level directory clutter, reintroduced the
call to AC_CONFIG_AUX_DIR. Moved the call to LT_INIT to after that
call so configure will be able to find its files.
Will Estes [Mon, 16 Jun 2014 20:11:14 +0000 (16:11 -0400)]
Refactor reject test for new test suite layout.
Split out reject test into its constituant tests. Add .reject tests
and .table tests for automake test log generation. Rewrite
testwrapper.sh to handle running with a tables file and specifying
optional input using command line options rather than positional
parameters.
Will Estes [Mon, 16 Jun 2014 00:52:03 +0000 (20:52 -0400)]
Refactor multiple_scanners_r test for new test suite layout.
Also, remove the use of table files from this test as that tests two
features at once and we want to be as close to testing one feature at
a time as we can be.
Will Estes [Wed, 4 Jun 2014 18:52:16 +0000 (14:52 -0400)]
upgrade automake version to 1.14.1
Unfortunately, automake 1.14.1 does not play nicely with
AC_CONFIG_AUX_DIR, so upgrading the used automake version required
removing the build-aux directory and letting autoconf's installed
helper files live more over the tree.