Subject: imake and NetBSDMachineDefines
To: None <port-amd64@netbsd.org, tech-pkg@netbsd.org>
From: Rhialto <rhialto@falu.nl>
List: tech-pkg
Date: 07/20/2005 15:28:30
I am in the process of making a new pkg for the newly released ctwm-3.7,
and I noticed a warning is displayed apparently outside of my control:

===> configure-message [ctwm-3.7] ===> Configuring for ctwm-3.7
...
imake -DUseInstalled -I/usr/pkg/lib/X11/config -I/usr/X11R6/lib/X11/config
In file included from /usr/X11R6/lib/X11/config/Imake.tmpl:104,
                 from Imakefile.c:15:
/usr/X11R6/lib/X11/config/NetBSD.cf:258: warning: "NetBSDMachineDefines" redefined
<command line>:7: warning: this is the location of the previous definition

I don't do anything with NetBSDMachineDefines, but a grep reveals that
the wrapper scripts do:

pkgsrc-2005Q2/wm/ctwm37$ grep -r NetBSDMachineDefines . 
./work.x86_64/.tools/bin/imake:echo "<.> /usr/X11R6/bin/imake "-DNetBSDMachineDefines=\"\"" "$@"" >> $wrapperlog
./work.x86_64/.tools/bin/imake:/usr/X11R6/bin/imake "-DNetBSDMachineDefines=\"\"" "$@"
./work.x86_64/.work.log:<.> /usr/X11R6/bin/imake -DNetBSDMachineDefines="" -DUseInstalled -I/usr/pkg/lib/X11/config -I/usr/X11R6/lib/X11/config

and indeed, in line 258 of NetBSD.cf:

    254 # elif defined(AMD64Architecture)
    255 #  undef OptimizedCDebugFlags
    256 #  define OptimizedCDebugFlags  -O2
    257 #  define ServerOSDefines       XFree86ServerOSDefines -DDDXTIME
    258 #  define NetBSDMachineDefines  -D__AMD64__
    259 # else

Why does work.x86_64/.tools/bin/imake set NetBSDMachineDefines to ""
even though it may be set to something else in NetBSD.cf ?

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert      -- You author it, and I'll reader it.
\X/ rhialto/at/xs4all.nl        -- Cetero censeo "authored" delendum esse.