From: Sam Ravnborg <sam@ravnborg.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] kbuild: compile-test global headers to ensure they are self-contained
Date: Sat, 22 Jun 2019 15:06:36 +0200 [thread overview]
Message-ID: <20190622130635.GA24262@ravnborg.org> (raw)
In-Reply-To: <CAK7LNATz1iuG0Moab60gMSbVU8PJAmrLn27K8HK_1zQ0qeh26w@mail.gmail.com>
Hi Masahiro
> At first, I tried to split Makefile per directory,
> and add header-test-y one by one.
>
> I think you expect they look like this:
>
>
> include/Makefile:
>
> subdir-y += drm
> subdir-y += linux
> subdir-y += media
So far we agree.
> include/drm/Makefile:
>
> header-test-y += drm_cache.h
> header-test-y += drm_file.h
> header-test-y += drm_util.h
> ...
On this level it would be better to do:
header-test-y += $(call find_all_header_files)
# drm files that are not self-contained
header-test-n += drm_legacy.h
Likewise for all subdirs below include/
and include/linux should maybe be split up a little too.
Maybe include/uapi/ would need to be slipt a little.
Then we have a manageable number of Makefiles.
New header files are automatically checked and
we have a list of files to fix.
If for example drm/ have too much failures to a start
then we can add that directory to the higler level Makefile later.
The above is more or less what you already started,
but the difference is that we have it pushed down one or two
directories.
The header-test-n logic could be moved to the generic part,
and a helper could be made to find all header files.
Then the Makefiles would be more or less trival, with all the
Kbuild magic hidden away.
> In my analysis, 70% of headers are already conf-contained.
> After some fixups, 95% of headers can become self-contained.
Sounds good. And we do not want 100%, but close...
Sam
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-06-22 13:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-21 16:39 [PATCH] kbuild: compile-test global headers to ensure they are self-contained Masahiro Yamada
2019-06-21 17:51 ` Sam Ravnborg
2019-06-22 12:30 ` Masahiro Yamada
2019-06-22 13:06 ` Sam Ravnborg [this message]
2019-06-24 21:40 ` Sam Ravnborg
2019-06-25 6:11 ` Sam Ravnborg
2019-06-27 3:36 ` Masahiro Yamada
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=20190622130635.GA24262@ravnborg.org \
--to=sam@ravnborg.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=michal.lkml@markovi.net \
--cc=yamada.masahiro@socionext.com \
/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;
as well as URLs for NNTP newsgroup(s).