From f2743a5b0046069104c3afd9b14091dfa71690a4 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 9 Jan 2014 11:02:46 +0100 Subject: build system: stop including alloca.h, stdlib.h provides it Signed-off-by: Denys Vlasenko --- scripts/basic/docproc.c | 2 +- scripts/basic/fixdep.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c index b12569832..7f21443c1 100644 --- a/scripts/basic/docproc.c +++ b/scripts/basic/docproc.c @@ -39,7 +39,7 @@ #include #include #include -#include +//bbox disabled: #include /* exitstatus is used to keep track of any failing calls to kernel-doc, * but execution continues. */ diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 165a8c39d..19f82df09 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -113,7 +113,7 @@ #include #include #include -#include +//bbox disabled: #include /* bbox: not needed #define INT_CONF ntohl(0x434f4e46) -- cgit v1.2.3-55-g6feb From 9b76f895bcd50c97df66c7e0192e045245eb519f Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Fri, 10 Jan 2014 11:54:37 +0100 Subject: build system: fix non-portable sed constructs. This includes proper line breaks for labels and closing braces, and removing non-portable \n and \t in s/// functions. Signed-off-by: Matthias Andree Signed-off-by: Denys Vlasenko --- scripts/gen_build_files.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/gen_build_files.sh b/scripts/gen_build_files.sh index 0989b2fe5..e8fa831be 100755 --- a/scripts/gen_build_files.sh +++ b/scripts/gen_build_files.sh @@ -31,7 +31,12 @@ generate() # copy stdin to stdout cat # print everything after INSERT line - sed -n '/^INSERT$/ { :l; n; p; bl }' "${src}" + sed -n '/^INSERT$/ { + :l + n + p + bl + }' "${src}" } >"${dst}.tmp" if ! cmp -s "${dst}" "${dst}.tmp"; then gen "${dst}" @@ -52,7 +57,12 @@ sed -n 's@^//applet:@@p' "$srctree"/*/*.c "$srctree"/*/*/*.c \ # We add line continuation backslash after each line, # and insert empty line before each line which doesn't start # with space or tab -sed -n -e 's@^//usage:\([ \t].*\)$@\1 \\@p' -e 's@^//usage:\([^ \t].*\)$@\n\1 \\@p' \ +TAB="$(printf '\tX')" +TAB="${TAB%X}" +LF="$(printf '\nX')" +LF="${LF%X}" +sed -n -e 's@^//usage:\([ '"$TAB"'].*\)$@\1 \\@p' \ + -e 's@^//usage:\([^ '"$TAB"'].*\)$@\'"$LF"'\1 \\@p' \ "$srctree"/*/*.c "$srctree"/*/*/*.c \ | generate \ "$srctree/include/usage.src.h" \ -- cgit v1.2.3-55-g6feb