openfoam/wmake/rules/General/ragel
Mark Olesen 1676bd4003 ENH: replace flex-based wmkdep with ragel-based parser (issue #784)
This is similar to efforts (Feb 2010) but using ragel
  (https://en.wikipedia.org/wiki/Ragel) instead of the now defunct
  coco/r. The modified commit message from 2010:

ENH: add C++-based wmkdepend parser (uses ragel grammar).

- This avoids dependency on lex/flex and provides better encapsulation
  for buffer switching. As a result, the maximum number of open files
  only corresponds to the include depth.

--

Note that the flex source and rules are still available, but are not
deactivate (see wmake/rules/General/transform)
2018-04-11 12:31:36 +02:00

6 lines
188 B
Plaintext

SUFFIXES += .rl
rltoo = $E $(call QUIET_MESSAGE,ragel,$(<F)) \
$(WM_SCHEDULER) ragel -C -o$(@D)/$(<F).cpp -f $< $(AND) \
$(CC) $(c++FLAGS) $(c++LESSWARN) -c $(@D)/$(<F).cpp -o $@