Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools Avoid some annoying pitfalls of HOST_CPPFLAGS:=... in ...



details:   https://anonhg.NetBSD.org/src/rev/798c4635c0cd
branches:  trunk
changeset: 516566:798c4635c0cd
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Oct 25 02:23:21 2001 +0000

description:
Avoid some annoying pitfalls of HOST_CPPFLAGS:=... in Makefile.host.

diffstat:

 tools/lint/Makefile     |   6 +++++-
 tools/lint/Makefile.inc |  15 +++++++++++++++
 tools/lint1/Makefile    |   4 +++-
 tools/lint2/Makefile    |   4 +++-
 4 files changed, 26 insertions(+), 3 deletions(-)

diffs (69 lines):

diff -r b260f52b033d -r 798c4635c0cd tools/lint/Makefile
--- a/tools/lint/Makefile       Thu Oct 25 02:22:55 2001 +0000
+++ b/tools/lint/Makefile       Thu Oct 25 02:23:21 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.2 2001/10/24 02:32:56 thorpej Exp $
+#      $NetBSD: Makefile,v 1.3 2001/10/25 02:23:21 thorpej Exp $
 
 XLINT_TARGET_PREFIX=${MACHINE_GNU_PLATFORM}-
 
@@ -8,4 +8,8 @@
 
 .include "${.CURDIR}/../Makefile.host"
 
+HOST_CPPFLAGS+=-DTARGET_PREFIX=\"${XLINT_TARGET_PREFIX}\"
+
+.include "${_CURDIR}/Makefile.inc"
+
 ${TIMESTAMP}: ${SRCS}
diff -r b260f52b033d -r 798c4635c0cd tools/lint/Makefile.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/lint/Makefile.inc   Thu Oct 25 02:23:21 2001 +0000
@@ -0,0 +1,15 @@
+#      $NetBSD: Makefile.inc,v 1.1 2001/10/25 02:23:21 thorpej Exp $
+
+HOST_CPPFLAGS+=-I${.CURDIR}/../lint1/arch/${MACHINE_CPU}
+
+.if ${OBJECT_FMT} == "a.out"
+HOST_CPPFLAGS+=-DTARGET_OBJFMT_AOUT
+.elif ${OBJECT_FMT} == "COFF"
+HOST_CPPFLAGS+=-DTARGET_OBJFMT_COFF
+.elif ${OBJECT_FMT} == "ELF"
+HOST_CPPFLAGS+=-DTARGET_OBJFMT_ELF
+.else
+.BEGIN:
+       @echo "Unrecognized OBJECT_FMT ${OBJECT_FMT}"
+       @false
+.endif
diff -r b260f52b033d -r 798c4635c0cd tools/lint1/Makefile
--- a/tools/lint1/Makefile      Thu Oct 25 02:22:55 2001 +0000
+++ b/tools/lint1/Makefile      Thu Oct 25 02:23:21 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.2 2001/10/24 02:32:56 thorpej Exp $
+#      $NetBSD: Makefile,v 1.3 2001/10/25 02:23:21 thorpej Exp $
 
 XLINT_TARGET_PREFIX=${MACHINE_GNU_PLATFORM}-
 
@@ -8,4 +8,6 @@
 
 .include "${.CURDIR}/../Makefile.host"
 
+.include "${_CURDIR}/../lint/Makefile.inc"
+
 ${TIMESTAMP}: ${SRCS}
diff -r b260f52b033d -r 798c4635c0cd tools/lint2/Makefile
--- a/tools/lint2/Makefile      Thu Oct 25 02:22:55 2001 +0000
+++ b/tools/lint2/Makefile      Thu Oct 25 02:23:21 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.2 2001/10/24 02:32:57 thorpej Exp $
+#      $NetBSD: Makefile,v 1.3 2001/10/25 02:23:21 thorpej Exp $
 
 XLINT_TARGET_PREFIX=${MACHINE_GNU_PLATFORM}-
 
@@ -8,4 +8,6 @@
 
 .include "${.CURDIR}/../Makefile.host"
 
+.include "${_CURDIR}/../lint/Makefile.inc"
+
 ${TIMESTAMP}: ${SRCS}



Home | Main Index | Thread Index | Old Index