Subject: toolchain/18248: -I (space) (path) syntax not supported by
To: None <>
From: None <>
List: netbsd-bugs
Date: 09/09/2002 19:30:50
>Number:         18248
>Category:       toolchain
>Synopsis:       -I (space) (path) syntax not supported by
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 09 19:31:00 PDT 2002
>Originator:     Andrew White
>Release:        1.5.3
NetBSD thor 1.5.3 NetBSD 1.5.3 (GENERIC) #0: Tue Aug 27 17:42:36 EST 2002     awhite@thor:/usr/src/sys/usr/src/sys/arch/i386/compile/GENERIC i386
In, the dependency code uses the pattern ${CXXFLAGS:M-[ID]*} to match and extract include paths.  Unfortunately, this works fine for -I/this/path, but breaks when the equally legal (to the compiler) -I /this/path is used.  Instead, you get mkdep -a -I -I -I ...
Add include paths to COPTS using -I /this/path syntax, and make depend.
Pattern is obviously too restrictive, but fix is not obvious.  Other alternatives may be available, including a mechanism to abort with a useful error message when a -I /this/path is used, allowing the user to edit makefiles.  Of course, this negatively impacts portability.