Solaris DevX comes with Emacs, Java, and the compilers pre-installed. This is all you need to edit and build sizeable systems in batch mode.
Your Solaris home directory
You probably want your Unix home directory and Mac home directories to be distinct but closely related. It is probably best to make a folder inside your Mac home folder called solaris-devx-home and populate it with Solaris-specific environmental files. Folders with content not specific to Solaris should be organized in a Mac-centric way, but linked into your Solaris home directory as necessary. Files which begin with a dot (".") are invisible to the Mac Finder, and should therefore be links to original files which the Finder can see.
Here is an example listing of a working Solaris home directory, as listed from a Mac Terminal window:
ls -al /Users/joeuser/solaris-devx-home total 80 drwxr-xr-x 32 joeuser daemon 1088 Sep 29 17:14 . drwxr-xr-x 46 joeuser joeuser 1564 Sep 29 17:17 .. -rw-r--r-- 1 joeuser daemon 6148 Sep 30 00:25 .DS_Store -rw------- 1 joeuser daemon 88 Aug 10 01:56 .Xauthority drwx------ 2 joeuser daemon 68 Aug 18 20:07 .autosave -rw------- 1 joeuser daemon 7295 Sep 30 00:10 .bash_history lrwxrwxrwx 1 joeuser daemon 18 Aug 10 00:34 .bash_login -> env/bash_login.txt lrwxrwxrwx 1 joeuser daemon 14 Aug 10 00:34 .bashrc -> env/bashrc.txt lrwxrwxrwx 1 joeuser daemon 13 Aug 10 00:34 .dbxrc -> env/dbxrc.txt lrwxrwxrwx 1 joeuser daemon 13 Aug 10 00:34 .er.rc -> env/er.rc.txt drwx------ 2 joeuser daemon 68 Aug 22 22:00 .gconf drwx------ 3 joeuser daemon 102 Aug 22 22:01 .gconfd -rw------- 1 joeuser daemon 2167 Sep 29 23:58 .logins -rw-r--r-- 1 joeuser daemon 964 Aug 9 19:29 .profile -rw-rw-rw- 1 joeuser daemon 127 Aug 22 11:36 .saves-3629-solaris-devx lrwxrwxrwx 1 joeuser daemon 16 Aug 10 00:34 .screenrc -> env/screenrc.txt drwxrwxrwx 3 joeuser daemon 102 Aug 10 00:56 .sunstudio drwx------ 3 joeuser daemon 102 Aug 10 00:58 .sunw lrwxrwxrwx 1 joeuser daemon 10 Aug 10 00:34 .xemacs -> env/xemacs drwxrwxrwx 7 joeuser daemon 238 Aug 22 18:32 Builds drwxr-xr-x 101 joeuser daemon 3434 Apr 27 23:17 Classes lrwxrwxrwx 1 joeuser daemon 33 Aug 10 00:35 Downloads -> /net/macosx/Users/joeuser/Downloads lrwxrwxrwx 1 joeuser daemon 40 Sep 19 11:10 Outgoing -> /net/macosx/Users/joeuser/Desktop/Outgoing lrwxrwxrwx 1 joeuser daemon 32 Aug 10 00:35 Projects -> /net/macosx/Users/joeuser/Projects drwxr-xr-x 103 joeuser daemon 3502 Sep 29 23:52 bin drwxr-xr-x 29 joeuser daemon 986 Aug 22 18:32 config drwxr-xr-x 14 joeuser daemon 476 Jul 19 20:21 devtools drwxrwxrwx 20 joeuser daemon 680 Aug 29 21:42 env drwxr-xr-x 3 joeuser daemon 102 Aug 10 00:36 gnu -rw-r--r-- 1 joeuser daemon 1053 Aug 9 19:29 local.cshrc -rw-r--r-- 1 joeuser daemon 1002 Aug 9 19:29 local.login -rw-r--r-- 1 joeuser daemon 1019 Aug 9 19:29 local.profile
Example: To initialize a Mercurial workspace
$ cd ~Projects $ time hg clone http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot hotspot-work destination directory: hotspot-work requesting all changes adding changesets adding manifests adding file changes added 1 changesets with 2894 changes to 2894 files 2894 files updated, 0 files merged, 0 files removed, 0 files unresolved real 0m16.850s user 0m8.959s sys 0m3.455s $ time cp -al hotspot-work hotspot-temp real 0m9.497s user 0m0.035s sys 0m1.898s $ diff -r hotspot-work hotspot-temp $ rm -rf hotspot-temp
Here are more Mercurial tips.
Example: To build Hotspot
This assumes you have downloaded the Hotspot sources into a folder called Projects/hotspot-work. It also assumes you wish to place your build products in a different folder.
$ cd ~/Builds $ ws=~/Projects/hotspot-work $ mkdir $(basename $ws) $ chdir $(basename $ws) $ ln -s $ws GAMMADIR $ gnumake -f GAMMADIR/build/solaris/Makefile jvmg GAMMADIR=$(cd GAMMADIR;pwd -P)
It takes about 15 minutes over NFS, using both CPUs. The laptop gets hot and runs its fan!
Making "webrevs"
There's a nice tool floating around from the Solaris developers which arranges a useful HTML presentation of diffs, making it easier for your colleagues to review your work.
Here is the Solaris version: http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/tools/scripts/webrev.sh
There is a Mercurial-aware version somewhere...
Here is a little wrapper script which can be helpful to form nice-looking webrevs. Of course, it will be most helpful when you adapt it to your own preferences and environment.