<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/Makefile.clean, branch stable/2.6.16.y</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=stable%2F2.6.16.y</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=stable%2F2.6.16.y'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2005-07-27T20:11:01Z</updated>
<entry>
<title>kbuild: fix building external modules</title>
<updated>2005-07-27T20:11:01Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@mars.(none)</email>
</author>
<published>2005-07-27T20:11:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=db8c1a7b2ca25f37b1429c00e82d6568f86caec1'/>
<id>urn:sha1:db8c1a7b2ca25f37b1429c00e82d6568f86caec1</id>
<content type='text'>
kbuild failed to locate Makefile for external modules.
This brought to my attention how the variables for directories
have different values in different usage scenarios.

Different kbuild usage scenarios:
make       - plain make in same directory where kernel source lives
make O=    - kbuild is told to store output files in another directory
make M=    - building an external module
make O= M= - building an external module with kernel output seperate from src

Value assigned to the different variables:

           |$(src)          |$(obj) |$(srctree)        |$(objtree)
make       |reldir to k src |as src |abs path to k src |abs path to k src
make O=    |reldir to k src |as src |abs path to k src |abs path to output dir
make M=    |abs path to src |as src |abs path to k src |abs path to k src
make O= M= |abs path to src |as src |abs path to k src |abs path to k output

path to kbuild file:

make       | $(srctree)/$(src), $(src)
make O=    | $(srctree)/$(src)
make M=    | $(src)
make O= M= | $(src)

From the table above it can be seen that the only good way to find the
home directory of the kbuild file is to locate the one of the two variants
that is an absolute path. If $(src) is an absolute path (starts with /)
then use it, otherwise prefix $(src) with $(srctree).

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kbuild: define clean before including kbuild file</title>
<updated>2005-07-25T22:41:12Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@mars.(none)</email>
</author>
<published>2005-07-25T22:41:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2315c6e42278152360470124ce903ecb8c97270a'/>
<id>urn:sha1:2315c6e42278152360470124ce903ecb8c97270a</id>
<content type='text'>
Defining clean before including the kbuild file give us knowledge when
the kbuild file is included for cleaning. This is rarey usefull - but in
a corner case in klibc this proved necessary.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
---
</content>
</entry>
<entry>
<title>kbuild: fix make O=...</title>
<updated>2005-07-25T20:26:04Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@mars.(none)</email>
</author>
<published>2005-07-25T20:26:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2a691470345a0024dd7ffaf47ad3d0f5f4f41924'/>
<id>urn:sha1:2a691470345a0024dd7ffaf47ad3d0f5f4f41924</id>
<content type='text'>
kbuild failed to locate Kbuild.include.
Teach kbuild how to find Kbuild files when using make O=...

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
---
</content>
</entry>
<entry>
<title>kbuild: Prefer Kbuild as name of the kbuild files</title>
<updated>2004-11-03T22:40:43Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@mars.ravnborg.org</email>
</author>
<published>2004-11-03T22:40:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ecfddb4651553fb68e00a80e860364b441571d98'/>
<id>urn:sha1:ecfddb4651553fb68e00a80e860364b441571d98</id>
<content type='text'>
The kbuild syntax is unique and does only have very few things in common with
usual Makefile syntax. So to avoid confusion make the filename 'Kbuild' be
the preferred name as replacement for 'Makefile'.
No global renaming planned to take place for now, but new stuff expected to use
the new 'Kbuild' filename.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kbuild: add comments to Makefile.clean</title>
<updated>2004-08-19T01:17:03Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@mars.ravnborg.org</email>
</author>
<published>2004-08-19T01:17:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f5ce51c635d17d0e03e18400bc57b591df2712ca'/>
<id>urn:sha1:f5ce51c635d17d0e03e18400bc57b591df2712ca</id>
<content type='text'>
Chris Wedgwood &lt;cw@f00f.org&gt; wrote:
&gt; P.S. I'd love to see the rules in scripts/Makefile.* documented.  I
&gt;      would offer a patch for this but I don't understand the rules
&gt;      myself...
And provided the following patch, slightly modified by me.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kbuild: Introduce hostprogs-y, deprecate host-progs</title>
<updated>2004-08-10T23:38:42Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@mars.ravnborg.org</email>
</author>
<published>2004-08-10T23:38:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=113b88ae284c577e332db1d6e6519355b8ca009a'/>
<id>urn:sha1:113b88ae284c577e332db1d6e6519355b8ca009a</id>
<content type='text'>
Introducing hostprogs-y allows a user to use the typical Kbuild
pattern in a Kbuild file:
hostprogs-$(CONFIG_KALLSYMS) += ...

And then during cleaning the referenced file are still deleted.
Deprecate the old host-progs assignment but kept the functionlity.

External modules will continue to use host-progs for a while - drawback is
that they now see a warning.
Workaround - just assign both variables:
hostprogs-y := foo
host-progs  := $(hostprogs-y)

All in-kernel users will be converted in next patch.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kbuild: Accept absolute paths in clean-files and introduce clean-dirs</title>
<updated>2004-08-09T22:01:02Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@mars.ravnborg.org</email>
</author>
<published>2004-08-09T22:01:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=94869f86021d8d3e785e2222d151fb4b98d2ae2a'/>
<id>urn:sha1:94869f86021d8d3e785e2222d151fb4b98d2ae2a</id>
<content type='text'>
Teach kbuild to accept absolute paths in clean-files. This avoids using
clean-rules in several places.
Introduced clean-dirs to delete complete directories.
Kept clean-rule - but do not print anything when used.
Cleaned up a few places now the infrastructure are improved.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kbuild: Separate output directory</title>
<updated>2003-09-11T14:01:32Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@mars.ravnborg.org</email>
</author>
<published>2003-09-11T14:01:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5a808876e2f204cefdca16040d1d3662f4a503c3'/>
<id>urn:sha1:5a808876e2f204cefdca16040d1d3662f4a503c3</id>
<content type='text'>
Separate output directory support enables the following (at least):
o Building several configurations from the same SRC base, and in parrallel
o Building from a RO media
o More efficient build if files are retreived via NFS (files stored locally)

Usage is simple:
cd /path/to/kernel/src
mkdir ~/build/kernel
make O=~/build/kernel [Make options]
Please note: The O= syntax must be used for ALL invocations of make.

As an alternative you may set KBUILD_OUTPUT to the directory where
to put the output files.

The patch works for me, and I have tried with various configurations,
including allnoconfig and defconfig.

How it works:
If the O= option is used, or KBUILD_OUTPUT is set then a second invocation
of make happens in the output directory.
The second invocation of make uses VPATH to tell make where to locate
the files. Furthermore include options for gcc is modifyied to point
both in the directory where the kernel src is located, and in the
directory where the output files are located. The latter is used for
generated .h files.

When building the kernel the asm symlink is created. To support this
a new 'include2' directory is created. Within include2/ asm is a symlink to
the asm-$(ARCH) directory in the kernel src.
Also when building the kernel the asm-offset.h file is created, and
located in the include/asm-$(ARCH) directory, but included via
&lt;asm/asm-offset.h&gt;.
Therefore within include/ another asm symlink is created pointing to
the asm-$(ARCH) directory located in the output directory.

In Makefile.build the output directory is created if not already present.
This was needed to support xfs, and oprofile.

The patch is loosly based on ideas from Kai G. Roman Zippel
introduced support for this in kconfig long time ago
</content>
</entry>
<entry>
<title>kbuild: build-targets replaced with always</title>
<updated>2003-03-10T23:03:40Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@mars.ravnborg.org</email>
</author>
<published>2003-03-10T23:03:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=87b2da2b95644551d44dce487b818155bd4b0f9c'/>
<id>urn:sha1:87b2da2b95644551d44dce487b818155bd4b0f9c</id>
<content type='text'>
The former name "kbuild-targets" did not give the user the intuitive feeling
that this target will be build regards less of any dependencies
no matter if we compile modules or not.
The new name "always" imply that this will be build always, and
tus is more informative.
Fixed the few users of build-targets, and added a warning in Makefile.build
</content>
</entry>
<entry>
<title>kbuild: Introduced extra-y, as replacement for EXTRA_TARGETS</title>
<updated>2003-03-10T00:16:02Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@mars.ravnborg.org</email>
</author>
<published>2003-03-10T00:16:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f94e5fd7e5d09a56a60670a9bb211a791654bba8'/>
<id>urn:sha1:f94e5fd7e5d09a56a60670a9bb211a791654bba8</id>
<content type='text'>
EXTRA_TARGETS has been overloaded with functionality.
This is now split in two:
targets := list targets kbuild did not know of otherwise
extra-y := list targets to be build when not building modules only.
extra-y is mainly used to list .o files that is not to be included
in the fnal built-in.o file for a directory.
</content>
</entry>
</feed>
