./autogen.sh && ./configure && make -j4 && sudo make install
Note the -jn flag which tells make to build n sources in parallel, good if you have a multicore machine (see Jeff Atwood's argument on the quad-core vs. dual-core debate, particularly the 'Comments' section for relevant discussion).
So Koya and I made a shell script to do this:
cd "`dirname $BASH_SOURCE`/../../trunk"
notify-send -t 2000 "Building scenic..."
make -j4 && gksu make install && notify-send -t 10000 "Done building scenic"
First, the variable $BASH_SOURCE evaluates to the location of the build script in question. We then use this to get the path to our source tree (as both are in our repository). We then call notify-send (requires libnotify-bin) to show a popup telling us that the build is being attempted. We then compile and call gksu, as this is intended to be used via a hotkey, instead of plain sudo for the make install. Provided the make and make install were successful, we again use notify to post a popup that the build is done. You should make this script executable with
chmod u+x your_build_script.sh
This script can be called from the command line, but to be even more useful I made a hotkey for it.
Running gconf-editor, you can edit what keybindings you have for your global workspace, with the following steps:
- run gconf-editor from a terminal (or just Alt-F2, then type in gconf-editor in the "Run Application" window that appears).
- click on the tab for apps, under /
- click on the tab for metacity, under apps
- click on global_keybindings
- in the adjacent window, right-click on run_command_1 (assuming it's disabled, otherwise use the first run_command_x listed as disabled) and click Edit key.
- I use F5 (as in the F5 key) for my binding, but it can be whatever you choose. Just type 'F' and '5' in the Value: field, NOT the F5 key itself, to get this binding.
- Next, click on the tab keybinding_commands, right below global_keybindings, and right-click on command_1 (or whichever you chose) and click Edit Key.
- In the field labelled Value:, enter the path to your build script, for example: /home/tristan/devel/scenic/inhouse/misc/build_scenic.sh