Re: [kbuild-devel] linux kernel conf 0.6

Roman Zippel
2002-09-22T15:21:09Z

Hi,

On Fri, 20 Sep 2002, Sam Ravnborg wrote:

> I have been working on integrating lkc with kbuild.
> Here is the result.

Thanks, nice work. :)

> Rules.make
> - Added infrastructure to support host-ccprogs, in other words
> support tools written (partly) in c++.

There are all compiled with gcc instead of g++, are you sure that will ok
with all supported gcc versions?

> scripts/lkc/Makefile*
> - As kbuild does not distingush between individual objects,
> used for a given target, but (try to) build them all, I have
> found a solution where I create one Makefile for each executable.
> I could not see a clean way to integrate this in kbuild, and finally
> decided that in this special case a number of Makefiles did not
> hurt too much.

Here I thought about using "ifeq ($(MAKECMDGOALS),...)" to keep them in a
single file. Did you try something like this?

> flex/bison
> - Prepared for "_shipped" files.
> Rename lex.zconf.c to lex.zconf.c_shipped etc. in the version
> reday to go in the kernel.

This works quite well for users, but it's very annoying for the developer.
Kai, any chances to use md5sum for this at some point, e.g. with a helper
script like this:

set -e
src=$1
dst=$2
shift 2

test -f $dst && tail -1 $dst | sed 's,/\* \(.*\) \*/,\1,' | md5sum -c && touch $dst && exit 0
echo "$@"
"$@"
echo "/* $(md5sum $src) */" >> $dst

The only problem with this script is that it only supports a single input
and output file.

Something else I'd like to have for later is the ability to compile
$(sharedobjs) as a shared library and install it somewhere so it can be
used by external programs.

bye, Roman