Hi,
I'm trying to move some existing Makefiles written for Solaris over to
HP-UX 10.20 systems. The Makefiles are used to install host specific
configuation files.
On the Suns I can define the machine's hostname with:
HOSTNAME=sh:uname -n
However, on the HPs I don't have the option of using '=sh:'. I tried using
single backquotes. From what I was able to find from HP it looked like I
should have been able to do:
HOSTNAME=`uname -n`
Unfortunately, this results in make telling me that it can't make
fstab.`uname
Explictly setting the shell in the Makefile to Bourne doesn't help. I can
get the make to work correctly if I specify the HOSTNAME variable on the
command line:
HOSTNAME=`uname -n` make -d install
Since this option sorts of negates at least part of the point in using
make to deal with these files I'd like to find a better solution.
It looks like I can use GNU Make and be able to run (shell <cmd>) to get
the info I need, but I'd rather not install it unless I have to.
Any ideas?
Thanks,
brian
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
brian davies Fluke Corporation