From owner-freebsd-arch@FreeBSD.ORG Wed Oct 8 09:33:19 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCBB316A4B3; Wed, 8 Oct 2003 09:33:19 -0700 (PDT) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [204.127.198.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id A361443FCB; Wed, 8 Oct 2003 09:33:14 -0700 (PDT) (envelope-from adam@migus.org) Received: from garple.migus.org ([68.55.83.94]) by comcast.net (rwcrmhc11) with ESMTP id <2003100816331401300qttede>; Wed, 8 Oct 2003 16:33:14 +0000 Received: by garple.migus.org (Postfix, from userid 80) id C84558FC40; Wed, 8 Oct 2003 12:33:13 -0400 (EDT) Received: from 204.254.155.35 (SquirrelMail authenticated user adam) by mail.migus.org with HTTP; Wed, 8 Oct 2003 12:33:13 -0400 (EDT) Message-ID: <51457.204.254.155.35.1065630793.squirrel@mail.migus.org> In-Reply-To: <20031009014522.L5476@gamplex.bde.org> References: <20030925092319.H5418@gamplex.bde.org><49939.204.254.155.35.1064593320.squirrel@mail.migus.org> <20030927080420.N18558@gamplex.bde.org> <49955.192.168.4.2.1065074430.squirrel@mail.migus.org> <20031008212302.T4729@gamplex.bde.org> <51310.204.254.155.35.1065622332.squirrel@mail.migus.org> <20031009014522.L5476@gamplex.bde.org> Date: Wed, 8 Oct 2003 12:33:13 -0400 (EDT) From: "Adam C. Migus" To: "Bruce Evans" User-Agent: SquirrelMail/1.4.1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal cc: Stefan Farfeleder cc: arch@freebsd.org Subject: Re: sys/conf/DEFAULT[S] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2003 16:33:19 -0000 Bruce Evans said: > On Wed, 8 Oct 2003, Adam C. Migus wrote: > >> Bruce Evans said: >> > Stefan's version requires SEMICOLON: >> > % + INCLUDE ID SEMICOLON >> > % + = { include($2, 0); }; >> > % + | >> > ... >> > I lost your examples showing that this doesn't quite work. What >> is >> > the >> > problem with it? >> ... >> WRT Stefan's solution, simply nest two includes on the first line, >> like so: >> >> head -1 KERNEL >> include SUB1 >> >> head -1 SUB1 >> include SUB2 >> >> This will cause config to fail in the same manner it did before, >> with his patch. > > Er, but this works for me. I test with SUB2 having the following: > 1) include GENERIC > 2) same contents as GENERIC > 3) same contents as GENERIC except for no comment lines at > beginning. > > Bruce > Here's my broken config (with Stefan's patch) compile, run, error, output and config exerpts: root@caster:ttyp4:config# make clean rm -f config config.o main.o lang.o mkmakefile.o mkheaders.o mkoptions.o config.8.gz config.8.cat.gz lang.c config.c y.tab.c y.tab.h root@caster:ttyp4:config# make CFLAGS="`make -V CFLAGS` -DYYDEBUG=1" Warning: Object directory not changed from original /src/freebsd/CURRENT/src/usr.sbin/config yacc -d config.y cp y.tab.c config.c cc -O -pipe -mcpu=pentiumpro -I. -I/src/freebsd/CURRENT/src/usr.sbin/config -Wsystem-headers -Werror -DYYDEBUG=1 -c config.c cc -O -pipe -mcpu=pentiumpro -I. -I/src/freebsd/CURRENT/src/usr.sbin/config -Wsystem-headers -Werror -DYYDEBUG=1 -c main.c lex -t lang.l > lang.c cc -O -pipe -mcpu=pentiumpro -I. -I/src/freebsd/CURRENT/src/usr.sbin/config -Wsystem-headers -Werror -DYYDEBUG=1 -c lang.c cc -O -pipe -mcpu=pentiumpro -I. -I/src/freebsd/CURRENT/src/usr.sbin/config -Wsystem-headers -Werror -DYYDEBUG=1 -c mkmakefile.c cc -O -pipe -mcpu=pentiumpro -I. -I/src/freebsd/CURRENT/src/usr.sbin/config -Wsystem-headers -Werror -DYYDEBUG=1 -c mkheaders.c cc -O -pipe -mcpu=pentiumpro -I. -I/src/freebsd/CURRENT/src/usr.sbin/config -Wsystem-headers -Werror -DYYDEBUG=1 -c mkoptions.c cc -O -pipe -mcpu=pentiumpro -I. -I/src/freebsd/CURRENT/src/usr.sbin/config -Wsystem-headers -Werror -DYYDEBUG=1 -o config config.o main.o lang.o mkmakefile.o mkheaders.o mkoptions.o -ll gzip -cn config.8 > config.8.gz root@caster:ttyp4:config# cp config /tmp root@caster:ttyp4:config# cd ../../sys/i386/conf root@caster:ttyp4:conf# export YYDEBUG=1 root@caster:ttyp4:conf# /tmp/config DISKLESS_SMP_MAC yydebug: state 0, reducing by rule 3 (Many_specs :) yydebug: after reduction, shifting from state 0 to state 2 yydebug: state 2, reading 274 (INCLUDE) yydebug: state 2, shifting to state 19 yydebug: state 19, reading 275 (ID) yydebug: state 19, shifting to state 46 yydebug: state 46, reading 273 (SEMICOLON) yydebug: state 46, shifting to state 56 yydebug: state 56, reducing by rule 20 (Config_spec : INCLUDE ID SEMICOLON) yydebug: after reduction, shifting from state 2 to state 22 yydebug: state 22, reading 274 (INCLUDE) config: SMP_MAC:1: syntax error root@caster:ttyp4:conf# head -3 DISKLESS_SMP_MAC SMP_MAC MAC ==> DISKLESS_SMP_MAC <== include SMP_MAC ident DISKLESS_SMP_MAC ==> SMP_MAC <== include MAC #ident SMP_MAC ==> MAC <== # # MAC -- Generic kernel configuration file for FreeBSD/i386 w/MAC # root@caster:ttyp4:conf# -- Adam - (http://people.migus.org/~amigus/) Migus Dot Org - (http://www.migus.org/)