openfoam/wmake/rules/General/lemon
Mark Olesen 3a816006dc COMP: support m4 include directories for wrap-lemon
Set the m4 -I include accordingly to have the folllowing:
  - the directory of the parser.
  - include/ in the top-level source tree of the current target
    (eg, src/finiteVolume/include-m4/ when compiling libfiniteVolume)
  - include/ from OpenFOAM

Additional -dry-run option for makeParser, wrap-lemon for expanding m4
only.

Extend m4 wrapping support to include bison as well.
2019-12-06 16:15:07 +01:00

17 lines
665 B
Plaintext

SUFFIXES += .ly .lyy .lyy-m4
lytoo = $E $(call QUIET_MESSAGE,lemon,$(<F)) \
$(WM_SCHEDULER) $(WM_SCRIPTS)/wrap-lemon -d$(@D) $< $(AND) \
$(cc) $(cFLAGS) -c $(@D)/$(*F).c -o $@
lyytoo = $E $(call QUIET_MESSAGE,lemon,$(<F)) \
$(WM_SCHEDULER) $(WM_SCRIPTS)/wrap-lemon -d$(@D) -ecc $< $(AND) \
$(CC) $(c++FLAGS) -c $(@D)/$(*F).cc -o $@
# Retains intermediate m4-filtered files (-no-tmp to suppress)
lyy-m4too = $E $(call QUIET_MESSAGE,lemon-m4,$(<F)) \
$(WM_SCHEDULER) $(WM_SCRIPTS)/wrap-lemon -d$(@D) -ecc $< $(AND) \
$(CC) $(c++FLAGS) -c $(@D)/$(*F).cc -o $@
#------------------------------------------------------------------------------