From c5b23e22498e1898834e756f76473134dd582b15 Mon Sep 17 00:00:00 2001 From: rillig Date: Sun, 24 Jan 2021 16:55:09 +0000 Subject: [PATCH] lint: make path to lint data configurable This is needed for strict bool mode, to make the custom header stdbool.h available when lint is run as part of build.sh. --- tools/lint/Makefile | 4 ++-- usr.bin/xlint/xlint/pathnames.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/lint/Makefile b/tools/lint/Makefile index 97209c519695..1b3391893dde 100644 --- a/tools/lint/Makefile +++ b/tools/lint/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.6 2021/01/24 16:22:55 rillig Exp $ +# $NetBSD: Makefile,v 1.7 2021/01/24 16:55:09 rillig Exp $ HOSTPROGNAME= ${MACHINE_GNU_PLATFORM}-lint HOST_SRCDIR= usr.bin/xlint/xlint HOST_CPPFLAGS= -DPATH_LIBEXEC=\"${TOOLDIR}/libexec\" \ - -DPATH_LIBLINT=\"${TOOLDIR}/libdata/lint\" \ + -DPATH_LINTLIB=\"${TOOLDIR}/libdata/lint\" \ -DTARGET_PREFIX=\"${MACHINE_GNU_PLATFORM}-\" diff --git a/usr.bin/xlint/xlint/pathnames.h b/usr.bin/xlint/xlint/pathnames.h index 692d223663da..17bfca3317e1 100644 --- a/usr.bin/xlint/xlint/pathnames.h +++ b/usr.bin/xlint/xlint/pathnames.h @@ -1,4 +1,4 @@ -/* $NetBSD: pathnames.h,v 1.5 2021/01/16 16:03:46 rillig Exp $ */ +/* $NetBSD: pathnames.h,v 1.6 2021/01/24 16:55:09 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -40,7 +40,9 @@ #define PATH_USRBIN "/usr/bin" /* default library search path */ +#ifndef PATH_LINTLIB #define PATH_LINTLIB "/usr/libdata/lint" +#endif /* overridden system headers */ #define PATH_STRICT_BOOL_INCLUDE PATH_LINTLIB "/strict-bool"