mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH] kconfig: update to Linux 5.2-rc4
Date: Mon, 17 Jun 2019 17:02:11 +0900	[thread overview]
Message-ID: <CAK7LNARR7VVym75CQR0dWgm8yLXoYS8AuZpezh9ye8AdwusAaA@mail.gmail.com> (raw)
In-Reply-To: <20190617070524.bhcpfkv4thpouxax@pengutronix.de>

Hi Sascha,

On Mon, Jun 17, 2019 at 4:05 PM Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
> Hi Masahiro,
>
> On Mon, Jun 10, 2019 at 05:47:04PM +0900, Masahiro Yamada wrote:
> > @@ -854,7 +860,7 @@ define symlink-config-h
> >       fi
> >  endef
> >
> > -include/config.h: include/config/auto.conf
> > +include/config.h:
> >       $(Q)$(symlink-config-h)
>
> I had to revert this change. Without the dependency to
> include/config/auto.conf include/config.h won't get updated on Kconfig
> changes. Is reverting this change the right thing to do or do we have to
> do something else?

You are right.

Once include/config.h is created, it will never be updated.

Reverting this hunk would work in most cases,
but I think it is strange to use timestamps to determine
whether a symbolic link is re-linked or not.

If include/config.h is a symlink, it will end up with comparing
the timestamps between $(srctree)/$(BOARD)/config.h and
include/config/auto.conf, which is pointless.


I do not know why 'touch -a $@' is needed
when $(srctree)/$(BOARD)/config.h does not exist.

How about this?



diff --git a/Makefile b/Makefile
index 071b927068c4..196a2a2625c8 100644
--- a/Makefile
+++ b/Makefile
@@ -827,7 +827,7 @@ endif
 prepare2: prepare3 outputmakefile

 prepare1: prepare2 include/generated/version.h include/generated/utsrelease.h \
-                   include/config.h
+                   symlink-config-h

 ifneq ($(KBUILD_MODULES),)
        $(Q)mkdir -p $(MODVERDIR)
@@ -849,16 +849,14 @@ export CPPFLAGS_barebox.lds += -C -U$(ARCH)

 define symlink-config-h
        if [ -f $(srctree)/$(BOARD)/config.h ]; then            \
-               $(kecho) '  SYMLINK $@ -> $(BOARD)/config.h';   \
                ln -fsn $(srctree)/$(BOARD)/config.h $@;        \
        else                                                    \
-               [ -h $@ ] && rm -f $@;                          \
-               $(kecho) '  CREATE  $@';                        \
-               touch -a $@;                                    \
+               rm -f $@;                                       \
        fi
 endef

-include/config.h:
+PHONY += symlink-config-h
+symlink-config-h:
        $(Q)$(symlink-config-h)

 # Generate some files


-- 
Best Regards
Masahiro Yamada

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

  reply	other threads:[~2019-06-17  8:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-10  8:47 Masahiro Yamada
2019-06-11  9:07 ` Sascha Hauer
2019-06-11 10:20   ` Masahiro Yamada
2019-06-17  7:05 ` Sascha Hauer
2019-06-17  8:02   ` Masahiro Yamada [this message]
2019-06-18  7:11     ` Sascha Hauer
2019-06-18  7:24       ` Masahiro Yamada
2019-06-19  8:11         ` 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=CAK7LNARR7VVym75CQR0dWgm8yLXoYS8AuZpezh9ye8AdwusAaA@mail.gmail.com \
    --to=yamada.masahiro@socionext.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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