From dc24ddd41e8f19486380221cdd30ad699719d0d2 Mon Sep 17 00:00:00 2001 From: ru Date: Wed, 17 Apr 2002 13:49:29 +0000 Subject: Don't include bsd.own.mk from sys.mk, this makes it impossible to use ``.if defined()'' inside bsd.own.mk to test for defines in individual makefiles. For example, setting DEBUG_FLAGS in Makefile didn't take the desired effect on the STRIP assignment. Added bsd.init.mk (like in NetBSD) that handles the inclusion of ../Makefile.inc and bsd.own.mk from all bsd.*.mk files that "build something". Back out bsd.own.mk,v 1.15: moved OBJFORMAT initialization back to sys.mk (several source tree makefiles want to check it early) and removed MACHINE_ARCH initialization (it's hard to see from looking at the commitlogs what the problem was at the time, but now it serves no purpose). Prohibit the direct inclusion of bsd.man.mk and bsd.libnames.mk. Protect bsd.obj.mk from repetitive inclusion. Prohibiting the direct inclusion of bsd.obj.mk might be a good idea too. --- share/mk/sys.mk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'share/mk/sys.mk') diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 89ef00c..030c852 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -259,5 +259,14 @@ __MAKE_CONF?=/etc/make.conf .include .endif +# +# The build tools are indirected by /usr/bin/objformat which determines the +# object format from the OBJFORMAT environment variable and if this is not +# defined, it reads /etc/objformat. +# +.if exists(/etc/objformat) && !defined(OBJFORMAT) +.include "/etc/objformat" +.endif -.include +# Default executable format +OBJFORMAT?= elf -- cgit v1.1