Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Oct 1998 11:09:41 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Robert Nordier <rnordier@nordier.com>
Cc:        skynyrd@opus.cts.cwu.edu (Chris Timmons), rnordier@FreeBSD.ORG, committers@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/boot/i386 Makefile 
Message-ID:  <199810100309.LAA13373@spinner.netplex.com.au>
In-Reply-To: Your message of "Sat, 10 Oct 1998 03:06:34 %2B0200." <199810100106.DAA06219@ceia.nordier.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Nordier wrote:
> Chris Timmons wrote:
[..]
> > --- crt0.o ---
> > ld  -elf -i -o crt0.o btxcsu.o btxsys.o btxv86.o 
> > btxcsu.o: file not recognized: File format not recognized
> > *** Error code 1
> > 1 error
[..]
> 
> Yes.  The problem is that make world is lumping the old and new
> boot code together as "legacy boot", but they require a different
> OBJFORMAT.

By the way, it is possible to set $OBJFORMAT (the environment variable) in 
a Makefile.  This might be an idea for sys/boot/Makefile and
sys/i386/boot/Makefile

Is this worth doing?  For example:

Index: boot/i386/Makefile
===================================================================
RCS file: /home/ncvs/src/sys/boot/i386/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile	1998/10/09 23:30:16	1.4
+++ Makefile	1998/10/10 03:31:05
@@ -1,7 +1,7 @@
-SUBDIR=		boot0
+# $Id$
 
-.if ${OBJFORMAT} == elf
-SUBDIR+=	btx libi386 loader
-.endif
+.MAKEFLAGS:	OBJFORMAT=elf
+
+SUBDIR+=	boot0 btx libi386 loader
 
 .include <bsd.subdir.mk>
Index: i386/boot/Makefile
===================================================================
RCS file: /home/ncvs/src/sys/i386/boot/Makefile,v
retrieving revision 1.29
diff -u -r1.29 Makefile
--- Makefile	1997/07/10 21:58:43	1.29
+++ Makefile	1998/10/10 03:31:05
@@ -1,5 +1,9 @@
 #	$Id: Makefile,v 1.29 1997/07/10 21:58:43 joerg Exp $
 
+.MAKEFLAGS:	OBJFORMAT=out
+
+.if !defined(NOAOUT)
 SUBDIR=	biosboot cdboot dosboot kzipboot netboot rawboot
+.endif
 
 .include <bsd.subdir.mk>

This basically causes make to pretend that was appended onto the end of 
the command line.  It gets set as ${OBJFORMAT} and is exported.  Setting 
${OBJFORMAT} is not much use in many places because sys.mk has already 
made decisions.  But it's fine for passing down to sub directories.

DISCLAIMER:  I used this ages ago, I don't know for sure if it still 
works.  I have not tested it.

Cheers,
-Peter






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810100309.LAA13373>