| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
|
|
|
|
| |
Previously, "make dist" and similar commands would cause the po files
to be updated, which is incorrect. The more recent version now used
should not do this.
Replaced Rules-getpo by extra script to manually update and rebuild all po files.
|
|
|
|
|
|
|
|
| |
Listing the flex and bison sources -- as the gettext manual suggests
-- causes warnings. Listing the generated C files for the lexer and
parser removes the warnings. Since both files contain line directives,
any translator who needs to refer back to those files should be able
to find the context in which strings are needed.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we would call libtoolize and if that failed, we would call
glibtoolize since some platforms have the libtoolize program under
that name.
Instead, we check to see if the environment variable LIBTOOLIZE is set
and use that if so. Otherwise, we try to find a program "libtoolize"
on the path and failing that glibtoolize. We alert the user if no
suitable program can be found.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check for cross compiling. If cross compiling, build stage1flex using a
custom link command.
We also override LDADD since that adds the replacement implementations
that are cross compiled, and instead always use the replacement library
implementations.
We don't use BUILD_OBJEXT and BUILD_EXEEXT since it seems that automake
does not support these.
Fixes #78.
|
|
|
|
|
|
| |
strings.h (not string.h) is the standard-defined include header for
strcasecmp(). Include <strings.h> for portability (even though glibc
exposes strcasecmp() declaration also in <string.h> by default).
|
|
|
|
|
|
|
|
|
|
|
|
| |
`configure` will now error if a required header or function is not
found on the system.
Also add comments on optional functions checks.
Add sys/stats.h and sys/wait.h to list of required headers in
configure.
This fixes issue #180.
|
|
|
|
|
|
| |
Replace the naive "for" loop in determining power of two with a clever
bitwise solution. This code is around the Internet already and is in
Public Domain.
|
|
|
|
|
|
|
|
|
|
|
|
| |
"Unlisting" the pthread test when libpthread is not available is never
a good idea. Should let it compile into a stub program that returns
the "skip" status.
configure.ac and tests/Makefile.am are edited so that pthread test can
be built anyway, but only works (not as the stub) when both pthread.h
and libpthread are detected on the system.
Also fix a small typo in tests/pthread.l comments.
|
|
|
|
|
|
|
|
|
| |
Revert change to copy scan.c when building the distribution
archive. Move it instead. This satisfies automake's notions of what
should be clean and ensures that the distribution archive contains a
just-built copy of scan.c.
Fixes #186
|
| |
|
|
|
|
|
|
|
|
| |
This will ensure the flex scanner included in release tarball being
generated by exactly the flex version to be released.
Here's one catch after this change: You may not run "make dist" or
"make distdir" if you configure the flex source to be cross-compiled.
|
|
|
|
|
| |
Makefile shouldn't overwrite the 'localedir' variable, because that's
what '--localedir' option in 'configure' is for.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert commit e02c3d27eeb6b53ec82532ab080c23ce26813fd4
("include the intl/ subdirectory when searching for include files")
Flex doesn't come with libintl source code, so inclusion of
$(top_srcdir)/intl subdirectory during compiling is unnecessary.
This flag seems to be left after "remove intl from dist"
(commit 8f45da06adbd7dbcdfdbdd5c20ff4c47fc504f35) without someone
cleaning this up.
Users who need to build with gettext functionality from libintl would
use the '--with-libintl-prefix' configure option.
|
|
|
|
|
|
|
|
| |
Fix unneeded double malloc - let regerror(). Write its message after
our "regcomp for (regex) failed: " string.
Also, errbuf cannot be free()'d because of flexfatal containing a
longjmp.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AC_PROG_YACC already detects the bison program. We can just use it,
and make notice if [ $YACC != 'bison -y' ]
Remove unused AC_SUBST([BISON], ...).
Add AM_CONDITIONAL([HAVE_BISON], ...) so that we can skip bison tests
in testsuite when bison is absent.
We don't make any attempt to detect other yacc implementations since
flex is developed with bison. While it would be possible, the need
isn't there right now. It would be possible to add a --with-parser
option that defaulted to bison if such a need cropped up.
|
|
|
|
|
|
|
|
|
|
|
| |
The current clauses stating "main.c: parse.h" and "yylex.c: parse.h" do
not work as expected. Make did not try to build parse.h upon building
flex-main.o as it would think main.c exist already and ignore the
clause. Fix this by explicitly stating that the .o files depend on
parse.h instead.
This dependency bug only happens if user builds flex from a
checked-out repository.
|
|
|
|
|
|
|
|
| |
If a ${foo}_scanner.c exists but the respective ${foo}_scanner.h is
missing, then 'make' can halt. Fix this by deleting the
${foo}_scanner.c file and then remake it. This rule is the same as the
automake-generated rule for .c files that require LEX or YACC (except
automake will use ylwrap).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without BUILT_SOURCES in Makefile, no test sources in tests/ will be
built when using the default "make all" target. This is desireable for
people who are just building flex but who do not want to run, and
therefore, build any part of the test suite.
Also fix missing sources dependencies:
bison_nr_scanner.$(OBJEXT): bison_nr_parser.h
bison_yylloc_scanner.$(OBJEXT): bison_yylloc_parser.h
bison_yylval_scanner.$(OBJEXT): bison_yylval_parser.h
|
|
|
|
|
|
|
|
|
|
|
| |
Use reallocarray() when we have it (i.e. in OpenBSD system). When we
don't, use equivalent overflow detection for our allocate_array and
reallocate_array functions.
Remove lib/reallocarray.c from our LIBOBJS as we no longer need it.
Provide a fallback SIZE_MAX macro definition in flexint.h (not
preprocessor friendly, but enough for our reallocate_array use case).
|
| |
|
|
|
|
|
|
| |
BSD make doesn't like $< with more than one source
specified. Additionally, make sure to specify srcdir when referring to
source files since vpath builds depend on this.
|
| |
|
|
|
|
|
| |
Fix the reentrant part; don't "#define yyfoo yyfoo" because it breaks
code that does #ifndef yywrap ..
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Avoid alloca() for SSP; it is better anyway; since we don't need to
strdup the path.
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes regression introduced in v2.6.3.
|
| |
|
|
|
|
| |
This avoids a naming conflict in NetBSD's libc.
|
| |
|
|
|
|
|
|
| |
This allows user to use a different shell if /bin/sh has problems.
The use of $SHELL (variable) to run scripts is already an Automake
convention. All shell scripts in build-aux are run by $SHELL.
|
|
|
|
|
|
|
|
| |
They now all work under a POSIX compliant sh. Specifically, 'dash' can
now be used for running "make check" tests.
Note that none of these scripts has ever been using a pipe, so
`set -o pipefail` is unnecessary and removed.
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a '-1' test program returns a non-zero status, don't go further and
compare it's (numeric) output values. This allows a '-1' test to
indicate a "skip" status or an otherwise error. (Currently no such '-1'
test would skip like this, though.)
Shell syntax note: `set -e` will not exit with the syntax like this
`test $(false) = $(false);`. The exit statuses of `false` in the
example will be ignored instead. But putting the output in a variable,
such as `VAR=$(false)`, DOES exit.
|
|
|
|
|
|
|
|
|
| |
This 'make indent' target has not been working since the directories
reorganization in flex 2.6.0. Now make it work again.
Note that the current indent profile breaks many styles of existing
code. The indent target should not be used until the .indent.pro
options are reviewed for desireability.
|
| |
|
|
|
|
|
|
| |
One place emitting a #line directive to the generated header was
missed in commit 647a92b9f4 when resolving #55. Fix it to respect
gen_line_dirs as well.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Binding a reference to a dereferenced null pointer is invalid and
compilers optimise away the &file == 0 check. We need a real stream.
yyin is available already, and yyrestart(NULL) is only supported when
yyin will not be used, so there is no harm in just passing in that.
Since we now always have a valid stream, we can skip the null check
too.
Fixes #98.
|
|
|
|
|
|
|
|
|
| |
Removed a newline that caused a problem building the scanner in some
circumstances. Specifically:
'bad character' error when executing
/bin/sh ../build-aux/ylwrap scan.l lex.yy.c scan.c -- flex
|
| |
|
| |
|