Mercurial > hg > toybox
changeset 346:d0bf1df83c04
Re-wordwrap and reorder the .config->config.h sed script. (No real changes, just one command/line in a clearer order.)
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 30 Jan 2009 16:10:55 -0600 |
parents | 10618c4c8cf2 |
children | 52e980b216d3 |
files | scripts/make.sh |
diffstat | 1 files changed, 18 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/make.sh Sun Jan 25 16:59:14 2009 -0600 +++ b/scripts/make.sh Fri Jan 30 16:10:55 2009 -0600 @@ -62,14 +62,24 @@ # New ones have '\n' so can replace one line with two without all the branches # and tedious mucking about with hold space. -sed -n -e 's/^# CONFIG_\(.*\) is not set.*/\1/' \ - -e 't notset' -e 'b tryisset' -e ':notset' \ - -e 'h' -e 's/.*/#define CFG_& 0/p' \ - -e 'g' -e 's/.*/#define USE_&(...)/p' -e 'd' -e ':tryisset' \ - -e 's/^CONFIG_\(.*\)=y.*/\1/' -e 't isset' -e 'd' -e ':isset' \ - -e 'h' -e 's/.*/#define CFG_& 1/p' \ - -e 'g' -e 's/.*/#define USE_&(...) __VA_ARGS__/p' .config > \ - generated/config.h || exit 1 +sed -n \ + -e 's/^# CONFIG_\(.*\) is not set.*/\1/' \ + -e 't notset' \ + -e 's/^CONFIG_\(.*\)=y.*/\1/' \ + -e 't isset' \ + -e 'd' \ + -e ':notset' \ + -e 'h' \ + -e 's/.*/#define CFG_& 0/p' \ + -e 'g' \ + -e 's/.*/#define USE_&(...)/p' \ + -e 'd' \ + -e ':isset' \ + -e 'h' \ + -e 's/.*/#define CFG_& 1/p' \ + -e 'g' \ + -e 's/.*/#define USE_&(...) __VA_ARGS__/p' \ + .config > generated/config.h || exit 1 # Extract a list of toys/*.c files to compile from the data in ".config" with # sed, sort, and tr: