Subject: successfull unprived xsrc builds and next cross-build xsrc!
To: NetBSD X11 Technical Discussion List <tech-x11@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: tech-x11
Date: 09/13/2003 03:23:47
For the past few weeks I've been using some minor modifications to
facilitate building xsrc in $MAKEOBJDIRPREFIX and installing into
$DESTDIR with an "unprived" install (-U -M METALOG) using the following
procedure:

       cd $MAKEOBJDIRPREFIX
       mkdir xsrc
       cd xsrc
       lndir /usr/xsrc
       unset MAKEOBJDIRPREFIX MAKEOBJDIR
       make all
       nbmake-$MACHINE install
       nbmake-$MACHINE INSTALL_DONE=1 release

IIRC the only critical change within xsrc to making this work is in
config/cf/:

 #ifdef  InstallCmd
 # undef  InstallCmd
-# define InstallCmd 		/usr/bin/install
 #endif
 #define StripInstalledPrograms	YES
+/*
+ * NOTE:  '-c' is still used via InstallFlags from Imake.tmpl
+ */
+#define InstallCmd 		install -U -M $(DESTDIR)/METALOG.X11


(I get rid of StripInstalledPrograms too, but that's a separate issue)

I also modified maketars a wee bit (I'm building for netbsd-1-6) and I
use a fully fleshed out copy of the mtree file from
pkgsrc/mk/NetBSD.x11.dist.

Initially I did these builds only in xsrc/xc on sparc and alpha.  Today
I finished migrating my mods from xsrc/xc to xsrc/xfree/xc and finishing
a build on i386 (well the final release tars are not finished yet, but
assuming no files are missing from what's given in the sets files....).

Now comes the next obvious change to the build procedure:

Has anyone tried using the CrossCompileDir stuff in Xfree86 (xsrc/xfree)
with the tools built by "build.sh -t"?

It looks as though the biggest stumbling block to simply pointing
CrossCompileDir at $TOOLDIR is that the tools are not given their
"normal" names.  Although adding more #defines can solve the problem I'm
wondering if maybe there's a simpler way....

Of course I'd love to be able to cross-build for sparc on i386 or on
alpha, but that probably means either migrating the CrossCompileDir
logic back to xsrc/xc, or else throwing sparc over to xsrc/xfree/xc.

Oh, and has anyone tried using 'make -j 2' (or more) in xsrc?  I don't
dare at the moment!  ;-)

-- 
						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>          Secrets of the Weird <woods@weird.com>