PKG_CONFIG_SYSROOT_DIR and friends get set in package/Makefile.in, so there's no need to set it in the makefiles of the individual packages as well. Based on a patch by Markus Heidelberg.
for i in `find -name 'Config*' -o -name 'Makefile*' -o -name '*.mk'`; do sed -i 's/ \+$//' $i; done