This is highly specific. Some ports want to rerun autoconf/automake/autoheader/autogen/whatever to create/recreate their configure machinery.
Traditionally, we run this either in post-patch, or pre-configure. Running it in post-patch means that you have to clean the WRKDIR before tweaking things again, since patches will be applied once more... fairly often, you forget about one locally patched file, and need to reedit it. Running it in pre-configure has its own set of problems. One issue being that autogen is fairly slow, so tweaking configure args being unbearable. One other issue being that REORDER_DEPENDENCIES happened in post-patch, and so you lose the normal timestamp shennanigans that automake loves so much, thus reconfiguring during build more often than not. After discussing this with sthen@, and talking over what target names to use, we now have an intermediate target: gen Simply put, it's run between patch and configure, and is used to generate configure machinery. gnu.port.mk does its business with autoconf/automake as usual, but inside the "gen" target, REORDER_DEPENDENCIES is run at the end of "gen", and you can add specific code to it by defining do-gen. There is also a convenience target "regen" that's fairly self explanatory (force running gen again even if it's already been built). Most ports won't care. It should make things less painful for ports that need it. Yep, it's a bit of "extra complexity" (extra target) but we think it's worthwhile...
