public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: linux-kbuild <linux-kbuild@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	linux arch <linux-arch@vger.kernel.org>,
	Al Viro <viro@zeniv.linux.org.uk>
Subject: [PATCH/RFC] Move generated files to include/generated
Date: Tue, 21 Jul 2009 23:10:40 +0200	[thread overview]
Message-ID: <20090721211040.GA7688@merkur.ravnborg.org> (raw)

In 2.6.30 we introduced support for adding generated
files to a dedicated directory named "include/generated".

This had a number of benefits:

  - avoid mixing generated and normal files
  - allow us to finally kill the asm symlink
  - simpler .gitignore rules
  - simpler list of mrproper files

The following patchset introduces use of include/generated
in several places as documented by the shortlog:

Sam Ravnborg (10):
      kbuild: move bounds.h to include/generated
      kbuild: move asm-offsets.h to include/generated
      ia64: move nr-irqs.h to include/generated
      sh: move machtypes.h to include/generated
      arm: move mach-types to include/generated
      kbuild: drop asm symlink
      kbuild: move compile.h to include/generated
      drop unneeded include of autoconf.h
      kbuild: move autoconf.h to include/generated
      kbuild: move utsrelease.h to include/generated

We are left with version.h that is still generated in
include/linux.

And there may be a few architecture specific files I have missed.

This patch serie has a few shortcomings...

1)
After applying one _must_ do a "make clean" to get
a buildable kernel.
This is because we change the path of autoconf.h but
the patch does not include anything to force a new
autoconf.h to be created.
Another workaround is to use a simple "make oldconfig".

2)
All files will be rebuild.
We change an option to gcc due to path change of autoconf.h
so all files will be rebuild.

3)
If some files are left in include/asm/ we may still
pick them up.
This is relevant for asm-offsets.h where we have
a lot of "#include <asm/asm-offsets.h>".
And include/asm comes before arch/$ARCH/include/asm
in the search order.

4)
We loose the check if this is the correct ARCH we are
building for as we can no longer check the asm symlink.
This shortcoming is addressed by another patch that saves
ARCH and CROSS_COMPILE. But it is not part of this serie.

Individual patches will follow.
Patches are based on todays mainline.

It is also available at:

    git://git.kernel.org/pub/scm/linux/kernel/git/sam/generated.git

Comments welcome!

	Sam


             reply	other threads:[~2009-07-21 21:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21 21:10 Sam Ravnborg [this message]
2009-07-21 21:19 ` [PATCH 01/10] kbuild: move bounds.h to include/generated Sam Ravnborg
2009-07-21 21:19 ` [PATCH 02/10] kbuild: move asm-offsets.h " Sam Ravnborg
2009-07-21 21:19 ` [PATCH 03/10] ia64: move nr-irqs.h " Sam Ravnborg
2009-07-21 21:48   ` Yu, Fenghua
     [not found]   ` <A6AD88C3F2289247BE726C37303E1EB8B09F47F2@orsmsx505.amr.corp.intel.com>
2009-07-21 21:58     ` Sam Ravnborg
2009-07-21 21:19 ` [PATCH 04/10] sh: move machtypes.h " Sam Ravnborg
2009-07-21 21:19 ` [PATCH 05/10] arm: move mach-types " Sam Ravnborg
2009-07-21 21:19 ` [PATCH 06/10] kbuild: drop asm symlink Sam Ravnborg
2009-07-21 21:19 ` [PATCH 07/10] kbuild: move compile.h to include/generated Sam Ravnborg
2009-07-21 21:19 ` [PATCH 08/10] drop unneeded include of autoconf.h Sam Ravnborg
2009-07-21 21:19 ` [PATCH 09/10] kbuild: move autoconf.h to include/generated Sam Ravnborg
2009-07-21 21:19 ` [PATCH 10/10] kbuild: move utsrelease.h " Sam Ravnborg
2009-07-22  9:58 ` [PATCH/RFC] Move generated files " Amerigo Wang
2009-07-22 13:50   ` Arnd Bergmann
2009-07-22 20:33     ` Sam Ravnborg

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=20090721211040.GA7688@merkur.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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