Module Name: src
Committed By: christos
Date: Tue Dec 31 18:46:09 UTC 2013
Modified Files:
src/share/mk: bsd.own.mk sys.mk
Log Message:
redo the ctf stuff to handle the USETOOLS=never case correctly and explain
how.
To generate a diff of this commit:
cvs rdiff -u -r1.759 -r1.760 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.118 -r1.119 src/share/mk/sys.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.759 src/share/mk/bsd.own.mk:1.760
--- src/share/mk/bsd.own.mk:1.759 Mon Dec 16 14:06:41 2013
+++ src/share/mk/bsd.own.mk Tue Dec 31 13:46:09 2013
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.own.mk,v 1.759 2013/12/16 19:06:41 skrll Exp $
+# $NetBSD: bsd.own.mk,v 1.760 2013/12/31 18:46:09 christos Exp $
# This needs to be before bsd.init.mk
.if defined(BSD_MK_COMPAT_FILE)
@@ -481,7 +481,8 @@ CXX= ${TOOL_CXX.${ACTIVE_CXX}}
FC= ${TOOL_FC.${ACTIVE_FC}}
OBJC= ${TOOL_OBJC.${ACTIVE_OBJC}}
-.if exists(/usr/bin/${TOOL_CTFCONVERT}) || exists(${TOOL_CTFCONVERT})
+# Override with tools versions if needed
+.if exists(${TOOL_CTFCONVERT}) && exists(${TOOL_CTFMERGE})
CTFCONVERT= ${TOOL_CTFCONVERT}
CTFMERGE= ${TOOL_CTFMERGE}
.endif
Index: src/share/mk/sys.mk
diff -u src/share/mk/sys.mk:1.118 src/share/mk/sys.mk:1.119
--- src/share/mk/sys.mk:1.118 Fri Nov 1 13:07:37 2013
+++ src/share/mk/sys.mk Tue Dec 31 13:46:09 2013
@@ -1,4 +1,4 @@
-# $NetBSD: sys.mk,v 1.118 2013/11/01 17:07:37 christos Exp $
+# $NetBSD: sys.mk,v 1.119 2013/12/31 18:46:09 christos Exp $
# @(#)sys.mk 8.2 (Berkeley) 3/21/94
#
# This file contains the basic rules for make(1) and is read first
@@ -46,9 +46,12 @@ LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${L
CTFFLAGS ?= -g -L VERSION
CTFMFLAGS ?= -g -t -L VERSION
-# We don't define these here, we let the bsd.own.mk to do it
-#CTFCONVERT ?= ctfconvert
-#CTFMERGE ?= ctfmerge
+# We have to define these here, because if we don't the rules below will
+# not work
+.if exists(/usr/bin/ctfconvert) && exists(/usr/bin/ctfmerge)
+CTFCONVERT ?= ctfconvert
+CTFMERGE ?= ctfmerge
+.endif
CXX?= c++
CXXFLAGS?= ${CFLAGS:N-Wno-traditional:N-Wstrict-prototypes:N-Wmissing-prototypes:N-Wno-pointer-sign:N-ffreestanding:N-std=gnu[0-9][0-9]:N-Wold-style-definition:N-Wno-format-zero-length}