fix script, makefile work on cross-reference