Consider including SGE_RREQ at the top of Makefile specify a queue which the scheduler should use.
This also works for individual recipes. Include the same call right before the recipe.
SGE_RREQ="-q all.q" recipe
qmake -V -cwd -l arch=linux-x64 -inherit -- -j 100
The -V option specifies that all active environment variables be passed to the job environments.
The -inherit option is needed if you use recursion.
Everything after the -- is passed to make.
Logging in interactive mode:
qmake -V -cwd -l arch=linux-x64 -inherit -- -j 100 2>&1 | tee qmake.$(/bin/date '+%F_%T').log
The 2>&1 redirects stderr to stdout.
The | tee qmake.*.log writes stdout (which now also includes stderr) to a log file while also printing it to your screen.
GNU screen can be used to detach your process from the current shell, so you can safely break your connection with Shark and return to it at a later time while the process keeps running.
screen -L -d -m qmake -V -cwd -l arch=linux-x64 -inherit -- -j 100
Put the following line in your .bashrc to change the previous line into a handy command:
alias deploy='screen -L -d -m qmake -V -cwd -l arch=linux-x64 -inherit -- -j 100'
Some commands for working with screen sessions:
screen -rd <session number>
You can prefix rule with the SGE_RREQ environment variable to specify any custom SGE parameters.
For example, if a rule needs more than the default assigned amount of memory:
SGE_RREQ="-l h_vmem=30G" ./some_program $< > $@
See the qmake manual.
More information about how to make a Makefile.
See a presentation about using make for pipelines.
It takes a bit of work to run qmake jobs under another project than your default project.