From mboxrd@z Thu Jan 1 00:00:00 1970 From: Graeme Russ Date: Mon, 11 Apr 2011 23:11:23 +1000 Subject: [U-Boot] [RFC] Centralise documentation of CONFIG_ options (and finding unused ones) Message-ID: <4DA2FDFB.1000901@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi All, As a bit of a lark, I ran the following shell command: grep -r -h -o -G "#define CONFIG.*" * | \ sed 's/#define[ \t]*//' | \ sed 's/^\([A-Za-z0-9_]*\).*/\1/' | \ sort -u > README.configuration.options I then ran the result through the following script into README.configuration.options.counted #!/bin/bash INPUT=doc/README.configuration.options #!/bin/bash INPUT=doc/README.configuration.options for i in `cat $INPUT` do grep -rcs --exclude-dir=doc '\<'${i}'\>' * | \ cut -d : -f 2 | \ awk '{sum+=$1} END {printf("%d\t%s\n", sum, f);}' f=$i done The result? 5539 lines of pure configuration option goodness :) Here's a little snippet: 6 CONFIG_100MHz 8 CONFIG_133MHZ_DRAM 7 CONFIG_300MHz 13 CONFIG_405 24 CONFIG_405CR 88 CONFIG_405EP 81 CONFIG_405EX