openfoam/wmake/rules/General/bison
Bernhard Gschaider 762c095f4e COMP: WM_SCHEDULER breaks compilation (fixes #2439)
- only wrap compiler calls (not things like flex/bison)
- avoid single quoted '&&' (causes syntax errors)

STYLE: report WM_COMPILE_CONTROL value in top-level Allwmake
2022-05-10 21:15:39 +02:00

25 lines
951 B
Plaintext

SUFFIXES += .Y .y .yy .yy-m4
ytoo = $E $(call QUIET_MESSAGE,bison,$(<F)) \
bison -v -d -y $< && \
mv y.tab.c $(@D)/$(<F).c && \
mv y.tab.h $(@D)/$(<F).h && \
$(WM_SCHEDULER) $(cc) $(cFLAGS) -c $(@D)/$(<F).c -o $@
Ytoo = $E $(call QUIET_MESSAGE,bison,$(<F)) \
bison -v -d -y $< && \
mv y.tab.c $(@D)/$(<F).C && \
mv y.tab.h $(@D)/$(<F).H && \
$(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $(@D)/$(<F).C -o $@
yytoo = $E $(call QUIET_MESSAGE,bison,$(<F)) \
$(WM_SCRIPTS)/wrap-bison -output=$(@D)/$(*F).tab.cc -v -d $< && \
$(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $(@D)/$(*F).tab.cc -o $@
# Retains intermediate m4-filtered files (-no-tmp to suppress)
yy-m4too = $E $(call QUIET_MESSAGE,bison-m4,$(<F)) \
$(WM_SCRIPTS)/wrap-bison -output=$(@D)/$(*F).tab.cc -v -d $< && \
$(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $(@D)/$(*F).tab.cc -o $@
#------------------------------------------------------------------------------