Mercurial > hg > toybox
changeset 1210:1c4c893d4e72 draft
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...
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 28 Feb 2014 20:46:16 -0600 |
parents | f170f978e81e |
children | 40e0f7b09b77 |
files | scripts/make.sh |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/make.sh Mon Feb 24 23:34:43 2014 -0600 +++ b/scripts/make.sh Fri Feb 28 20:46:16 2014 -0600 @@ -95,10 +95,10 @@ # 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"