Fixes T9289. This is a bit hacky, but feels like a reasonable workaround. Basically, add SKIP_PARSER and SKIP_SCANNER flags to the Makefile. If these flags are present then the Makefile effectively behaves like this:
%.lex.hpp %.lex.cpp: %.l touch $*.lex.hpp $*.lex.cpp %.yacc.hpp %.yacc.cpp: %.y touch $*.yacc.hpp $*.yacc.cpp
If users are compiling XHPAST with libphutil/scripts/build_xhpast.php (which is the recommendation method) then there should be no difference here because this script will pass SKIP_PARSER=1 SKIP_LEXER=1.