mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.m@jp.panasonic.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/3] kbuild: do not create symbolic link include/asm
Date: Wed, 24 Dec 2014 13:21:01 +0900	[thread overview]
Message-ID: <1419394862-31457-3-git-send-email-yamada.m@jp.panasonic.com> (raw)
In-Reply-To: <1419394862-31457-1-git-send-email-yamada.m@jp.panasonic.com>

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

  parent reply	other threads:[~2014-12-24  4:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1419394862-31457-3-git-send-email-yamada.m@jp.panasonic.com \
    --to=yamada.m@jp.panasonic.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox