Monday, March 12, 2007

More fun with HP-UX

Haven't written in a while. Been pretty busy. Spent weekend in NYC with Vikki. Been getting packed for the move, etc. Closing has been locked in for this Friday.

Started doing some more with HP-UX. Needed to recompile gSOAP with the native HP-UX compiler, and found some fun things that make it unique.

For example, tracked down a difference between HPUX make and GNU make which boils down to the following hypothetical Makefile:

foo.a: foo.b
ln -s foo.b foo.a

This basically results in:

bash-2.04# ls -tlr
total 16
-rw-r--r-- 1 root sys 0 Mar 12 19:33 foo.b
-rw-r--r-- 1 root sys 33 Mar 12 19:35 Makefile
lrwxr-xr-x 1 root sys 5 Mar 12 19:35 foo.a -> foo.b

On GNU make, it's smart enough to realize that foo.a is a symlink to foo.b. On HPUX apparently it always thinks foo.a is older than foo.b, so it tries to recreate it every time make is run.

In other words, with GNU make we get:

bash-2.04# gmake
ln -s foo.b foo.a
bash-2.04# gmake
make: `foo.a' is up to date.

while on HPUX make we get:

bash-2.04# make
ln -s foo.b foo.a
bash-2.04# make
ln -s foo.b foo.a
ln: foo.a exists
*** Error exit code 1
Stop.

Very annoying.