From daf286cda559dd1eff0c9db46a4562c0255e76f1 Mon Sep 17 00:00:00 2001
From: Alexander Shishkin
Date: Thu, 15 Jul 2010 17:39:24 +0300
Subject: Fix out-of-tree build's recursion
While doing O=build build I've noticed that it was getting gradually
slower with each invocation. The reason turned out to be that the build
directory was inside the source tree and got recreated inside itself
with all its subdirectories.
This patch changes the behavior so that only the directories with
Kbuild.src or Config.src in them are created in the out-of-tree build
directory. A quick rebuild from scratch revealed no problems with this.
Signed-off-by: Alexander Shishkin
Signed-off-by: Denys Vlasenko
---
scripts/gen_build_files.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'scripts')
diff --git a/scripts/gen_build_files.sh b/scripts/gen_build_files.sh
index 968158758..18c172d5a 100755
--- a/scripts/gen_build_files.sh
+++ b/scripts/gen_build_files.sh
@@ -53,8 +53,8 @@ fi
src="$srctree/$d/Kbuild.src"
dst="$d/Kbuild"
- mkdir -p -- "$d" 2>/dev/null
if test -f "$src"; then
+ mkdir -p -- "$d" 2>/dev/null
#echo " CHK $dst"
s=`sed -n 's@^//kbuild:@@p' -- "$srctree/$d"/*.c`
@@ -73,8 +73,8 @@ fi
src="$srctree/$d/Config.src"
dst="$d/Config.in"
- mkdir -p -- "$d" 2>/dev/null
if test -f "$src"; then
+ mkdir -p -- "$d" 2>/dev/null
#echo " CHK $dst"
s=`sed -n 's@^//config:@@p' -- "$srctree/$d"/*.c`
--
cgit v1.2.3-55-g6feb
From 0f8960542f6f5ae258e72e56ba7296a01a9c10af Mon Sep 17 00:00:00 2001
From: Denys Vlasenko
Date: Mon, 26 Jul 2010 01:35:44 +0200
Subject: *: more empty lines removed. no code changes
Signed-off-by: Denys Vlasenko
---
archival/lzo1x_9x.c | 1 -
e2fsprogs/old_e2fsprogs/ext2fs/rw_bitmaps.c | 1 -
networking/interface.c | 1 -
networking/ntpd.c | 1 -
scripts/find_stray_empty_lines | 7 +++++++
5 files changed, 7 insertions(+), 4 deletions(-)
create mode 100755 scripts/find_stray_empty_lines
(limited to 'scripts')
diff --git a/archival/lzo1x_9x.c b/archival/lzo1x_9x.c
index 0baed5469..483205155 100644
--- a/archival/lzo1x_9x.c
+++ b/archival/lzo1x_9x.c
@@ -675,7 +675,6 @@ static int min_gain(unsigned ahead, unsigned lit1,
static void better_match(const lzo_swd_p swd,
unsigned *m_len, unsigned *m_off)
{
-
if (*m_len <= M2_MIN_LEN)
return;
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/rw_bitmaps.c b/e2fsprogs/old_e2fsprogs/ext2fs/rw_bitmaps.c
index b618acc5b..bba432679 100644
--- a/e2fsprogs/old_e2fsprogs/ext2fs/rw_bitmaps.c
+++ b/e2fsprogs/old_e2fsprogs/ext2fs/rw_bitmaps.c
@@ -266,7 +266,6 @@ errcode_t ext2fs_read_block_bitmap(ext2_filsys fs)
errcode_t ext2fs_read_bitmaps(ext2_filsys fs)
{
-
EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
if (fs->inode_map && fs->block_map)
diff --git a/networking/interface.c b/networking/interface.c
index 659ac36ea..7c6ed82df 100644
--- a/networking/interface.c
+++ b/networking/interface.c
@@ -927,7 +927,6 @@ static void print_bytes_scaled(unsigned long long ull, const char *end)
static void ife_print6(struct interface *ptr)
{
-
FILE *f;
char addr6[40], devname[20];
struct sockaddr_in6 sap;
diff --git a/networking/ntpd.c b/networking/ntpd.c
index d00ee49e5..e9cfdbddd 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -2060,7 +2060,6 @@ int ntpd_main(int argc UNUSED_PARAM, char **argv)
static double
direct_freq(double fp_offset)
{
-
#ifdef KERNEL_PLL
/*
* If the kernel is enabled, we need the residual offset to
diff --git a/scripts/find_stray_empty_lines b/scripts/find_stray_empty_lines
new file mode 100755
index 000000000..58daf2f0c
--- /dev/null
+++ b/scripts/find_stray_empty_lines
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+grep -n -B1 -r $'^\t*}$' . | grep -A1 '.[ch]-[0-9]*-$'
+grep -n -A1 -r $'^\t*{$' . | grep -B1 '.[ch]-[0-9]*-$'
+# or (less surefire ones):
+grep -n -B1 -r $'^\t*}' . | grep -A1 '.[ch]-[0-9]*-$'
+grep -n -A1 -r $'^\t*{' . | grep -B1 '.[ch]-[0-9]*-$'
--
cgit v1.2.3-55-g6feb
From ba2dcccd799963ac74ee92300df494947820608b Mon Sep 17 00:00:00 2001
From: Denys Vlasenko
Date: Mon, 26 Jul 2010 01:49:12 +0200
Subject: *: trailing empty lines removed
Signed-off-by: Denys Vlasenko
---
archival/libunarchive/unxz/README | 1 -
debianutils/Config.src | 1 -
docs/busybox_footer.pod | 1 -
docs/cgi/cl.html | 2 +-
docs/cgi/env.html | 2 +-
docs/cgi/in.html | 2 +-
docs/cgi/interface.html | 2 +-
docs/cgi/out.html | 2 +-
docs/contributing.txt | 2 --
docs/posix_conformance.txt | 1 -
e2fsprogs/old_e2fsprogs/e2fsck.h | 2 --
e2fsprogs/old_e2fsprogs/e2p/ostype.c | 2 --
examples/bootfloppy/display.txt | 1 -
examples/bootfloppy/etc/fstab | 1 -
examples/bootfloppy/etc/inittab | 1 -
examples/bootfloppy/etc/profile | 1 -
examples/bootfloppy/mkrootfs.sh | 1 -
examples/inittab | 1 -
init/reboot.h | 1 -
libbb/README | 1 -
libbb/selinux_common.c | 1 -
networking/libiproute/ll_proto.c | 1 -
scripts/Makefile.host | 1 -
scripts/Makefile.lib | 2 --
scripts/basic/docproc.c | 1 -
scripts/find_stray_empty_lines | 10 ++++++++++
scripts/kconfig/check.sh | 1 -
scripts/kconfig/lex.zconf.c_shipped | 1 -
scripts/kconfig/menu.c | 1 -
scripts/kconfig/util.c | 1 -
scripts/kconfig/zconf.hash.c_shipped | 1 -
scripts/kconfig/zconf.tab.c_shipped | 2 --
scripts/showasm | 1 -
selinux/Config.src | 1 -
shell/hush_test/hush-misc/break1.tests | 1 -
sysklogd/Config.src | 1 -
testsuite/basename/basename-works | 1 -
testsuite/dirname/dirname-works | 1 -
testsuite/expr/expr-works | 1 -
testsuite/ln/ln-preserves-soft-links | 1 -
testsuite/readlink.tests | 1 -
testsuite/uptime/uptime-works | 1 -
42 files changed, 15 insertions(+), 46 deletions(-)
(limited to 'scripts')
diff --git a/archival/libunarchive/unxz/README b/archival/libunarchive/unxz/README
index f79b0a404..c5972f6b8 100644
--- a/archival/libunarchive/unxz/README
+++ b/archival/libunarchive/unxz/README
@@ -133,4 +133,3 @@ Specifying the calling convention
For example, on Windows, you may make all functions use the stdcall
calling convention by defining XZ_FUNC=__stdcall when building and
using the functions from XZ Embedded.
-
diff --git a/debianutils/Config.src b/debianutils/Config.src
index 838d8f00c..cbc09b5ce 100644
--- a/debianutils/Config.src
+++ b/debianutils/Config.src
@@ -83,4 +83,3 @@ config WHICH
print out their pathnames.
endmenu
-
diff --git a/docs/busybox_footer.pod b/docs/busybox_footer.pod
index 5ed937991..47eabaeeb 100644
--- a/docs/busybox_footer.pod
+++ b/docs/busybox_footer.pod
@@ -253,4 +253,3 @@ Tito Ragusa
devfsd and size optimizations in strings, openvt and deallocvt.
=cut
-
diff --git a/docs/cgi/cl.html b/docs/cgi/cl.html
index 5779d623e..4f8faae9f 100644
--- a/docs/cgi/cl.html
+++ b/docs/cgi/cl.html
@@ -43,4 +43,4 @@ CGI - Common Gateway Interface
cgi@ncsa.uiuc.edu
-