From owner-freebsd-arch Fri Jul 26 8:37:10 2002 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 61AF137B407 for ; Fri, 26 Jul 2002 08:37:07 -0700 (PDT) Received: from smtp.noos.fr (claudel.noos.net [212.198.2.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 671BB43E6E for ; Fri, 26 Jul 2002 08:37:04 -0700 (PDT) (envelope-from root@gits.dyndns.org) Received: (qmail 34991556 invoked by uid 0); 26 Jul 2002 15:37:02 -0000 Received: from unknown (HELO gits.gits.dyndns.org) ([212.198.229.153]) (envelope-sender ) by 212.198.2.83 (qmail-ldap-1.03) with SMTP for ; 26 Jul 2002 15:37:02 -0000 Received: from gits.gits.dyndns.org (a98oflux7e3tmu1p@localhost [127.0.0.1]) by gits.gits.dyndns.org (8.12.5/8.12.5) with ESMTP id g6QFb2wZ093710; Fri, 26 Jul 2002 17:37:02 +0200 (CEST) (envelope-from root@gits.dyndns.org) Received: (from root@localhost) by gits.gits.dyndns.org (8.12.5/8.12.5/Submit) id g6QFb2t8093705; Fri, 26 Jul 2002 17:37:02 +0200 (CEST) (envelope-from root) Date: Fri, 26 Jul 2002 17:37:01 +0200 From: Cyrille Lefevre To: Ruslan Ermilov Cc: Bruce Evans , Doug Barton , Mike Barcroft , arch@FreeBSD.ORG, Juli Mallett Subject: Re: Standardized make options (or no doesn't always mean no) Message-ID: <20020726153701.GA93459@gits.dyndns.org> References: <3D02AB11.F373AB4@FreeBSD.org> <20020609123557.X21758-100000@gamplex.bde.org> <20020725070145.GE56367@sunbay.com> <20020725165940.GF58642@gits.dyndns.org> <20020725170940.GA40574@sunbay.com> <20020726135923.GA89959@gits.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020726135923.GA89959@gits.dyndns.org> User-Agent: Mutt/1.3.99i Organization: ACME X-Face: V|+c;4!|B?E%BE^{E6);aI.[< List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Jul 26, 2002 at 03:59:23PM +0200, Cyrille Lefevre wrote: [snip] > find . -name 'Makefile*' -o -name 'bsd.*.mk' | > egrep -v '[./](new|old)[/:]' | > xargs egrep '(^\. *if(n?def)|defined) *\(?NO[^_]' /dev/null >| /tmp/no1 > sed -E -e 's/\.if(n?def)? //;s/exists *([^)]+)//g;s/ *[|&=][|&=] *//g' \ > -e 's/!? *defined//g;s/[()\\"]/ /g;s/\${MACHINE_ARCH}//g' \ > -e 's/ i386//g;s/alpha//g;s/:/ /g;s/ +/ /g;s|^\./||' /tmp/no1 >| /tmp/no2 > awk '{for(i=2;i<=NF;i++)if($i~/^NO[^_]/)print $1,$i}' /tmp/no2 | > sort -u >| /tmp/no3 > awk '{for(i=2;i<=NF;i++)if($i~/^NO[^_]/)print $i,$1}' /tmp/no2 | > sort -u >| /tmp/no4 > awk '$1!=f{if(f)print f;f=$1;printf "sed -E -i.bak"} > {v=$2;sub("NO","&_",v); > printf " -e %cs/%s([^A-Z_]|$)/%s\\1/g%c ", 39, $2, v, 39} > END{print f}' /tmp/no3 >| /tmp/no5 > awk '$1!=v{if(v){sub("NO","",v);print "_NO_VARS+=\t"v};v=$1} > {print "#", $2} > END{sub("NO","",v);print "_NO_VARS+=\t"v}' /tmp/no4 >| /tmp/no6 > sed -E -e 's/([^A-Z_])(ALIAS|I4B|KLDLOAD|NAT|NETGRAPH|RADIUS|SUID)([^A-Z_]|$)/\1NO\2 PPP_NO\2\3/' \ > -e 't e' -e b -e :e -e 's/_NO_VARS/_ASSOC_VARS/' /tmp/no6 >| /tmp/no7 > > no5 contains the sed commands to replace every occurences of NOFOO > to NO_FOO in every files > no6 contains the list (_NO_VARS) of NO variables for the above knob > no7 same a no6 except that NOFOO ppp variables have been renamed to PPP_NOFOO > and put in _ASSOC_VARS forgive me about no7, let's PPP vars as they are. oops! forgot about var assignments... egrep -v '[./](new|old|obsolete|bak[1-9])[/:]' | xargs egrep "^( *# *)?NO[^_]+" /dev/null | # NOINSTALLLIB is obsolete -- found in ./lib/libpam/modules/Makefile.inc egrep -v 'NORMAL|NOTES?:|NOLIGFLAG|NOVARARGS|NONAP|NOLOG|NOASM|NOINSTALLLIB|NOTYET|NOPUSH' >| /tmp/no11 sed -E -e 's|^\./||;s/[+?:!]?=.*//;s/[#:]/ /g;s/ +/ /g' /tmp/no11 >| /tmp/no22 awk '{for(i=2;i<=NF;i++)if($i~/^NO[^_]/)print $1,$i}' /tmp/no22 | sort -u >| /tmp/no33 awk '{for(i=2;i<=NF;i++)if($i~/^NO[^_]/)print $i,$1}' /tmp/no22 | sort -u >| /tmp/no44 awk '$1!=f{if(f)print f;f=$1;printf "sed -E -i.bak2"} {v=$2;sub("NO","&_",v); printf " -e %cs/%s([^A-Z_]|$)/%s\\1/g%c ", 39, $2, v, 39} END{print f}' /tmp/no33 >| /tmp/no55 awk '$1!=v{if(v){sub("NO","",v);print "_NO_VARS+=\t"v};v=$1} {print "#", $2} END{sub("NO","",v);print "_NO_VARS+=\t"v}' /tmp/no44 >| /tmp/no66 no55 contains the sed commands to replace every occurences of NOFOO= to NO_FOO in every files no66 same as no6 but, for info only wait some time the build world finish... and I'll send you THE diff :) Cyrille. -- Cyrille Lefevre mailto:cyrille.lefevre@laposte.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message