- add additional rule (ending '.ll') for the combination of flex for C-code but compiling the result as C++. This can be needed for re-entrant parsers. - update bison rule to handle renaming of skeleton files. Use a wrap-bison script to manage this.
19 lines
651 B
Plaintext
19 lines
651 B
Plaintext
SUFFIXES += .Y .y .yy
|
|
|
|
ytoo = $E $(call QUIET_MESSAGE,bison,$(<F)) \
|
|
$(WM_SCHEDULER) bison -v -d -y $< $(AND) \
|
|
mv y.tab.c $(@D)/$(<F).c $(AND) \
|
|
mv y.tab.h $(@D)/$(<F).h $(AND) \
|
|
$(cc) $(cFLAGS) -c $(@D)/$(<F).c -o $@
|
|
|
|
Ytoo = $E $(call QUIET_MESSAGE,bison,$(<F)) \
|
|
$(WM_SCHEDULER) bison -v -d -y $< $(AND) \
|
|
mv y.tab.c $(@D)/$(<F).C $(AND) \
|
|
mv y.tab.h $(@D)/$(<F).H $(AND) \
|
|
$(CC) $(c++FLAGS) -c $(@D)/$(<F).C -o $@
|
|
|
|
yytoo = $E $(call QUIET_MESSAGE,bison,$(<F)) \
|
|
$(WM_SCHEDULER) $(WM_SCRIPTS)/wrap-bison \
|
|
-input=$< -output=$(@D)/$(*F).tab.cc -v -d $(AND) \
|
|
$(cc) $(cFLAGS) -c $(@D)/$(*F).tab.cc -o $@
|