PostgreSQL
Kernel config
The kernel needs the "System V IPC" enabled. Find that in "General setup" in the kernel config.
static libs
There is no obvious way to prevent the static versions of the libs being installed.
contrib/ programs --
Many of these have tests, but the tests for (at least) pg_upgrade are broken by moving the socket from /tmp to /run/postgresql. If you want to test this, you could build postgresql without moving the socket, run the tests in contrib/, and then make a fresh build with the socket moved. Or, look at how distros do it - there is a large amount of patching to make the tests work again.
scripting
if you script the full set of commands to prove the new server works, you will need to wait for the server to start before you try to create the test database.
installing for a client
If you are only building a client to connect to a server on another machine, you can save some time and space (specifically, the postgres program and the postmaster symlink, the charset modules, and the server data in /usr/share/postgresql) if you configure and make as normal, but replace the install with
make -C src/bin install make -C src/include install make -C src/interfaces install
You will probably want to make install-docs as with a server install.