Subject: Re: CVS commit: src/usr.sbin/config
To: None <thorpej@netbsd.org>
From: None <itojun@iijlab.net>
List: tech-kern
Date: 06/05/2004 10:22:29
>Module Name:	src
>Committed By:	thorpej
>Date:		Fri Jun  4 07:28:26 UTC 2004
>
>Modified Files:
>	src/usr.sbin/config: defs.h gram.y main.c mkmakefile.c
>
>Log Message:
>Add "conditional appending makeoptions".  Syntax is:
>
>makeoptions selector FOO+=bar
>
>"selector" may be anything used as a key in the selecttab, i.e. an option,
>a "device" name, an "attach" name, a file system, etc.
>
>Semantics: FOO+=bar when the selector is set.  For example, if you have:
>
>makeoptions pickle CPPFLAGS+=-I${S}/picklesrc
>
>then "options PICKLE" will cause "CPPFLAGS+=-I${S}/picklesrc" to be
>added to the Makefile.
>
>Suggested by Matt Thomas.

	i'm trying to use this "makeoptions" feature, but no joy.
	are there any restrictions in location of "makeoptions"?

itojun


yydebug: after reduction, shifting from state 10 to state 20
yydebug: state 20, reading 284 (MAKEOPTIONS)
yydebug: state 20, error recovery shifting to state 26
yydebug: state 26, error recovery discards token 284 (MAKEOPTIONS)
yydebug: state 26, reading 305 (WORD)
yydebug: state 26, error recovery discards token 305 (WORD)
yydebug: state 26, reading 305 (WORD)
yydebug: state 26, error recovery discards token 305 (WORD)
yydebug: state 26, reading 295 (PLUSEQ)
yydebug: state 26, error recovery discards token 295 (PLUSEQ)
yydebug: state 26, reading 304 (QSTRING)
yydebug: state 26, error recovery discards token 304 (QSTRING)
yydebug: state 26, reading 10 ('\n')
yydebug: state 26, shifting to state 58
yydebug: state 58, reducing by rule 50 (dev_def : error '\n')

../../../../net/files.pf:16: syntax error
*** Stop.


--- sys/net/files.pf
#	$NetBSD$

defpseudo pf:		ifnet
defpseudo pflog:	ifnet
defpseudo pfsync:	ifnet

file	dist/pf/net/pf.c		pf		needs-flag
file	dist/pf/net/pf_norm.c		pf
file	dist/pf/net/pf_if.c		pf
file	dist/pf/net/pf_ioctl.c		pf
file	dist/pf/net/pf_table.c		pf
file	dist/pf/net/pf_osfp.c		pf
file	dist/pf/net/if_pflog.c		pflog		needs-flag
file	dist/pf/net/if_pfsync.c		pfsync		needs-flag

makeoptions	pf	CPPFLAGS+="-I$S/dist/pf"