mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/3] kbuild: drop redundant code
@ 2014-12-24  4:20 Masahiro Yamada
  2014-12-24  4:21 ` [PATCH 1/3] kbuild: remove redundant -include include/generated/autoconf.h Masahiro Yamada
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Masahiro Yamada @ 2014-12-24  4:20 UTC (permalink / raw)
  To: barebox




Masahiro Yamada (3):
  kbuild: remove redundant -include include/generated/autoconf.h
  kbuild: do not create symbolic link include/asm
  kbuild: do not create include2 directory

 .gitignore |  1 -
 Makefile   | 45 +++------------------------------------------
 2 files changed, 3 insertions(+), 43 deletions(-)

-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] kbuild: remove redundant -include include/generated/autoconf.h
  2014-12-24  4:20 [PATCH 0/3] kbuild: drop redundant code Masahiro Yamada
@ 2014-12-24  4:21 ` Masahiro Yamada
  2014-12-24  4:21 ` [PATCH 2/3] kbuild: do not create symbolic link include/asm Masahiro Yamada
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2014-12-24  4:21 UTC (permalink / raw)
  To: barebox

include/generated/autoconf.h is included from include/linux/kconfig.h
and we already have "-include $(srctree)/include/linux/kconfig.h"
just below.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Makefile b/Makefile
index df5cf49..f1dcec2 100644
--- a/Makefile
+++ b/Makefile
@@ -294,7 +294,6 @@ LINUXINCLUDE    := -Iinclude -I$(srctree)/dts/include \
                    $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
 		   -I$(srctree)/arch/$(ARCH)/include \
 		   -I$(objtree)/arch/$(ARCH)/include \
-                   -include include/generated/autoconf.h \
                    -include $(srctree)/include/linux/kconfig.h
 
 CPPFLAGS        := -D__KERNEL__ -D__BAREBOX__ $(LINUXINCLUDE) -fno-builtin -ffreestanding
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/3] kbuild: do not create symbolic link include/asm
  2014-12-24  4:20 [PATCH 0/3] kbuild: drop redundant code Masahiro Yamada
  2014-12-24  4:21 ` [PATCH 1/3] kbuild: remove redundant -include include/generated/autoconf.h Masahiro Yamada
@ 2014-12-24  4:21 ` Masahiro Yamada
  2014-12-24  4:21 ` [PATCH 3/3] kbuild: do not create include2 directory Masahiro Yamada
  2015-01-05 11:31 ` [PATCH 0/3] kbuild: drop redundant code Sascha Hauer
  3 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2014-12-24  4:21 UTC (permalink / raw)
  To: barebox

There does not exist include/asm-$(SRCARCH) any more, so no point
to create a symbolic link to an empty directory.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 .gitignore |  1 -
 Makefile   | 35 +----------------------------------
 2 files changed, 1 insertion(+), 35 deletions(-)

diff --git a/.gitignore b/.gitignore
index 5d9157d..03c5e20 100644
--- a/.gitignore
+++ b/.gitignore
@@ -61,7 +61,6 @@ barebox_default_env*
 #
 # Generated include files
 #
-include/asm
 include/asm-*/asm-offsets.h
 include/config
 include/linux/compile.h
diff --git a/Makefile b/Makefile
index f1dcec2..2978439 100644
--- a/Makefile
+++ b/Makefile
@@ -808,7 +808,7 @@ endif
 prepare2: prepare3 outputmakefile
 
 prepare1: prepare2 include/generated/version.h include/generated/utsrelease.h \
-                   include/asm include/config.h include/config/auto.conf
+                   include/config.h include/config/auto.conf
 
 ifneq ($(KBUILD_MODULES),)
 	$(Q)mkdir -p $(MODVERDIR)
@@ -828,39 +828,6 @@ prepare prepare-all: prepare0
 
 export CPPFLAGS_barebox.lds += -C -U$(ARCH)
 
-# FIXME: The asm symlink changes when $(ARCH) changes. That's
-# hard to detect, but I suppose "make mrproper" is a good idea
-# before switching between archs anyway.
-
-define check-symlink
-	set -e;								\
-	if [ -L include/asm ]; then					\
-		asmlink=`readlink include/asm | cut -d '-' -f 2`;	\
-		if [ "$$asmlink" != "$(SRCARCH)" ]; then		\
-			echo "ERROR: the symlink $@ points to asm-$$asmlink but asm-$(SRCARCH) was expected";	\
-			echo "       set ARCH or save .config and run 'make mrproper' to fix it";		\
-			exit 1;						\
-		fi;							\
-	fi
-endef
-
-# We create the target directory of the symlink if it does
-# not exist so the test in chack-symlink works and we have a
-# directory for generated filesas used by some architectures.
-define create-symlink
-	if [ ! -L include/asm ]; then					\
-			$(kecho) '  SYMLINK $@ -> include/asm-$(SRCARCH)';	\
-			if [ ! -d include/asm-$(SRCARCH) ]; then	\
-				mkdir -p include/asm-$(SRCARCH);	\
-			fi;						\
-			ln -fsn asm-$(SRCARCH) $@;			\
-	fi
-endef
-
-include/asm:
-	$(Q)$(check-symlink)
-	$(Q)$(create-symlink)
-
 define symlink-config-h
 	if [ -f $(srctree)/$(BOARD)/config.h ]; then		\
 		$(kecho) '  SYMLINK $@ -> $(BOARD)/config.h';	\
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 3/3] kbuild: do not create include2 directory
  2014-12-24  4:20 [PATCH 0/3] kbuild: drop redundant code Masahiro Yamada
  2014-12-24  4:21 ` [PATCH 1/3] kbuild: remove redundant -include include/generated/autoconf.h Masahiro Yamada
  2014-12-24  4:21 ` [PATCH 2/3] kbuild: do not create symbolic link include/asm Masahiro Yamada
@ 2014-12-24  4:21 ` Masahiro Yamada
  2015-01-05 11:31 ` [PATCH 0/3] kbuild: drop redundant code Sascha Hauer
  3 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2014-12-24  4:21 UTC (permalink / raw)
  To: barebox

include/asm-$(SRCARCH) does not exist.  Creating include2
directory is meaningless.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 Makefile | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 2978439..5676b29 100644
--- a/Makefile
+++ b/Makefile
@@ -291,7 +291,7 @@ export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_ve
 # Use LINUXINCLUDE when you must reference the include/ directory.
 # Needed to be compatible with the O= option
 LINUXINCLUDE    := -Iinclude -I$(srctree)/dts/include \
-                   $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
+                   $(if $(KBUILD_SRC), -I$(srctree)/include) \
 		   -I$(srctree)/arch/$(ARCH)/include \
 		   -I$(objtree)/arch/$(ARCH)/include \
                    -include $(srctree)/include/linux/kconfig.h
@@ -789,7 +789,6 @@ PHONY += prepare-all
 # prepare3 is used to check if we are building in a separate output directory,
 # and if so do:
 # 1) Check that make has not been executed in the kernel src $(srctree)
-# 2) Create the include2 directory, used for the second asm symlink
 prepare3: include/config/kernel.release
 ifneq ($(KBUILD_SRC),)
 	@echo '  Using $(srctree) as source for kernel'
@@ -798,10 +797,6 @@ ifneq ($(KBUILD_SRC),)
 		echo "  in the '$(srctree)' directory.";\
 		false; \
 	fi;
-	$(Q)if [ ! -d include2 ]; then mkdir -p include2; fi;
-	$(Q)if [ -e $(srctree)/include/asm-$(SRCARCH)/barebox.h ]; then  \
-	    ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm;     \
-	    fi
 endif
 
 # prepare2 creates a makefile if using a separate output directory
@@ -964,7 +959,7 @@ CLEAN_FILES +=	barebox System.map include/generated/barebox_default_env.h \
 		barebox.efi barebox.canon-a1100.bin
 
 # Directories & files removed with 'make mrproper'
-MRPROPER_DIRS  += include/config include2 usr/include
+MRPROPER_DIRS  += include/config usr/include
 MRPROPER_FILES += .config .config.old include/asm .version .old_version \
                   include/generated/autoconf.h include/generated/version.h      \
                   include/generated/utsrelease.h include/config.h           \
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] kbuild: drop redundant code
  2014-12-24  4:20 [PATCH 0/3] kbuild: drop redundant code Masahiro Yamada
                   ` (2 preceding siblings ...)
  2014-12-24  4:21 ` [PATCH 3/3] kbuild: do not create include2 directory Masahiro Yamada
@ 2015-01-05 11:31 ` Sascha Hauer
  3 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2015-01-05 11:31 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: barebox

Hi Masahiro,

On Wed, Dec 24, 2014 at 01:20:59PM +0900, Masahiro Yamada wrote:
> 
> 
> 
> Masahiro Yamada (3):
>   kbuild: remove redundant -include include/generated/autoconf.h
>   kbuild: do not create symbolic link include/asm
>   kbuild: do not create include2 directory

Very nice stuff. It has some fixes in areas people (including me)
normally don't want to touch. Thanks for doing this. Applied all,
also the other kbuild patches you sent.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-05 11:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-24  4:20 [PATCH 0/3] kbuild: drop redundant code Masahiro Yamada
2014-12-24  4:21 ` [PATCH 1/3] kbuild: remove redundant -include include/generated/autoconf.h Masahiro Yamada
2014-12-24  4:21 ` [PATCH 2/3] kbuild: do not create symbolic link include/asm Masahiro Yamada
2014-12-24  4:21 ` [PATCH 3/3] kbuild: do not create include2 directory Masahiro Yamada
2015-01-05 11:31 ` [PATCH 0/3] kbuild: drop redundant code Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox