diff --git a/Makefile b/Makefile index 3fc28531dc05..1027ac70b610 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 1.205 1998/07/07 09:59:48 bde Exp $ +# $Id: Makefile,v 1.206 1998/08/02 09:24:59 wosch Exp $ # # While porting to the another architecture include the bootstrap instead # of the normal build. @@ -42,6 +42,16 @@ .MAKEFLAGS:= -m ${.CURDIR}/share/mk ${.MAKEFLAGS} .endif +# +# Pick up any macros that are defined in the src-relative bsd.own.mk +# but not in the "system" bsd.own.mk. The "system" version has +# unfortunately already been included by the "system" sys.mk, so this +# only works for new macros. First undefine old macros that cause +# problems. +# +.undef LIBDIR +.include "${.CURDIR}/share/mk/bsd.own.mk" + # Put initial settings here. SUBDIR= @@ -366,7 +376,7 @@ reinstall: @echo " Installing everything.." @echo "--------------------------------------------------------------" cd ${.CURDIR}; ${MAKE} install -.if !defined(MACHINE_ARCH) || ${MACHINE_ARCH} == "i386" +.if ${MACHINE_ARCH} == "i386" @echo @echo "--------------------------------------------------------------" @echo " Re-scanning the shared libraries.." @@ -601,7 +611,7 @@ includes: # # Declare tools if they are not required on all architectures. # -.if !defined(MACHINE_ARCH) || ${MACHINE_ARCH} == "i386" +.if ${MACHINE_ARCH} == "i386" # aout tools: _aout_ar = usr.bin/ar _aout_as = gnu/usr.bin/as diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 2d01cf1de6ce..9e28b3ed8305 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,4 +1,4 @@ -# $Id: bsd.own.mk,v 1.13 1998/03/19 13:32:43 bde Exp $ +# $Id: bsd.own.mk,v 1.14 1998/05/26 20:12:54 sos Exp $ # # The include file set common variables for owner, # group, mode, and directories. Defaults are in brackets. @@ -29,6 +29,8 @@ # stripped/not-stripped using a single knob. [-s] # # +# BINFORMAT Default executable format. [elf on alpha, aout otherwise] +# # # BINOWN Binary owner. [bin] # @@ -116,6 +118,17 @@ # # INCLUDEDIR Base path for standard C include files [/usr/include] +# This is only here for bootstrapping and is not officially exported +# from here. It has normally already been defined in sys.mk. +MACHINE_ARCH?= i386 + +# Default executable format +.if ${MACHINE_ARCH} == "alpha" +BINFORMAT?= elf +.else +BINFORMAT?= aout +.endif + # Binaries BINOWN?= bin BINGRP?= bin diff --git a/share/mk/sys.mk b/share/mk/sys.mk index aadfb6612ee8..7bac160ce784 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -1,5 +1,5 @@ # from: @(#)sys.mk 8.2 (Berkeley) 3/21/94 -# $Id: sys.mk,v 1.37 1998/06/05 18:38:55 dt Exp $ +# $Id: sys.mk,v 1.38 1998/06/12 10:52:52 peter Exp $ unix ?= We run FreeBSD, not UNIX. @@ -102,14 +102,7 @@ YFLAGS ?= -d # architectures, assume that the version of make being used has an # explicit MACHINE_ARCH setting and treat a missing MACHINE_ARCH # as an i386 architecture. -MACHINE_ARCH?= i386 - -# Default executable format -.if ${MACHINE_ARCH} == "alpha" -BINFORMAT ?= elf -.else -BINFORMAT ?= aout -.endif +MACHINE_ARCH ?= i386 # For tags rule. GTAGSFLAGS= -o