aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2009-01-30 16:10:55 -0600
committerRob Landley <rob@landley.net>2009-01-30 16:10:55 -0600
commit1193a029f76b0825dd8cf417506a06b1937099d6 (patch)
tree11b33c8e96433df75116d6ef5322a1417ce00d61 /scripts
parent53dda1a9cfc453fa5b2e5ff0ed58f8a9c99749a9 (diff)
downloadtoybox-1193a029f76b0825dd8cf417506a06b1937099d6.tar.gz
Re-wordwrap and reorder the .config->config.h sed script. (No real changes, just one command/line in a clearer order.)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/make.sh26
1 files changed, 18 insertions, 8 deletions
diff --git a/scripts/make.sh b/scripts/make.sh
index e9c2a965..89eb3c61 100755
--- a/scripts/make.sh
+++ b/scripts/make.sh
@@ -62,14 +62,24 @@ echo "Make generated/config.h from .config."
# 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: