[ncl-install] Parent installation directory path, "ymake" and C preprocessor keywords

Greg Earle earle at isolar.dyndns.org
Thu Jul 10 18:49:33 MDT 2014


I've been asked to build NCL/NCAR Graphics 6.2.0 on Solaris 10 and an
older Red Hat Enterprise Linux release (RHEL 5.4), and immediately
ran aground on something interesting/amusing.

If you enter a path for the "Parent installation directory" that contains a
reserved pre-processor keyword (like "linux" or "sun" or "sparc" or "unix"),
when config/ymake runs it takes YmakeRoot and replaces those keywords with a
"1" in the final Makefile definitions (like YMAKEROOT, BINROOT et al.).

In our environment, we use paths that end in things like ".../x86-linux",
".../sun-solaris" and ".../x86-macosx"; these got altered to "x86-1" and
"1-solaris".  Oops!

I'm trying this patch out for the moment (definitely works on Linux, will
try Solaris next):

--
% diff -rC 1 config/ymake.orig config/ymake
*** config/ymake.orig	2014-03-31 19:23:03.000000000 -0700
--- config/ymake	2014-07-02 23:06:47.802708000 -0700
***************
*** 653,655 ****
 case    CYGWIN:
!         set cppopt = -traditional-cpp
         breaksw
--- 653,658 ----
 case    CYGWIN:
!         set cppopt = "-traditional-cpp -undef"
!         breaksw
! case    SunOS:
!         set cppopt = -Usun
         breaksw
--

but I don't know what side impacts using "-undef"/"-Usun" might have.
(Probably none since it's just used for gen'ing these *ROOT paths.)

Now if only I could solve all these undefined Cairo references ...

	- Greg Earle



More information about the ncl-install mailing list