From owner-freebsd-config Tue Jan 21 22:54:55 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id WAA18915 for config-outgoing; Tue, 21 Jan 1997 22:54:55 -0800 (PST) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id WAA18910; Tue, 21 Jan 1997 22:54:52 -0800 (PST) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.2/8.7.3) id RAA14007; Wed, 22 Jan 1997 17:23:25 +1030 (CST) From: Michael Smith Message-Id: <199701220653.RAA14007@genesis.atrad.adelaide.edu.au> Subject: Re: Kernel configuration In-Reply-To: from David Nugent at "Jan 22, 97 03:01:22 pm" To: davidn@unique.usn.blaze.net.au (David Nugent) Date: Wed, 22 Jan 1997 17:23:24 +1030 (CST) Cc: msmith@atrad.adelaide.edu.au, hosokawa@mt.cs.keio.ac.jp, jkh@time.cdrom.com, keithl@wakko.gil.net, chat@freebsd.org, config@freebsd.org X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-config@freebsd.org X-Loop: FreeBSD.org Precedence: bulk David Nugent stands accused of saying: > Michael Smith writes: > > option "GPL_MATH_EMULATE" { > > description "Support for systems with no math coprocessor" > > description "(Improved but GPL-licensed version)" > > excludes {option MATH_EMULATE} > > header opt_math_emulate.h > > } > > > > I realise that we're arguing for syntaxes friendly to our chosen > > implementation languages here; I just feel that the SGML-like syntax > > is a lot harder to work with. > > Agreed. The above is pretty clear, less verbose and much easier on > the eyes. I quite like it. :) Thankyou 8) I've been using that style of syntax in our current software for about 18 months now (in case you were wondering whether I'm just making this up as I go along 8), and it's proven to be very useful. Just digressing on the Tcl side for a moment, you define : proc option {name attr} { global Options; lappend Options(list) $name; while {$attr != ""} { set token [lvarpop attr]; switch -- $token { description { lappend Options($name:description) [lvarpop attr]; } ... and then you can test for a description somewhere else : if {[info exists Options($name:description)]} { ... } > One other thing I would add is some form of option "grouping", though, You could group based on the file the options are defined in, or you could add a 'group' attribute, perhaps even with a heirachial syntax if you thought it was worth it. > and perhaps even a way of nesting options (which might even include > support for device-specific flags). Note the 'sio' example, which specifically implies (sic) this; the 'requires {device sio}' means that the option makes no sense without the 'sio' device configured (and thus would ideally not be visible at all). Likewise you could nest options using the 'requires' attribute. > Perhaps the standard metaconfig file could be in English, and > supplimental description files supplied for other languages. That actually sounds fairly reasonable. In situations where only english text was available, the tool could fall back on that as a default. (eg. I distribute a new driver with a .ki file but not a .kim (message translation) file) > David Nugent - Unique Computing Pty Ltd - Melbourne, Australia -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[