diff --git a/wmake/rules/General/bison b/wmake/rules/General/bison index 21aab6a4af0aa4803038d0761bd0c513819e113d..cc9fedb837aedae613e350917ef7bc5410fc685e 100644 --- a/wmake/rules/General/bison +++ b/wmake/rules/General/bison @@ -1,17 +1,21 @@ +#------------------------------------------------------------------------------ SUFFIXES += .Y .y .yy .yy-m4 +# Bison, compile with C 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 $@ +# Bison, compile with C++ Ytoo = $E $(call QUIET_MESSAGE,bison,$(<F)) \ bison -v -d -y $< && \ - mv y.tab.c $(@D)/$(<F).C && \ + mv y.tab.c $(@D)/$(<F).cc && \ mv y.tab.h $(@D)/$(<F).H && \ - $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $(@D)/$(<F).C -o $@ + $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $(@D)/$(<F).cc -o $@ +# Bison via wrapper, compile with C++ 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 $@ diff --git a/wmake/rules/General/flex b/wmake/rules/General/flex index afff022c5abafe08c92d84868166b6be1e952b85..f84955f8ec3d5f135064e1737f8775bc15c93700 100644 --- a/wmake/rules/General/flex +++ b/wmake/rules/General/flex @@ -1,5 +1,22 @@ -SUFFIXES += .l +#------------------------------------------------------------------------------ +SUFFIXES += .L .l .ll +# Regular flex, compile with C ltoo = $E $(call QUIET_MESSAGE,flex,$(<F)) \ flex -f -o $(@D)/$(<F).c $< && \ $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $(@D)/$(<F).c -o $@ + +## # Regular flex, compile with C++ +## ll-cctoo = $E $(call QUIET_MESSAGE,flex,$(<F)) \ +## flex -f -o $(@D)/$(<F).cc $< && \ +## $(WM_SCHEDULER) $(CC) $(c++FLAGS) $(c++LESSWARN) -c $(@D)/$(<F).cc -o $@ + +# C++-aware flex, compile with C++ +lltoo = $E $(call QUIET_MESSAGE,flex++,$(<F)) \ + flex -+ -f -o $(@D)/$(<F).cc $< && \ + $(WM_SCHEDULER) $(CC) $(c++FLAGS) $(c++LESSWARN) -c $(@D)/$(<F).cc -o $@ + +# C++-aware flex, compile with C++ +Ltoo = $(lltoo) + +#------------------------------------------------------------------------------ diff --git a/wmake/rules/General/flex++ b/wmake/rules/General/flex++ deleted file mode 100644 index f5484188ede2b16bdfcb380117a136005fd502f3..0000000000000000000000000000000000000000 --- a/wmake/rules/General/flex++ +++ /dev/null @@ -1,11 +0,0 @@ -SUFFIXES += .L .ll - -# Use C++-aware Flex -Ltoo = $E $(call QUIET_MESSAGE,flex++,$(<F)) \ - flex -+ -f -o $(@D)/$(<F).C $< && \ - $(WM_SCHEDULER) $(CC) $(c++FLAGS) $(c++LESSWARN) -c $(@D)/$(<F).C -o $@ - -# Use regular (C) Flex, but compile result as C++ -lltoo = $E $(call QUIET_MESSAGE,flex,$(<F)) \ - flex -f -o $(@D)/$(<F).cc $< && \ - $(WM_SCHEDULER) $(CC) $(c++FLAGS) $(c++LESSWARN) -c $(@D)/$(<F).cc -o $@ diff --git a/wmake/rules/General/lemon b/wmake/rules/General/lemon index 8f4e944506c660850dd25b570bc40d3c94cef255..aa243f9e2069588cb9c2623b6bbe70b21716c0d9 100644 --- a/wmake/rules/General/lemon +++ b/wmake/rules/General/lemon @@ -1,9 +1,12 @@ +#------------------------------------------------------------------------------ SUFFIXES += .ly .lyy .lyy-m4 +# Lemon via wrapper, compile with C lytoo = $E $(call QUIET_MESSAGE,lemon,$(<F)) \ $(WM_SCRIPTS)/wrap-lemon -d$(@D) $< && \ $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $(@D)/$(*F).c -o $@ +# Lemon via wrapper, compile with C++ lyytoo = $E $(call QUIET_MESSAGE,lemon,$(<F)) \ $(WM_SCRIPTS)/wrap-lemon -d$(@D) -ecc $< && \ $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $(@D)/$(*F).cc -o $@ diff --git a/wmake/rules/General/standard b/wmake/rules/General/standard index 083190c91f547391d830c5ed0c6a48f0c18bdf18..f964b35ccd3d52dc7eb99fc447773bb511c6bb4f 100644 --- a/wmake/rules/General/standard +++ b/wmake/rules/General/standard @@ -4,7 +4,6 @@ SUFFIXES= include $(GENERAL_RULES)/version include $(GENERAL_RULES)/flex -include $(GENERAL_RULES)/flex++ ## include $(GENERAL_RULES)/byacc ## include $(GENERAL_RULES)/btyacc++ include $(GENERAL_RULES)/bison