improve dependency handling, fix some package makefile bugs