print help right after parsing command line

is the only sane thing, and now that there are no dependencies on
anything else any more (in particular anything slow or side effect
laden), we can actually do it.

this removes some nasty OPT_HELP checks spread throughout the code, thus
further reducing data dependencies.

Change-Id: Ib0a00e1514e2aa25ec3b527ba9f5719e3214640b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
don't initialize build dir earlier than necessary

this way, platform detection (and later license checking) become
(mostly) read-only operations.

Change-Id: I4c5ffcf80feadfeee2c6e927cf0285f46fa6ea43
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
consolidate all license checking in the earliest place possible

... which is right after performing the platform detection, as proper
license checking needs to know the target platform.

we can do that now, as we moved all more expensive or side effect laden
processing to a later point.

as a side effect, we also get rid of the weird early cmdline parsing.

Change-Id: I0fda0a15a1ea2082603f7097e89aa422853f30fa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
clean up mess surrounding PLATFORM_MAC

introduce XPLATFORM_MAC which is properly initialized from the spec
instead of from the host.

use that and BUILD_ON_MAC where appropriate.

minor bug: during command line arg validation we use BUILD_ON_MAC even
when XPLATFORM_MAC would be in order, because the latter is not
available at that point yet. the solution would be delaying the
validation, but that doesn't seem worth the effort now.

Task-number: QTBUG-33896
Change-Id: I63f361212961bfdd82efde2ca71a1f48904a85fb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
fix overquoting in some mkdir calls

Change-Id: I2ed418064d43ab8cdab87af48e03d983c023ccf5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>