During the build I got lots of errors like:
gmake: Failed to remake makefile `../../mk/postgres.user.mk'.
gmake: Failed to remake makefile `../../mk/../Makefile.global'.
gmake: Failed to remake makefile `../../mk/postgres.mk'.
gmake: Failed to remake makefile `Makefile'.
or
===> backend ../mk/../Makefile.global:235: ../mk/../Makefile.custom: No such file or directo\ ry
Remove line 235 from src/Makefile.global. (ie. the line which says "-include $(MKDIR)/../Makefile.custom") Some versions of gmake does not like -include.