This function is invoked after hook_postmake(). Theoretically, we don't need this hook at all and we could do all its work in hook_postmake(), but we're keeping it separate in case we get fancier in the future.

This function is responsible for generating all the *.pinfo files in the project. It does this by invoking the gen_pinfo() function that's defined in build-cfg, which generates one .pinfo. The command line for gen_pinfo() is:

gen_pinfo [-nsrc_name ] install_name install_dir pinfo_line...

The arguments are:

The name of the pinfo file (minus the .pinfo suffix). If it's not specified, gen_pinfo() uses install_name.
The basename of the executable when it's installed.
The directory the executable should be installed in. If it doesn't begin with a /, the target CPU directory is prepended to it. For example, if install_dir is usr/bin and you're generating an x86 executable, the true installation directory is /x86/usr/bin.
Any additional pinfo lines that you want to add. You can repeat this argument as many times as required. Favorites include:
  • DESCRIPTION="This executable performs no useful purpose"
  • SYMLINK=foobar.so

Here's an example from the nasm project:

function hook_pinfo {
    gen_pinfo nasm    usr/bin LIC=NASM DESCRIPTION="Netwide X86 Assembler"
    gen_pinfo ndisasm usr/bin LIC=NASM DESCRIPTION="Netwide X86 Disassembler"