diff options
author | Rob Landley <rob@landley.net> | 2014-02-28 20:46:16 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-02-28 20:46:16 -0600 |
commit | 170c397576f7d34f41dc7579a3ed5bd6a2f30c1a (patch) | |
tree | 0e5991dcff1746661ca7405629f6a56dc0ec460e /scripts/make.sh | |
parent | 6ebe03d6169188b71f6d178cef27f8ecb6407821 (diff) | |
download | toybox-170c397576f7d34f41dc7579a3ed5bd6a2f30c1a.tar.gz |
Fix header file generation to not be confused by empty (but non-NULL) option string.
You shouldn't use "" as an option string because a NULL allows toy_init()
to avoid calling the option parsing logic entirely, which lets it drop out
when nothing's using it (ala scripts/single.sh builds). That said, init.c
is currently using a "" option string and a USE_ macro taking advantage
of string concatenation may require a "" option config, so...
Diffstat (limited to 'scripts/make.sh')
-rwxr-xr-x | scripts/make.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/make.sh b/scripts/make.sh index 9a37b960..5ed9df42 100755 --- a/scripts/make.sh +++ b/scripts/make.sh @@ -95,10 +95,10 @@ do # Run result through preprocessor, glue together " " gaps leftover from USE # macros, delete comment lines, print any line with a quoted optstring, # turn any non-quoted opstring (NULL or 0) into " " (because fscanf can't - # handle "" with nothing in it). + # handle "" with nothing in it, and mkflags uses that). ) | ${CROSS_COMPILE}${CC} -E - | \ - sed -n -e 's/" *"//g;/^#/d;s/"/"/p' -e 's/ *$//;s/ [^" ]*$/ " "/p' + sed -n -e 's/" *"//g;/^#/d;t clear;:clear;s/"/"/p;t;s/\( [AB] \).*/\1 " "/p' # Sort resulting line pairs and glue them together into triplets of # command "flags" "allflags" |