flex
flex copied to clipboard
Fix "make distcheck" failure and use Automake 1.16.1
Not sure if flex needs this, but I can update ".travis/install-automake.sh" to use Automake 1.16.1. (Automake 1.16 would fail to build in this Travis server (which runs Ubuntu 14.04) due to the compatibility bug.)
The idea seems reasonable, yes.
It looks like Automake 1.16.1 reveals a "make distcleancheck" bug for us. (See the build log.) The error is:
ERROR: files left in build directory after distclean:
./tests/.deps/reject_nr.reject.Po
The file is used for dependency tracking, and was generated by the compiler when --enable-dependency-tracking
in configure
was enabled. Normally, Automake will track, include, and clean up .Po
files for every .c
file mentioned in the *_SOURCES
variables.
And unfortunately this one got missed by Automake due to a technicality in the reject_nr
test.
I know how to fix this one, but there're two ways that can be done and I need help to pick which approach.
- Have Automake aware of the generated
reject_nr.reject.Po
file (and the correspondingreject_nr.reject.c
), by defining a variable:
nodist_reject_nr_reject_SOURCES = reject_nr.reject.c
This allows reject_nr.reject.o
to continue to be generated using the Automake-default .c.o
rule without making an exception recipe (commands), as the approach 2...
- Override the generating rule of
reject_nr.reject.$(OBJEXT)
just like howreject_r
test has done:
reject_r.reject.$(OBJEXT): reject_r.reject.c
$(AM_V_CC)$(COMPILE) -DTEST_IS_REENTRANT -c -o $@ $<
The override disabled the generation of reject_r.reject.Po
, and that was why reject_r
did not suffer from the distcleancheck error mentioned above, and why Automake did not need to care about the reject_r.reject.c
file at least directly.
Now, which approach?
On Monday, 12 March 2018, 5:48 pm +0000, "Kang-Che Sung (宋岡哲)" [email protected] wrote:
It looks like Automake 1.16.1 reveals a "make distcleancheck" bug for us. (See the build log.) The error is:
ERROR: files left in build directory after distclean: ./tests/.deps/reject_nr.reject.Po
The file is used for dependency tracking, and was generated by the compiler when
--enable-dependency-tracking
inconfigure
was enabled. Normally, Automake will track, include, and clean up.Po
files for every.c
file mentioned in the*_SOURCES
variables. And unfortunately this one got missed by Automake due to a technicality in thereject_nr
test. I know how to fix this one, but there're two ways that can be done and I need help to pick which approach.
- Have Automake aware of the generated
reject_nr.reject.Po
file (and the correspondingreject_nr.reject.c
), by defining a variable:nodist_reject_nr_reject_SOURCES = reject_nr.reject.c
This allows
reject_nr.reject.o
to continue to be generated using the Automake-default.c.o
rule without making an exception recipe (commands), as the approach 2...
- Override the generating rule of
reject_nr.reject.$(OBJEXT)
just like howreject_r
test has done:reject_r.reject.$(OBJEXT): reject_r.reject.c $(AM_V_CC)$(COMPILE) -DTEST_IS_REENTRANT -c -o $@ $<
The override disabled the generation of
reject_r.reject.Po
, and that was whyreject_r
did not suffer from the distcleancheck error mentioned above, and why Automake did not need to care about thereject_r.reject.c
file at least directly.Now, which approach?
I think we want the second approach.
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/westes/flex/pull/325#issuecomment-372402291
-- Will Estes [email protected]
Since this pr is generating build failures, I'm moving it to 2.6.6 to allow more time to sort out the issues you list.
Pushed the testsuite fix here, but I'm lazy to file another pull request just for that small fix. I expect you cherry-pick it if you are convenient to do that.
Currently, the Travis build still uses Automake 1.15.x. Could you please rebase your branch, and force-push?
Closing due to age. Makefile.am in a few places will get some love, especially tests/ so this will get picked up but in other ways.