Boost logo

Boost-Build :

Subject: Re: [Boost-build] Building library with flex/bison inputs with dependencies
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2015-12-01 14:13:44


On 12/01/2015 09:16 AM, Jim Hague wrote:
> I'm building a project with includes the following library rule:
> lib e2kmapparse
> : e2kmapyacc.yy e2kmaplex.ll
> ...
> ;
> As it not usual, e2kmaplex.ll includes a header defining token values
> generated by e2kmapyacc.yy. In other words, e2kmaplex.ll starts thus:
> %{
> #include <cstdlib>
> #include <cstring>
> #include "e2kmapyacc.hpp"
> %}
> But it looks like the CPP file output by flex is not scanned for include
> dependencies before compiling; so on random -j builds, GCC will be launched
> long before Bison is run on e2kmapyacc.yy, with unhappy results.

  This is supposed to work automatically.
If it doesn't it's probably a bug. I
reworked parts of the header scanning
algorithm significantly in 2012-2013,
so your problem may have been fixed.

  Of particular interest are:
(The end of a long series of patches,
to fix handling of cyclic INCLUDES,
which was seriously broken before.)
(Handles actions, such as bison, which
generate multiple targets in a cleaner
way. The original code relied on
marking the outputs as INCLUDing
each other. Processing of cyclic
INCLUDES used to be broken. See above.)

In Christ,
Steven Watanabe

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at