|
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
AMDG
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:
https://github.com/boostorg/build/commit/64add142e14d5fdfccb7361fed2ea37fb2fd2f5b
(The end of a long series of patches,
to fix handling of cyclic INCLUDES,
which was seriously broken before.)
https://github.com/boostorg/build/commit/c1395b49614ed5c4b0958355ffaa0f794fb760a2
(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 acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk