# HG changeset patch # User Rob Landley # Date 1393641976 21600 # Node ID 1c4c893d4e725af76ccbd014088e13a23104fa01 # Parent f170f978e81e060252d25b2244dc1561f65903c4 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... diff -r f170f978e81e -r 1c4c893d4e72 scripts/make.sh --- 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"