- $(BISON) -d $<
- @-mv -f parser.tab.h parser.tab.hh # bison < 1.30
- mv parser.tab.hh $@
- rm -f parser.tab.c parser.tab.cc # if this happens in the wrong order it triggers recompile of the .cc file
+ $(BISON) -o $(subst .hh,-tmp.cc,$@) -d $<
+ rm $(subst .hh,-tmp.cc,$@)
+ mv $(subst .hh,-tmp.hh,$@) $@