From 170c397576f7d34f41dc7579a3ed5bd6a2f30c1a Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 28 Feb 2014 20:46:16 -0600 Subject: 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... --- scripts/make.sh | 4 ++-- 1 file 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" -- cgit v1.2.3