From owner-cvs-all Fri Oct 9 20:38:54 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA28361 for cvs-all-outgoing; Fri, 9 Oct 1998 20:38:54 -0700 (PDT) (envelope-from owner-cvs-all) Received: from spinner.netplex.com.au (spinner.netplex.com.au [202.12.86.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA28329; Fri, 9 Oct 1998 20:38:37 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from spinner.netplex.com.au (localhost [127.0.0.1]) by spinner.netplex.com.au (8.9.1/8.9.1/Spinner) with ESMTP id LAA13373; Sat, 10 Oct 1998 11:09:42 +0800 (WST) (envelope-from peter@spinner.netplex.com.au) Message-Id: <199810100309.LAA13373@spinner.netplex.com.au> X-Mailer: exmh version 2.0.2 2/24/98 To: Robert Nordier cc: skynyrd@opus.cts.cwu.edu (Chris Timmons), rnordier@FreeBSD.ORG, committers@FreeBSD.ORG Subject: Re: cvs commit: src/sys/boot/i386 Makefile In-reply-to: Your message of "Sat, 10 Oct 1998 03:06:34 +0200." <199810100106.DAA06219@ceia.nordier.com> Date: Sat, 10 Oct 1998 11:09:41 +0800 From: Peter Wemm Sender: owner-cvs-all@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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 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 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