Re: [kbuild-devel] [RFC/RFT] kbuild: save ARCH CROSS_COMPILE

2007-10-09 Thread Oleg Verych
On Tue, Oct 09, 2007 at 06:17:43AM +0200, Sam Ravnborg wrote:
  
  What about, that this is the first ever prompt, that must be shown and
  written to the .config?
 Two issues to fix before we can do this:
 1) chocie values cannot have more than one prompt

what occupying all my time now is to try to make fast and easy (text/tty)
user interface, based solely on TERM=linux capability. It is such, but
deep in ncurses/lxdialog wrappers. Having more flexible TUI without
all past stereotypes is the major point in making any progress for
flexible configuration interface. Remember, how blind `select` hurts.
It does due to UI limitations in first place, IMHO.

 2) We need to share much more Kconfig* between the individual architectures
First step is to let all arch's use drivers/Kconfig

All syntax wars are over, now order is the second thing to achieve. Like
in x86 merge case, this is purely technical thing with a bit of manual
work after that. sed magic for (nearly any kind :) of textual processing
i can guarantee without (yet another) C (like fixdep.c, parts of
sumversion.c, etc.)

 Let's get the two items above solved then we can revisit adding arch selection
 to kconfig (where it belongs in the end).
 And neither require a rewrite of kconfig...

Since i try to do test driven development, it's more easy for me to
understand/fix/test today's things via making bits from scratch. Fresh
view can do more on debugging of the logic level also.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] [RFC/RFT] kbuild: save ARCH CROSS_COMPILE

2007-10-08 Thread Oleg Verych
On Mon, Oct 08, 2007 at 10:02:55PM +0200, Sam Ravnborg wrote:
 One of the complaints that I continue to hear is that kbuild
 is lacking a way to 'remember' the ARCH and CROSS_COMPILE
 values originally used.

Yea, finally.

What about, that this is the first ever prompt, that must be shown and
written to the .config?

The zeroth one is an config entry of kernel version(s), .config can
configure and thus build successfully.


This are among other ideas about kconfig/kbuild, you know nothing
about yet.

So, what do you think?

Also, i'd like to propose sequencing of config-enable-build-this-unit
in config file(s), thus Makefile(s) (sometimes very small and stupid)
will be not necessary. Additional link ordering can be supplied as
meta-config information there. Shell scripting, very ugly in the view
of make syntax, will be natural in config files. Extending build
process to get hidden dependencies or right linking/other magic is
part of particular configuration. Hm?

And i want to repeat this to the wall:

make is stupid `test -nt` (non POSIX, but accepted my shells and GNU test
feature). Making any kind of hashing to make dream of kbuild-2.5
developers/fans -- more complete `up-to-date' heuristic possible, is just
like `md5sum  $OBJDIR/heuristic.com`, which is config selectable (for
those, who don't like a bit of slowdown).
--
-o--=O`C
 #oo'L O
___=E M

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] A bit of kconfig rewrite (Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL)

2007-10-06 Thread Oleg Verych
On Fri, Oct 05, 2007 at 04:35:41AM +0200, Roman Zippel wrote:
 Hi,
 
 On Mon, 1 Oct 2007, Oleg Verych wrote:
 
  Today's kconfig was proposed and accepted in a very unpleasant
  circumstances, has very poor design, development and no working
  alternative (for 5+ years now).
 
 If you want to make such statements, you have to offer a little more than 
 the hot air you're producing right now...
...

 If you want to improve the design, you're more than welcome. I'm the first 
 one to admit that there's still lots of room for improvement, but if you 
 want to claim this can only be done via a rewrite, then you have to be 
 a lot more specific what's wrong the current design and why it's 
 unfixable.
 Quite some thought has been put into this design and if you were a little 
 more specific, I could actually tell you why it is this way and maybe how 
 to improve it incrementally instead of trying to reinvent everything.

Thanks. I will be specific, after i will finish, what i already have,
to make air a bit less hot. Of course everything will be back
compatible, so nothing to worry about (the rewrite).


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] several small things (Re: [PATCH 0/4] Compile kernel with -fwhole-program --combine)

2007-09-20 Thread Oleg Verych
On Thu, Sep 20, 2007 at 06:51:45AM +0200, Sam Ravnborg wrote:
[]
   There are several small things that are not addressed in todays
   implementation and that will be fixed one way or the other.
  
  Did they get addressed year later or not? What they were (are)? 
 
 Nope.
 I have not visited the -combine thing since, neither has anyone alse.

As far as i can see, gcc still in trouble. I'm not sure what
version/branch will have all problems fixed.

What i think, is making simple text compilation (with some C language
altering, like externs, etc.)of build tokens, based on include and build
dependencies, and then passing one file to gcc. C Language and text
processing tools were designed decades ago, but i don't see harmonic
cooperation against modern demands.

I don't know what performance penalties this may cause, but still trying
isn't that bad. This depends on `sed` tool mainly, but maybe my optimized
sed scripting and GNU sed's performance will gain against multiple
running of gcc, which parses all its arguments and includes every single
run, and extensively uses (very cheap in Linux) forking/dynamic loading.

 If you plan to do so then please do it in small
 incremental steps each introducing *minimal* changes.

I'm trying to design something different (maybe not so new at all), as you
probably remember. I read all that (flame) threads back in 1999, 2001,
2002 about build system. Trying to get all experience from most kernel-
build related stories. Now it's dead topic as it seems, but anyway.
_

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] several small things (Re: [PATCH 0/4] Compile kernel with -fwhole-program --combine)

2007-09-19 Thread Oleg Verych
* Fri, 25 Aug 2006 09:26:54 +0200

   read.o - read.c
 It will only do this if you ask for it.
 The question was what happened when you did make read.o

   foo.o - foo.c
   bar.o - bar.c
   built-in.o - read.c foo.c bar.c
 
 (cf. default current:
   built-in.o - read.o foo.o bar.o)

 And this discussion is btw. mood. If the general opinion is that we shall
 include the -combine support all the kbuild infrastructure will anyway
 be redone.
 There are several small things that are not addressed in todays
 implementation and that will be fixed one way or the other.

Did they get addressed year later or not? What they were (are)? 

   Sam


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] spelld: several small things

2007-09-19 Thread Oleg Verych
On Thu, Sep 20, 2007 at 02:15:57AM +0200, Oleg Verych wrote:
 * Fri, 25 Aug 2006 09:26:54 +0200
 
read.o - read.c
  It will only do this if you ask for it.
  The question was what happened when you did make read.o
 
foo.o - foo.c
bar.o - bar.c
built-in.o - read.c foo.c bar.c
  
  (cf. default current:
built-in.o - read.o foo.o bar.o)
 
  And this discussion is btw. mood. If the general opinion is that we shall
  include the -combine support all the kbuild infrastructure will anyway
  be redone.
  There are several small things that are not addressed in todays
  implementation and that will be fixed one way or the other.
 
 Did they get addressed year later or not? What they were (are)? 

Actually

Were they got addressed?


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] Distributed configuration scheme by Linus at. al. (going back in time)

2007-09-16 Thread Oleg Verych
Hallo, Sam.

Can try to find exact wording/archives of the subject?
http://www.uwsg.iu.edu/hypermail/linux/kernel/0202.1/2004.html

Also, please describe what it was from your POV that time back.

I'm doing library/history paper work now, before progressing in my
design, you know. Happened to see that flame wars in lkml back in post
dot.com days.

http://www.uwsg.iu.edu/hypermail/linux/kernel/0202.1/1909.html

Now it seems to be all dead topic. Hope you will have some time to
answer.

Thanks.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] Distributed configuration scheme by Linus at. al. (going back in time)

2007-09-16 Thread Oleg Verych
On Sun, Sep 16, 2007 at 05:11:12PM +0200, Sam Ravnborg wrote:
 Hi Oleg.
 On Sun, Sep 16, 2007 at 03:12:48PM +0200, Oleg Verych wrote:
  Hallo, Sam.
  
  Can try to find exact wording/archives of the subject?
  http://www.uwsg.iu.edu/hypermail/linux/kernel/0202.1/2004.html
  
  Also, please describe what it was from your POV that time back.
 I'm not sure exactly what you are after here.

There is your comment about Linus, describing distributed (or whatever)
kconfig. I'd like to have link to read archives, if you can find it.

[]
 are you asking for an opinion on a specific subject?

Yes also. Specific as in the Subject:, please.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] Distributed configuration scheme by Linus at. al. (going back in time)

2007-09-16 Thread Oleg Verych
On Sun, Sep 16, 2007 at 07:02:27PM +0200, Sam Ravnborg wrote:
[]
 CML2 had all config in a single file IIRC.
 Kconfig has it distributed all over the tree.
 
 If you need more please elaborate a bit more.

Ahh, i thought about another kind of distribution of configuration.
Namely items, not files, because latter is obvious :). But this is
another story, which is, hopefully, not a repetition of the history,
like those CONFIG_ cleanups over and over by ESR at. al.

Goodbye.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] moving to vger (Re: CPP includes ([PATCH 3/4] ia64: fix sn to add include files using EXTRA_CFLAGS))

2007-09-09 Thread Oleg Verych
On Mon, Sep 10, 2007 at 12:45:52AM +0200, Oleg Verych wrote:
[] 
 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2005.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 kbuild-devel mailing list
 kbuild-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/kbuild-devel

How about that? Kernel Janitors moved recently thankfully to David
Miller.

Footer, that i don't think is usefull anyway, will be 2 times shorter,
non changed subject will be shorter too :) This list is very low
traffic, so may be it'll be OK...

Thanks.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] CONFIG_HOTPLUG_CPU: kconfig bug?

2007-08-29 Thread Oleg Verych
 It's somewhat a side effect of using select and defaults, the order of the 
 config symbols becomes significant for oldconfig,

And the patch have a side effect or just buggy `diff -p` output :)

[]
 -static void conf_askvalue(struct symbol *sym, const char *def)
 +static int conf_askvalue(struct symbol *sym, const char *def)
  {
   enum symbol_type type = sym_get_type(sym);
   tristate val;
 @@ -87,7 +87,7 @@ static void conf_askvalue(struct symbol 
   ^ it's int already.

   printf(%s\n, def);
   line[0] = '\n';
   line[1] = 0;
 - return;
 + return 0;
   }
  
   switch (input_mode) {
 @@ -97,23 +97,23 @@ static void conf_askvalue(struct symbol 

Eeh, programmers...


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] [PATCH 25/33] kbuild: use POSIX BRE in headers install target

2007-07-21 Thread Oleg Verych
* Date: Tue, 17 Jul 2007 16:08:54 +0200

 From: Mike Frysinger [EMAIL PROTECTED]

 The sed expression used at the moment in scripts/Makefile.headersinst
 relies on the (handy) GNU extension where you can escape ERE's in an
 otherwise BRE without using the GNU -r option.  The following patch
 replaces this \+ usage with a functionally equivalent POSIX BRE compliant
 \{1,\}.

Matching at least one occurrence, right?

 Tested with `make headers_install` against blackfin/x86_64/i386
 targets.

 Stupid whiny OS X users and their crappy sed ;)

That may be. My games with strict POSIX sed syntax render busybox's sed
as crap for example. So, you never know.

  # Eliminate the contents of (and inclusions of) compiler.h

OK, that means annotations and non ANSI 'inline' thing. Lets see.

  HDRSED  := sed   -e s/ inline / __inline__ /g \
[]
 - -e s/[[:space:]]__attribute_const__[[:space:]]\+/\ /g \

* [[:space:]] are more than tab and space isspace(3), is it more
  effective to use [[:blank:]] instead?

 + -e 
 s/[[:space:]]__user[[:space:]]\{1,\}

substitute one or more ' __user '

 / /g \

with ' ', everywhere (flag 'g'). So, is it really needed that '\{' thing?

 + -e s/(__user[[:space:]]\{1,\}/ (/g \
 + -e s/[[:space:]]__force[[:space:]]\{1,\}/ /g \
 + -e s/(__force[[:space:]]\{1,\}/ (/g \
 + -e s/[[:space:]]__iomem[[:space:]]\{1,\}/ /g \
 + -e s/(__iomem[[:space:]]\{1,\}/ (/g \
 + -e s/[[:space:]]__attribute_const__[[:space:]]\{1,\}/\ /g \
   -e s/[[:space:]]__attribute_const__$$// \

Is it allowed to use identifiers like '__attribute_const__foo' or
__attribute_const__[anything]? If it's not, last line is useless also.

   -e /^\#include linux\/compiler.h/d
whitespace is allowed   ^ here and is used for better readability
sometimes.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] [PATCH 25/33] kbuild: use POSIX BRE in headers install target

2007-07-21 Thread Oleg Verych
On Sat, Jul 21, 2007 at 10:23:44AM +0200, Andreas Schwab wrote:
 Oleg Verych [EMAIL PROTECTED] writes:
 
  +  -e 
  s/[[:space:]]__user[[:space:]]\{1,\}
 
  substitute one or more ' __user '
 
 Substitute ' __user' followed by one or more ' '.  \{\} applies only to
 the last RE atom.

Right, that's why i've used '  *' sometimes.

Thanks.

 Andreas.
 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] More effective processing (Re: [PATCH 25/33] kbuild: use POSIX BRE in headers install target)

2007-07-21 Thread Oleg Verych
On Sun, Jul 22, 2007 at 12:13:26AM +0200, Sam Ravnborg wrote:
 On Sun, Jul 22, 2007 at 12:16:27AM +0200, Oleg Verych wrote:
  
  What do you think about this one? I want to propose to remove
  scripts/unifdef.c but to make clear policy about how to mark __KERNEL__
  sections in header files. We know how obfuscated C can be, and this also
  applies to preprocessing. There's known CodingStyle about some points.
  The thing is to specify rules, that will be easy for `sed` to do cleaup
  job.
  
  ./linux/soundcard.h:#if (!defined(__KERNEL__)  !defined(KERNEL)  
  !defined(INKERNEL)
 !defined(_KERNEL)) || defined(USE_SEQ_MACROS)
  ./linux/stat.h:#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ 
   2)
  
  Split __KERNEL__ check, make only positive, i.e.
  
  #if defined(__KERNEL__)
  #ifdef __KERNEL__
  
  ./linux/stat.h:#ifdef __KERNEL__
  
  No `#else` and ending part to contain comment:
  
  ./linux/smb_fs_sb.h:#endif /* __KERNEL__ */
  
  Simple enough:
  
  sed '/^#if[^_]*__KERNEL__/,/^#end[^_]*__KERNEL__/d'
 
 What are you trying to say with the above?
 Sorry but I lost track of part of the discussion but you seems to havea point 
 here?

I want to suggest more easy and tools-friendly way of processing header
files in the headrer_install target. One line above, one paragraph in
CodingStyle, one tree revision from KJ group.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] arch/i386/boot rebuilt on every compile...

2007-07-17 Thread Oleg Verych
On Tue, Jul 17, 2007 at 10:27:22PM +0200, Sam Ravnborg wrote:
 On Tue, Jul 17, 2007 at 11:49:42AM -0700, H. Peter Anvin wrote:
  For some reason, everything in arch/i386/boot is rebuilt on every
  compile.  It's not a huge time waster, but it has annoyed people enough
  that they ask me about it.  version.o and setup.elf obviously would,
  since they contain a version string, but none of the other .o files have
  any obvious reason for being rebuild, and the .cmd files don't show any
  dependencies that I would expect to be revved for each revision.
  
  Help?
 
 Seen it to - but were busy with other stuff.
 
 If you do a
 $ make V=2
 Then you will notice that kbuild tells you that the .o files are built because
 they are not listed in $(targets).
 
 Reading the commonts in scripts/Kbuild.include it says:
 this is most likely a bug in your kbuild file.
 
 So I did the following and it cured it:

Also fine manual in the Documentation/kbuild states:

|Note: It is a common mistake to forget the target := assignment,
|  resulting in the target file being recompiled for no
|  obvious reason.


Now, Sam, see how people are trying to escape from the noise of the
LKML. Yet you are not CC patches and anything here, e.g. .23 updates :(

 [PATCH] x86: do not recompile boot for each build
 
 Signed-off-by: Sam Ravnborg [EMAIL PROTECTED]


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] Mucking with assembly files

2007-07-10 Thread Oleg Verych
On Tue, Jul 10, 2007 at 10:19:14AM -0700, H. Peter Anvin wrote:
 I seem to always be the one with the kbuild corner cases...
 
 As part of my x86 setup rewrite, there has been some concern that using
 asm(.code16gcc); isn't as safe as it should be (because of gcc
 reordering), and making it safe apparently means disabling optimizations
 that adds at least 5% to the code size.  Not really a huge deal, but
 undesirable in the long run.
 
 The alternative is to compile to a .s file and then inject .code16gcc
 to the top of the .s file before assembling it into a .o file.  This
 means overriding some of kbuild's implicit rules, and I'm not sure how
 to do that cleanly.

As part of my kbuild/kconfig pre-rewrite info collecting... whatever :)

I did asm-offsets build rewrite RFC four week ago:
http://mid.gmane.org/[EMAIL PROTECTED]

You may be interested in it. But Sam is busy, nothing happend since
then.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] [patch 01/03] kbuild, asm-values: infrastructure

2007-06-14 Thread Oleg Verych
Jun 13, 2007 at 01:36:51AM +0200, asm-values patch set:
   * header with widely used value definitions
   * handle all asm-related things in one file (Makefile.asm)
   * move some asm bits from Makefile.build there
 (rule %.s:%.c)
   * add script to generate headers from assembles output
 (hopefully better output, MIPS testing/joining to all arch
  probably needed)
 
 rfc-by: Oleg Verych
 ---

So, is it another not so juicy lets-break-it-all stuff from me, or it just
doesn't apply for you?

I thought update all that asm-offsets stuff just like that. I want to
know, why it does not fit.

Thanks.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] Removing of dummy asm-offset files (Re: [patch 02/03] kbuild, asm-values: successor of asm-offsets)

2007-06-13 Thread Oleg Verych
[]
 +# legacy asm-offsets support (FIXME: convert all archs and remove this)
 +old = $(shell test -e $(srctree)/arch/$(ARCH)/kernel/asm-offsets.c  echo 
 yes)
 +ifeq ($(old),yes)
 +asm-values   =asm-offsets
 +else
 +asm-values   =asm-values

One more test here, and files like
|-*-
[EMAIL PROTECTED]:/mnt/work/pc/kernel.org/linux-2.6.22-rc4-mm2$ 
arch/sparc64/kernel/asm-offsets.c dd
/* Dummy asm-offsets.c file. Required by kbuild and ready to be used - hint! */
|-*-
can be removed.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] [patch] kbuild: remember ARCH in the object directory

2007-06-12 Thread Oleg Verych
[patch] kbuild: remember ARCH in the object directory

 - rephrase some related (misspelled) comments,
 - remove all trailing whitespace in the top Makefile,

 * remember ARCH in the output directory, thus making build of i386
   on amd64 *actually* convenient,

 - harmless refactoring of the Makefile generating.

Signed-off-by: Oleg Verych [EMAIL PROTECTED]
---
-o--=O`C  /. .\
 #oo'L O  o
___=E M^--

 Just lazy typing `make ARCH=i386` every time i want to check lguest.

 Makefile   |   17 -
 scripts/mkmakefile |   42 --
 2 files changed, 32 insertions(+), 27 deletions(-)

Index: linux-2.6.22-rc4-mm2/scripts/mkmakefile
===
--- linux-2.6.22-rc4-mm2.orig/scripts/mkmakefile2007-06-12 
11:21:27.755466250 +0200
+++ linux-2.6.22-rc4-mm2/scripts/mkmakefile 2007-06-12 12:04:13.675826250 
+0200
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/sh -e
 # Generates a small Makefile used in the root of the output
-# directory, to allow make to be started from there.
-# The Makefile also allow for more convinient build of external modules
+# directory, to allow kernel build to be started from there.
+# External modules can't built with it as well.
 
 # Usage
@@ -9,28 +9,34 @@
 # $3 - version
 # $4 - patchlevel
+# $5 - ARCH
 
+set -e
 
-test ! -r $2/Makefile -o -O $2/Makefile || exit 0
 echo   GEN $2/Makefile
+echo #
+# Automatically generated by
+# $0
+#
+VERSION= $3
+PATCHLEVEL = $4
+
+KERNELSRC  = $1
+KERNELOUTPUT   = $2
+ARCH   = $5
+ $2/Makefile
 
-cat  EOF  $2/Makefile
-# Automatically generated by $0: don't edit
+cat  EOF  $2/Makefile
+MAKEFLAGS  += -rR --no-print-directory
 
-VERSION = $3
-PATCHLEVEL = $4
+export ARCH
 
-KERNELSRC:= $1
-KERNELOUTPUT := $2
-
-MAKEFLAGS += --no-print-directory
+all:
+   $(MAKE) -C $(KERNELSRC) O=$(KERNELOUTPUT)
 
-.PHONY: all \$(MAKECMDGOALS)
+$(filter-out all Makefile,$(MAKECMDGOALS)) %/:
+   $(MAKE) -C $(KERNELSRC) O=$(KERNELOUTPUT) $@
 
-all:
-   \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT)
+.PHONY: all $(MAKECMDGOALS)
 
 Makefile:;
-
-\$(filter-out all Makefile,\$(MAKECMDGOALS)) %/:
-   \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@
 EOF
Index: linux-2.6.22-rc4-mm2/Makefile
===
--- linux-2.6.22-rc4-mm2.orig/Makefile  2007-06-12 11:35:20.559513250 +0200
+++ linux-2.6.22-rc4-mm2/Makefile   2007-06-12 11:51:10.438877000 +0200
@@ -156,5 +156,5 @@ export srctree objtree VPATH TOPDIR
 # first, and if a usermode build is happening, the ARCH=um on the command
 # line overrides the setting of ARCH below.  If a native build is happening,
-# then ARCH is assigned, getting whatever value it gets normally, and 
+# then ARCH is assigned, getting whatever value it gets normally, and
 # SUBARCH is subsequently ignored.
 
@@ -242,5 +242,5 @@ export KBUILD_CHECKSRC KBUILD_SRC KBUILD
 #
 # If $(quiet) is empty, the whole command will be printed.
-# If it is set to quiet_, only the short version will be printed. 
+# If it is set to quiet_, only the short version will be printed.
 # If it is set to silent_, nothing will be printed at all, since
 # the variable $(silent_cmd_cc_o_c) doesn't exist.
@@ -352,11 +352,10 @@ scripts/basic/%: scripts_basic ;
 
 PHONY += outputmakefile
-# outputmakefile generates a Makefile in the output directory, if using a
-# separate output directory. This allows convenient use of make in the
-# output directory.
 outputmakefile:
+# generate a Makefile in the output directory, if using a
+# separate output directory; allows convenient use of make there
 ifneq ($(KBUILD_SRC),)
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
-   $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
+   $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) $(ARCH)
 endif
 
@@ -699,5 +698,5 @@ endef
 cmd_ksym_ld = $(cmd_vmlinux__)
 define rule_ksym_ld
-   : 
+   :
+$(call cmd,vmlinux_version)
$(call cmd,vmlinux__)
@@ -750,5 +749,5 @@ endif
$(Q)rm -f .old_version
 
-# The actual objects are generated when descending, 
+# The actual objects are generated when descending,
 # make sure no implicit rule kicks in
 $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
@@ -1454,5 +1453,5 @@ endif
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
 
-# FIXME Should go into a make.lib or something 
+# FIXME Should go into a make.lib or something
 # ===
 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel

Re: [kbuild-devel] [patch] kbuild: remember ARCH in the object directory

2007-06-12 Thread Oleg Verych
On Tue, Jun 12, 2007 at 09:12:09AM -0700, Randy Dunlap wrote:
[]
 I did:
 
 # build a linux-2.6.22-rc4-git4 kernel source tree  cd into it
 # mkdir BLD
 $ make ARCH=i386 O=BLD defconfig
 $ make -j4 O=BLD all BLD/bld.out 21
 
 and it cried to me:
 
   GEN /scsi/linsrc/linux-2.6.22-rc4-git4/BLD/Makefile
 scripts/kconfig/conf -s arch/x86_64/Kconfig
 #... many config warning lines
 *
 * Restart config...
 *
 *
 * Processor type and features
 *
 Subarchitecture Type
  1. PC-compatible (X86_PC)
   2. Support for ScaleMP vSMP (X86_VSMP) (NEW)
 choice[1-2]: aborted!
 
 Console input/output is redirected. Run 'make oldconfig' to update 
 configuration.
 
 make[3]: *** [silentoldconfig] Error 1
 make[2]: *** [silentoldconfig] Error 2
 make[1]: *** [include/config/auto.conf] Error 2
 make: *** [all] Error 2
 
[] 

 What did I do wrong??

That Makefile is used only, if you are *in* that obj. directory.
Thus `cd BLD` is what you've forget.

There must be a better way to have this kind of choice be saved,
but it's chicken-and-egg issue from the kconfig POV.

As i'm always try to use separate obj. dir., i've made life easier
*in* it.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] [patch] kbuild: remember ARCH in the object directory

2007-06-12 Thread Oleg Verych
On Tue, Jun 12, 2007 at 08:09:57PM +0200, Sam Ravnborg wrote:
[]
 If we go the save important parts of the config I prefer
 something along the suggestion by hpa with a config file.
 The config file should though be named along the lines
 of Kbuild.config and the syntax should be future proof.
 I like the syntax of the .git/config file and
 it should be along these lines.
 
 And the bahavior should be exactly the same for all uses
 listed above.

Agree. But this will be another story.

Anyway, patch without those 3 lines with ARCH is quite useful, don't
you think ?;)


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] [patch 02/03] kbuild, asm-values: successor of asm-offsets

2007-06-12 Thread Oleg Verych
Some asm-offsets files define not only offsets, thus make it clear.
Legacy files are supported, but may be freely changed to new scheme.

rfc-by: Oleg Verych
---
 If somebody agrees, of course.

 Kbuild |   68 ---
 1 file changed, 24 insertions(+), 44 deletions(-)

Index: linux-2.6.22-rc4-mm2/Kbuild
===
--- linux-2.6.22-rc4-mm2.orig/Kbuild2007-06-13 01:25:27.696264750 +0200
+++ linux-2.6.22-rc4-mm2/Kbuild 2007-06-13 01:28:10.306427250 +0200
@@ -1,60 +1,40 @@
 #
-# Kbuild for top-level directory of the kernel
-# This file takes care of the following:
-# 1) Generate asm-offsets.h
-# 2) Check for missing system calls
-
-#
-# 1) Generate asm-offsets.h
+# Kbuild for top-level directory of the Linux
 #
+# 1) Generate (if needed) asm-values.h (former asm-offsets) for ARCH
+# 2) Check for missing system calls
 
-offsets-file := include/asm-$(ARCH)/asm-offsets.h
+
+# 1)
 
-always  := $(offsets-file)
-targets := $(offsets-file)
-targets += arch/$(ARCH)/kernel/asm-offsets.s
-clean-files := $(addprefix $(objtree)/,$(targets))
-
-# Default sed regexp - multiline due to syntax constraints
-define sed-y
-   /^-/{s:^-\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; 
s:-::; p;}
-endef
-# Override default regexp for specific architectures
-sed-$(CONFIG_MIPS) := /^@@@/{s/^@@@//; s/ \#.*\$$//; p;}
-
-quiet_cmd_offsets = GEN $@
-define cmd_offsets
-   (set -e; \
-echo #ifndef __ASM_OFFSETS_H__; \
-echo #define __ASM_OFFSETS_H__; \
-echo /*; \
-echo  * DO NOT MODIFY.; \
-echo  *; \
-echo  * This file was generated by Kbuild; \
-echo  *; \
-echo  */; \
-echo ; \
-sed -ne $(sed-y) $; \
-echo ; \
-echo #endif )  $@
-endef
+# legacy asm-offsets support (FIXME: convert all archs and remove this)
+old = $(shell test -e $(srctree)/arch/$(ARCH)/kernel/asm-offsets.c  echo yes)
+ifeq ($(old),yes)
+asm-values =asm-offsets
+else
+asm-values =asm-values
+endif
+asm-values_c   := $(src)/arch/$(ARCH)/kernel/$(asm-values).c
+asm-values_h   := $(obj)/include/asm-$(ARCH)/$(asm-values).h
+asm-values := $(obj)/arch/$(ARCH)/kernel/$(asm-values).s
+include $(srctree)/scripts/Makefile.asm
 
-# We use internal kbuild rules to avoid the is up to date message from make
-arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE
+$(asm-values): $(asm-values_c) FORCE
$(Q)mkdir -p $(dir $@)
$(call if_changed_dep,cc_s_c)
 
-$(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild
+$(asm-values_h): $(asm-values) Kbuild
$(Q)mkdir -p $(dir $@)
-   $(call cmd,offsets)
+   $(call cmd,mkasm-values,$(ARCH))
 
-#
-# 2) Check for missing system calls
-#
+
+# 2)
 
 quiet_cmd_syscalls = CALL$
   cmd_syscalls = $(CONFIG_SHELL) $ $(CC) $(c_flags)
 
-PHONY += missing-syscalls
 missing-syscalls: scripts/checksyscalls.sh FORCE
$(call cmd,syscalls)
+
+PHONY += missing-syscalls
+.PHONY: $(PHONY)

--


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] [patch 00/03] kbuild, asm-values: not only offsets, not only for $ARCH

2007-06-12 Thread Oleg Verych
 Version number zer0.
--
-o--=O`C
 #oo'L O
___=E M


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] [patch 03/03] kbuild, asm-values: private for lguest

2007-06-12 Thread Oleg Verych
A small example of how it can be used privately.

rfc-by: Oleg Verych
---
 TODO: change lguest files to use it.

 drivers/lguest/Makefile |4 
 drivers/lguest/asm-values.c |   24 
 2 files changed, 28 insertions(+)

Index: linux-2.6.22-rc4-mm2/drivers/lguest/Makefile
===
--- linux-2.6.22-rc4-mm2.orig/drivers/lguest/Makefile   2007-06-13 
01:25:17.931654500 +0200
+++ linux-2.6.22-rc4-mm2/drivers/lguest/Makefile2007-06-13 
01:29:01.337616500 +0200
@@ -1,2 +1,6 @@
+# Generate private asm-values.h
+ASM_NS = LGUEST
+include $(srctree)/scripts/Makefile.asm
+
 # Guest requires the paravirt_ops replacement and the bus driver.
 obj-$(CONFIG_LGUEST_GUEST) += lguest.o lguest_asm.o lguest_bus.o
Index: linux-2.6.22-rc4-mm2/drivers/lguest/asm-values.c
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ linux-2.6.22-rc4-mm2/drivers/lguest/asm-values.c2007-06-13 
01:29:01.337616500 +0200
@@ -0,0 +1,24 @@
+/*
+ * Private definitions needed by lguest's assembly language modules.
+ */
+
+#include linux/lguest.h
+#include lg.h
+#include asm-generic/asm-values.h
+
+void fell_guest(void);
+
+void fell_guest(void)
+{
+   OFFSET(LGUEST_DATA_irq_enabled, lguest_data, irq_enabled);
+   OFFSET(LGUEST_PAGES_host_gdt_desc, lguest_pages, state.host_gdt_desc);
+   OFFSET(LGUEST_PAGES_host_idt_desc, lguest_pages, state.host_idt_desc);
+   OFFSET(LGUEST_PAGES_host_cr3, lguest_pages, state.host_cr3);
+   OFFSET(LGUEST_PAGES_host_sp, lguest_pages, state.host_sp);
+   OFFSET(LGUEST_PAGES_guest_gdt_desc, lguest_pages,state.guest_gdt_desc);
+   OFFSET(LGUEST_PAGES_guest_idt_desc, lguest_pages,state.guest_idt_desc);
+   OFFSET(LGUEST_PAGES_guest_gdt, lguest_pages, state.guest_gdt);
+   OFFSET(LGUEST_PAGES_regs_trapnum, lguest_pages, regs.trapnum);
+   OFFSET(LGUEST_PAGES_regs_errcode, lguest_pages, regs.errcode);
+   OFFSET(LGUEST_PAGES_regs, lguest_pages, regs);
+}

--


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] [patch] scripts: clean-whitespace.sh

2007-06-08 Thread Oleg Verych
After running this script with filename as parameter,
look (with diff) for, what can be corrected.

Only *.diff and *.patch files are handled as patches.

Signed-off-by: Oleg Verych [EMAIL PROTECTED]
--
 Two clean rules added, that can change look of damaged lines.
 Yet script still fits one ordinary screen, so read the code!

 test cases: include/linux/ipv6.h, arch/x86_64/lib/{copy_user, memcpy}.S

 It's like lguest -- just for fun.

 clean-whitespace.sh |   28 
  1 file changed, 28 insertions(+)

--- /dev/null   2007-04-04 10:55:19.204075250 +0200
+++ linux-just-for-fun/scripts/clean-whitespace.sh  2007-06-08 
07:53:21.0 +0200
@@ -0,0 +1,28 @@
+#!/bin/sh -e
+# clean whitespace damage; i/o = $1/$1.clean
+
+IFS='' ; t=`printf '\t'` ; s=' ' ; s4=$s$s$s$s ; w79=79 ;
+i=$1 ; o=$1.clean
+strip_file_end='/^$/{N;s_^\n$__;T e;:n;N;s_^.*\n\n$__;t n;:e;};'
+not_patch_line='/^+[^+]/'
+
+case $1 in *[.]diff | *[.]patch)
+   file=patch ; sp='+[!+]' ; p='+' ; addr=$not_patch_line;;
+esac
+
+sed -n ${addr:-$strip_file_end} {
+s|[$t$s]*$||;  # trailing whitespace
+:next; # x*8 spaces on the line start - x*tabs
+s|^\([\n]*\)$p\($t*\)$s4$s4|\1$p\2$t|;t next;  # \n is needed after N command
+s|^\([\n]*\)$p\($t*\)$s*$t|\1$p\2$t|g; # strip spaces between tabs
+s|$s4$s4$s$s*|$t$t|g   # more than 8 spaces - 2 tabs
+s|$s*$t|$t|g   # strip spaces before tab; tradeoff: may break some alignment !
+};p -- $i $o  echo 
+please, see clean ${file:=source} file: $o
+
+exec expand $i | while read -r line # check for long line
+do   [ ${#line} -gt $w79 ]  case $line in $sp*) echo \
+at least one line wider than $w79 chars, found
+check your $file, please
+ 12 ; exit ;; esac
+done

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] [patch] scripts: clean-whitespace.sh

2007-06-08 Thread Oleg Verych
On Fri, Jun 08, 2007 at 04:28:49PM +0200, Sam Ravnborg wrote:
 On Thu, Jun 07, 2007 at 11:44:59PM -0700, Andrew Morton wrote:
  
  Then again, it's a better strategy than trying to read the code ;)
  
  Please, tell us what it does, so that we can decide whether we want it in
  Linux.
 
 It does the same as cleanfile.pl.
 I have seen no reason to replace cleanfile.pl with this version.

It does better whitespace cleanup, than

scripts/{cleanfile *and* cleanpatch}

togather with more user, operating system kernel-friendly approach.
Please, test it on proposed testcase - ipv6.h, and you will see, what i'm
talking about. Patch description + script name is all one must to know to
start use it *safely*.

 Linecount is down but so is maintainability / extendability.

Really? If you think so...

For those, who have (X)emacs on board, i recommend develock.el as
good damage-showing tool.

Sorry, Andrew, for garbage in you patch subject filters :)


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] [patch] scripts: clean-whitespace.sh

2007-06-08 Thread Oleg Verych
On Fri, Jun 08, 2007 at 09:05:54PM +0200, Sam Ravnborg wrote:
[]
  
  It does better whitespace cleanup, than
  
  scripts/{cleanfile *and* cleanpatch}
 
 Made a short test here.
 Added the following to a file:
 
 static sam = ;
 
 clean-whitespace replaced spaces within  with tabs.
 cleanfile did not.

So, user with `diff` will see that and fix or a way of usage spaces in
strings, or will update BRE, used for that kind of match ;)

Still, better job:
|-*- 
[EMAIL PROTECTED]:/tmp$ ls -l ipv62.h.clean
-rw-r- 1 olecom root 10591 Jun  8 22:47 ipv62.h.clean +2 bytes
[EMAIL PROTECTED]:/tmp$ ls -l ipv66.h
-rw-r- 1 olecom root 10704 Jun  8 22:47 ipv66.h
[EMAIL PROTECTED]:/tmp$
|-*-

But there will be two shifted words, because it doesn't calculate
tabstops. I've choose to remove spaces before tab, so it will be visible
and easy to fix by hand. Only spaces up-to next tabstop - 1 after
possible tab is OK.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] Another version of cleanfile/cleanpatch

2007-06-07 Thread Oleg Verych
On Thu, Jun 07, 2007 at 04:19:56PM -0700, H. Peter Anvin wrote:
 Oleg Verych wrote:
  
  Because of that, i think, following is redundant:
  
  - to check for binary files
 
 find . -type f | xargs cleanfile

What about patches?

Anyway, by agreement (with myself), i've stopped on having per-file-name
division (prev. message first patch, and that was last design remaining
from cleanfile/cleanpatch). So:

for f in $*
do clean-whitespace $f 21 /dev/null
done

But this doesn't look like interactive usage, which i've concluded.
Plus copy is saved in $f.clean file, so user can `diff -u` to see any
destruction and possibly report a bug.

[] 
  - scan whole file for long lines, with useless bunch of messages about
ones. Useless, because script doesn't fix that, it can't do that!
 
 Still useful to let the human know what is going on, and why.

What i've done was `cleanpatch patch-2.6.21-rc4-rc5`
That's where usefulness comes from ;)

   -hpa


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] Sunifdef

2007-06-07 Thread Oleg Verych

* From: David Woodhouse
* Date: Thu, 24 May 2007 11:32:45 -0400

 On Wed, 2007-05-23 at 13:29 +0100, Jonathan Underwood wrote:
 Dear Kernel list,
 
 I've noticed in the past that unifdef is used in kernel package
 building. I wonder if you're aware of a maintained and more
 featureful program, Sunifdef, which has evolved from unifdef (which
 seems mostly unmaintained). It's packaged for Fedora, and has a
 website here.

 The kernel no longer uses an external unifdef -- it has its own in
 scripts/unifdef.c. If you want to work with the upstream kernel to
 change that to sunifdef, go ahead.

 Can 'sunifdef -U__KERNEL__' fix up stuff like...

 #if defined(__KERNEL__)  defined(__FOO__)
  and
 #if defined(__KERNEL__) || defined(__BAR__)

 ... by treating them as '#if 0' (and eliding completely) and by
 rewriting to just #ifdef __BAR__, respectively? If so, changing the
 upstream kernel seems like it would be useful.

If, what you've wrote would be policy (with watchdog script in the git),
i think, simple (sed) scripts can be written to unifdef __KERNEL__ for
userspace headers, with further sed'ing them(compiler.h), without any
need of external or internal *programs*.

Linux coding standards got rid of many C obfustications, happily.

-*-
[EMAIL PROTECTED]:/tmp$ grep -e __KERNEL /usr/include/linux/soundcard.h | grep 
'!'
#if (!defined(__KERNEL__)  !defined(KERNEL)  !defined(INKERNEL)  
!defined(_KERNEL)) || defined(USE_SEQ_MACROS)
[EMAIL PROTECTED]:/tmp$
-*-
Even this one is simple regex, but anyway, policy would be good.

 -- 
 dwmw2


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] Another version of cleanfile/cleanpatch (Re: [PATCH 08/19] scripts: Make cleanfile/cleanpatch warn about long lines)

2007-06-06 Thread Oleg Verych
While i'm against whitespace damaged files or patches since my very
first patch, and don't like brain damaged programmer's tools called
text editors, i also want to encourage UNIX-way of using userspace.

Of course, i might be wrong and foolish. Anyway, what i'm trying to do
is not to become new generation of Visual Perl#(R) implemented in
Java(R) using XML with userspace, that suck.

Many things in XXI century still can be done by tools founded 20-30
years ago. Why not try to?

Here is script proposal and test case, just for interested parties.
--
-o--=O`C  info emacs : faq
 #oo'L O  info make  : not found
___=E M  man gcc: not found


clean-whitespace.sh
Description: Bourne shell script
# last spaces must NOT be striped to two tabs
 tabspacespaces tab spaces tab
# trailing tabs mixed with spaces

2x8 spaces, must be 2xtabs
tab spaces tab, bust be 2 tabs

# more trailing whitespace
bar 


## Automatically generated incremental diff
## From:   linux-2.6.21-rc4
## To: linux-2.6.21-rc5
## Robot:  $Id: make-incremental-diff,v 1.12 2004/01/06 07:19:36 hpa Exp $

--- linux-2.6.21-rc4/Documentation/kernel-parameters.txt2007-03-25 
23:12:16.654792317 +
# dont strip trailing whitespace
+++ linux-2.6.21-rc5/Documentation/kernel-parameters.txt2007-03-25 
23:12:21.243287617 +  
@@ -138,6 +138,12 @@

-   int gpio_direction_output(unsigned gpio);
# tab space tab - tab tab, strip trailing whitespace
+   int gpio_direction_output(unsigned gpio, int value);  
 
 The return value is zero for success, else a negative errno.  It should
 be checked, since the get/set calls don't have error returns and since
 misconfiguration is possible.  (These calls could sleep.)
# dont touch space
 
+  tester, add space for wide line  ... vided becomes the initial output value.

# end of file, must be one new line
efwef





-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] Another version of cleanfile/cleanpatch

2007-06-06 Thread Oleg Verych
On Wed, Jun 06, 2007 at 07:50:26PM +0200, Sam Ravnborg wrote:
[]
  Many things in XXI century still can be done by tools founded 20-30
  years ago. Why not try to?
 
 Because your shell script is unreadable by normal human beings[*]
 while the perl script for people with a bit of perl fu can read it
 and fix/modify it.
 
 We want tools that can be maintained and enhanced by most people.
 
 [*] Normal human beings are people with same level of shell
 scripting/sed skills that I have just to put that straight.

In many cases i think, it's limiting one's imagination and expanding
laziness[0].

In the school algebra (usually) there are many exercises with
plain-useless equations and formulas you must solve or simplify.
Guess why? Thus my proposition. ;)

---
[0] Now, when most UNIX tools done with good quality (courtesy of the
GNU project), it's time not to convert programmer's laziness[1] to
ordinary one. Why there's one big and slow Bourne again shell, yet
to have fast ([d]ash) and tiny one took more time? As result more
efforts to remove bashizms...

[1] Ironically connected to Perl chapter of UNIX Power Tools
http://unix.org.ua/orelly/unix/upt/ch37_02.htm


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] [PATCH 08/19] scripts: Make cleanfile/cleanpatch warn about long lines

2007-06-05 Thread Oleg Verych
On Tue, Jun 05, 2007 at 10:19:59AM +0200, Sam Ravnborg wrote:
[]
  So, there are some new scripts. What if my proposition will be better,
  so to speak? Any problems i'm willing to fix/enhance.
  
  Note: only one copy of the file required. Sym-linked name *diff* or
  *patch* will process patches. I know, that symlinks in sources isn't
  good, thus change $0 - $1 will process first parameter.
 
 Sorry - but I really do not get your point here.
 Are you trying to say that current cleanpatch is not good enough
 or do you propose a new script to do something similar?

Better means, less bloated scripts in the source tree to make
userspace suck less...

 We do not want everyones favorite patch preprocessing script
 in the kernel. So the only option is to incorporate changes in
 cleanpatch.

I don't see scripts/clean* in .21, so decided, to make a hopefully
better, nicer unix-way and posix re-write, this morning.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] [PATCH 08/19] scripts: Make cleanfile/cleanpatch warn about long lines

2007-06-05 Thread Oleg Verych
On Tue, Jun 05, 2007 at 04:12:54PM +0200, Sam Ravnborg wrote:
 On Tue, Jun 05, 2007 at 03:38:34PM +0200, Oleg Verych wrote:
  On Tue, Jun 05, 2007 at 10:19:59AM +0200, Sam Ravnborg wrote:
  []
   If on the other hand you are proposing a script to clean whitespace
   damage in the code then git already does this nicely.
  
  I've read that too quickly, sorry. What then all that clean scripts
  are for?
 cleanfile compress spaces to tabs where appropriate. It does more
 than just warn about too long lines and remove leading whitespace.

Ah!

It's not an occasion, that this script does job of two, you are referring
to. I should add documentation to this script, that will far longer, that
script itself.

-*- slightly i/o optimized clean-whitespace.sh -*-
#!/bin/sh -e
# clean whitespace damage; i/o=stdin/stdout
#
IFS='' ; t=`printf '\t'` ; s=' ' ; s7=$s$s$s$s$s$s$s ; w79=79 ;
case $0 in *diff* | *patch*) p='+' ; s='';; esac

expand | while read line
do case $line in
   ++*) echo $line;;
   $p*) [ ${#line} -gt $w79 ]  : ${long:=line}
echo $line | sed /^$p/{s_ *\$__;s_^$p$s7${s}_$p${t}_;s_$s7 _${t}_g}
;;
 *) echo $line;;
   esac
done
[ -n $long ]  echo at least one line, wider than $w79 chars, found 12

-*-

First line stops word splitting, puts tab symbol in t, space in s,
seven spaces to s7 and line width limit to w79.

Second -- adjust set variables for need of unified diff processing, if
name of the script $0 (can be changed to match command-line
parameters) have diff or patch.

Last -- bark, if there is at least one line longer that w79.

Rest is processing of files/patches to expand(posix tool) tabs to spaces
then:
- patches are processed only by lines, starting from `+', but not `++'
- remove trailing whitespace;
- substitute eight spaces to one tab symbol
- patches have linestart`+tab' expanded to seven spaces, due to `+' and
  tabstop, thus seven spaces are substituted in this case.

Anything else, if have not noticed in whitespace damage matching can be
added on request ;)

 Please look at latest -git tree if you are trying to improve
 the clean* scripts or add counterparts.
 
 Thanks,
   Sam


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] [PATCH 08/19] scripts: Make cleanfile/cleanpatch warn about long lines

2007-06-05 Thread Oleg Verych
On Tue, Jun 05, 2007 at 04:57:59PM +0200, Oleg Verych wrote:
[]
 expand | while read line
 do case $line in
++*) echo $line;;
$p*)   [ ${#line} -gt $w79 ]  : ${long:=line}
   echo $line | sed /^$p/{s_ *\$__;s_^$p$s7${s}_$p${t}_;s_$s7 _${t}_g}
   ;;
  *) echo $line;;
esac
 done
 [ -n $long ]  echo at least one line, wider than $w79 chars, found 12
 
 -*-
[]
 Last -- bark, if there is at least one line longer that w79.

Well, if test will be in the pipe end, i.e. ... | { while; test lingth; }



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] [request for testing] kbuild: improving option checking

2007-01-24 Thread Oleg Verych
kbuild: improving option checking

 GNU binutils, root users, tmpfiles, external modules ro builds must
 be fixed to do the right thing now.

 In safe environment new /dev/null replacement may be use as simply as
 `echo  null', `gcc -o null'. In aggressive starting with $(null) is
 recommended.

 Feature: file $(objtree)/null isn't in any clear target (yet).

Cc: Roman Zippel [EMAIL PROTECTED]
Cc: Sam Ravnborg [EMAIL PROTECTED]
Signed-off-by: Oleg Verych [EMAIL PROTECTED]
---
-o--=O`C
 #oo'L O
___=E M

--- linux~2.6.20-rc5/scripts/Kbuild.include~blackhole-4-tmpfiles
2007-01-12 19:54:26.0 +0100
+++ linux~2.6.20-rc5/scripts/Kbuild.include 2007-01-24 09:19:01.386426000 
+0100
@@ -2,5 +2,5 @@
 # kbuild: Generic definitions
 
-# Convinient variables
+# Convinient constants
 comma   := ,
 squote  := '
@@ -8,4 +8,7 @@
 space   := $(empty) $(empty)
 
+# Immortal black-hole for mortals and roots
+null = $(shell test -L null || (rm -f null; ln -s /dev/null null); echo null)
+
 ###
 # Name of target with a '.' as filename prefix. foo/bar.o = foo/.bar.o
@@ -57,33 +60,43 @@
 # See documentation in Documentation/kbuild/makefiles.txt
 
-# output directory for tests below
-TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
-
 # as-option
 # Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,)
-
-as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \
--xassembler /dev/null  /dev/null 21; then echo $(1); \
-else echo $(2); fi ;)
+define as-option
+  $(shell
+if $(CC) $(CFLAGS) $(1) -c -o $(null) -xassembler null null 21; \
+  then echo $(1); \
+  else echo $(2); \
+fi)
+endef
 
 # as-instr
 # Usage: cflags-y += $(call as-instr, instr, option1, option2)
-
-as-instr = $(shell if echo -e $(1) | \
- $(CC) $(AFLAGS) -c -xassembler - \
-   -o $(TMPOUT)astest.out  /dev/null 21; \
-  then rm $(TMPOUT)astest.out; echo $(2); \
-  else echo $(3); fi)
+define as-instr
+  $(shell \
+if printf $(1) | $(AS) $(null) 21 -W -o null; \
+  then echo $(2); \
+  else echo $(3); \
+fi)
+endef
 
 # cc-option
 # Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)
-
-cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
-  /dev/null 21; then echo $(1); else echo $(2); fi ;)
+define cc-option
+  $(shell \
+if $(CC) $(CFLAGS) $(1) -S -o $(null) -xc null null 21; \
+  then echo $(1); \
+  else echo $(2); \
+fi)
+endef
 
 # cc-option-yn
 # Usage: flag := $(call cc-option-yn, -march=winchip-c6)
-cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
- /dev/null 21; then echo y; else echo n; fi;)
+define cc-option-yn
+  $(shell \
+if $(CC) $(CFLAGS) $(1) -S -o $(null) -xc null null 21; \
+  then echo y; \
+  else echo n; \
+fi)
+endef
 
 # cc-option-align
@@ -103,8 +116,11 @@
 # ld-option
 # Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both)
-ld-option = $(shell if $(CC) $(1) -nostdlib -xc /dev/null \
--o $(TMPOUT)ldtest.out  /dev/null 21; \
- then rm $(TMPOUT)ldtest.out; echo $(1); \
- else echo $(2); fi)
+define ld-option
+  $(shell \
+if $(CC) $(1) -nostdlib -o $(null) -xc null null 21; \
+  then echo $(1); \
+  else echo $(2); \
+fi)
+endef
 
 ###
@@ -116,4 +132,5 @@
 # Prefix -I with $(srctree) if it is not an absolute path
 addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) 
$(1)
+
 # Find all -I options and call addtree
 flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o)))
@@ -126,5 +143,5 @@
 
 ###
-# if_changed  - execute command if any prerequisite is newer than 
+# if_changed  - execute command if any prerequisite is newer than
 #   target, or command line has changed
 # if_changed_dep  - as if_changed, but uses fixdep to reveal dependencies

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] spelling of Kbuild.include (Re: [request for testing] kbuild: improving option checking)

2007-01-24 Thread Oleg Verych
On Wed, Jan 24, 2007 at 05:37:00AM -0500, Robert P. J. Day wrote:
 On Wed, 24 Jan 2007, Oleg Verych wrote:
 
  kbuild: improving option checking
 ...
  --- linux~2.6.20-rc5/scripts/Kbuild.include~blackhole-4-tmpfiles
  2007-01-12 19:54:26.0 +0100
  +++ linux~2.6.20-rc5/scripts/Kbuild.include 2007-01-24 09:19:01.386426000 
  +0100
  @@ -2,5 +2,5 @@
   # kbuild: Generic definitions
 
  -# Convinient variables
  +# Convinient constants
  ^^
 Convenient

Kind of testing i never expected.

Are you serious?  If yes, here more spell things from there, take care
of the patch ;D
--
# Execute command if command has changed or prerequisitei(s) are updated
--
# Usage: $(call if_changed_rule,foo)
# will check if $(cmd_foo) changed, or any of the prequisites changed,
# and if so will execute $(rule_foo)
--

Anyway, i know for sure -- that things aren't variables ;D.
Variable $(space) == hyper-space. You know, what i mean.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] spelling of Kbuild.include (Re: [request for testing] kbuild: improving option checking)

2007-01-24 Thread Oleg Verych
24-01-2007, Robert P. J. Day:
 On Wed, 24 Jan 2007, Oleg Verych wrote:
[]
   -# Convinient variables
   +# Convinient constants
   ^^
  Convenient

 Kind of testing i never expected.

 um ... it wasn't testing, just a trivial observation.  happens
 on the LKML all the time.

And it usually ends with ENOPATCH, IMO.



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] [patch] kbuild: create KBUILD_OUTPUT

2007-01-23 Thread Oleg Verych
kbuild: create KBUILD_OUTPUT

 When requesting build to another directory, try to create it first.

Cc: Sam Ravnborg [EMAIL PROTECTED]
Signed-off-by: Oleg Verych [EMAIL PROTECTED]
---

,-*- bash -*-
|[EMAIL PROTECTED]:~/kernel.org/_work/src/linux-2.6.20-rc5$
|[EMAIL PROTECTED]:~/kernel.org/_work/src/linux-2.6.20-rc5$ make O=/tmp/build
|cd: 1: can't cd to /tmp/build
|Makefile:116: *** output directory /tmp/build does not exist.  Stop.
|[EMAIL PROTECTED]:~/kernel.org/_work/src/linux-2.6.20-rc5$ patch -p1 
../../va-patch/
|kbuild-create-output-dir.patch
|patching file Makefile
|[EMAIL PROTECTED]:~/kernel.org/_work/src/linux-2.6.20-rc5$ make O=/tmp/build
|HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/docproc make[3]: ***
|[scripts/basic/docproc] Interrupt make[2]: *** [scripts_basic] Interrupt
|make: *** [_all] Interrupt
|
|[EMAIL PROTECTED]:~/kernel.org/_work/src/linux-2.6.20-rc5$
`-*-

--- linux-2.6.20-rc5/Makefile~orig  2007-01-12 19:54:26.0 +0100
+++ linux-2.6.20-rc5/Makefile   2007-01-24 00:59:55.926951750 +0100
@@ -113,5 +113,5 @@
 # check that the output directory actually exists
 saved-output := $(KBUILD_OUTPUT)
-KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT)  /bin/pwd)
+KBUILD_OUTPUT := $(shell d=$(KBUILD_OUTPUT) ; mkdir -p $$d  cd $$d  pwd)
 $(if $(KBUILD_OUTPUT),, \
  $(error output directory $(saved-output) does not exist))

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] [patch] kbuild: fix tilded non backup files in localversion files

2007-01-23 Thread Oleg Verych
kbuild: fix tilded non backup files in localversion files

 Tildes as in path as in filenames are handled correctly now.

 Definition of `space' was removed, scripts/Kbuild.include has one.
 This definition was taken right from GNU make manual, while Kbuild's
 version is original.

Cc: Bastian Blank [EMAIL PROTECTED]
Cc: Sam Ravnborg [EMAIL PROTECTED]
Signed-off-by: Oleg Verych [EMAIL PROTECTED]
---
Original report and fix by Bastian Blank:

 The following patch fixes the problem that localversion files where
 ignored if the tree lives in a path which contains a ~. It changes the
 test to apply to the filename only.
 
 Debian allows versions which contains ~ in it. The upstream part of the
 version is in the directory name of the build tree and we got weird
 results because the localversion files was just got ignored in this
 case.
 
Test, note tildes also in src, build paths:
,-*- bash -*-
|[EMAIL PROTECTED]:/tmp/b~d$
|[EMAIL PROTECTED]:/tmp/b~d$ make mrproper  /dev/null
|[EMAIL PROTECTED]:/tmp/b~d$ make defconfig /dev/null
|[EMAIL PROTECTED]:/tmp/b~d$ cat include/config/kernel.release
|cat: include/config/kernel.release: No such file or directory
|[EMAIL PROTECTED]:/tmp/b~d$ ls localversion*
|localversion  localversion~  localversion~buba
|[EMAIL PROTECTED]:/tmp/b~d$ make prepare
|make -C /mnt/work/app-src-build/kernel.org/_work/src/linux~2.6.20-rc5
|O=/dev/shm/b~d prepare
|  GEN /dev/shm/b~d/Makefile
|  scripts/kconfig/conf -s arch/x86_64/Kconfig
|  Using
|/mnt/work/app-src-build/kernel.org/_work/src/linux~2.6.20-rc5 as
|source for kernel
|  GEN /dev/shm/b~d/Makefile
|  CHK include/linux/version.h
|  UPD include/linux/version.h
|  CHK include/linux/utsrelease.h
|  UPD include/linux/utsrelease.h
|  SYMLINK include/asm - include/asm-x86_64
|  CC  arch/x86_64/kernel/asm-offsets.s
|  GEN include/asm-x86_64/asm-offsets.h
|[EMAIL PROTECTED]:/tmp/b~d$ cat include/config/kernel.release
|2.6.20-rc5-olecom-f+buba
|[EMAIL PROTECTED]:/tmp/b~d$ cat localversion~
|-BUG
|[EMAIL PROTECTED]:/tmp/b~d$ cat localversion~buba
|+buba
|[EMAIL PROTECTED]:/tmp/b~d$ cat localversion
|-olecom-f
|[EMAIL PROTECTED]:/tmp/b~d$
`-*-

--- linux~2.6.20-rc5/Makefile~localversion-with-tilde   2007-01-24 
01:02:43.0 +0100
+++ linux~2.6.20-rc5/Makefile   2007-01-24 03:57:40.353436750 +0100
@@ -777,5 +777,5 @@
 #  $(localver-full)
 #$(localver)
-#  localversion*   (all localversion* files)
+#  localversion*   (all non backup localversion* files)
 #  $(CONFIG_LOCALVERSION)  (from kernel config setting)
 #$(localver-auto)  (only if CONFIG_LOCALVERSION_AUTO is 
set)
@@ -788,12 +788,6 @@
 # scripts/setlocalversion and add the appropriate checks as needed.
 
-nullstring :=
-space  := $(nullstring) # end of line
-
-___localver = $(objtree)/localversion* $(srctree)/localversion*
-__localver  = $(sort $(wildcard $(___localver)))
-# skip backup files (containing '~')
-_localver = $(foreach f, $(__localver), $(if $(findstring ~, $(f)),,$(f)))
-
+__localver = $(objtree)/localversion* $(srctree)/localversion*
+_localver  = $(patsubst %~,,$(sort $(wildcard $(__localver
 localver = $(subst $(space),, \
   $(shell cat /dev/null $(_localver)) \

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] [patch] Makefile: cancel implicit rules on included and top makefiles.

2006-11-12 Thread Oleg Verych

 `make -d help | grep Makefile` shows patterns, where make tries to rebuild
 included and top makefiles.
 Do not let make to do so, by canceling implicit rules on this files.
 This must apply for all kinds of top makefiles's targets: *config, *build.

 Signed-off-by: Oleg Verych [EMAIL PROTECTED]
---
 Makefile |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Index: linux-2.6.19-rc2-git7/Makefile
===
--- linux-2.6.19-rc2-git7.orig/Makefile 2006-10-22 13:01:08.0 +
+++ linux-2.6.19-rc2-git7/Makefile  2006-10-22 13:15:31.340337846 +
@@ -271,8 +271,10 @@
 # Look for make include files relative to root of kernel src
 MAKEFLAGS += --include-dir=$(srctree)
 
-# We need some generic definitions
-include  $(srctree)/scripts/Kbuild.include
+# We need some generic definitions from another makefile.
+# Do not let `make' to try its implicit rules on it.
+$(srctree)/scripts/Kbuild.include: ;
+include $(srctree)/scripts/Kbuild.include
 
 # Do not use make's built-in rules and variables
 # This increases performance and avoid hard-to-debug behavour
@@ -1484,6 +1486,9 @@
 PHONY += FORCE
 FORCE:
 
+# Cancel implicit rules on arch and top makefiles.
+$(srctree)/Makefile Makefile: ;
+$(srctree)/arch/$(ARCH)/Makefile: ;
 
 # Declare the contents of the .PHONY variable as phony.  We keep that
 # information in a variable se we can use it in if_changed and friends.

--

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] [patch 03/04, rfc] cancel implicit rules on included and top makefiles.

2006-11-12 Thread Oleg Verych
 `make -d help | grep Makefile` shows patterns, where make tries to rebuild
 included and top makefiles.
 Do not let make to do so, by canceling implicit rules on this files.
 This must apply for all kinds of top makefiles's targets: *config, *build.

 Signed-off-by: Oleg Verych [EMAIL PROTECTED]
---
 This one was submitted in hope, that it can be small and useful for .19.
 Anyway it's here for overall picture and possible resend.

 Makefile |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Index: linux-2.6.19-rc2-git7/Makefile
===
--- linux-2.6.19-rc2-git7.orig/Makefile 2006-10-23 07:01:37.209544992 +
+++ linux-2.6.19-rc2-git7/Makefile  2006-10-23 07:01:59.114793301 +
@@ -276,8 +276,10 @@
 export quiet Q KBUILD_VERBOSE
 
 
-# We need some generic definitions
-include  $(srctree)/scripts/Kbuild.include
+# We need some generic definitions from another makefile.
+# Do not let `make' to try its implicit rules on it.
+$(srctree)/scripts/Kbuild.include: ;
+include $(srctree)/scripts/Kbuild.include
 
 # Make variables (CC, etc...)
 
@@ -1499,6 +1501,9 @@
 PHONY += FORCE
 FORCE:
 
+# Cancel implicit rules on arch and top makefiles.
+$(srctree)/Makefile Makefile: ;
+$(srctree)/arch/$(ARCH)/Makefile: ;
 
 # Declare the contents of the .PHONY variable as phony.  We keep that
 # information in a variable se we can use it in if_changed and friends.

--


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] [patch 01/02] kbuild: tabify and strip trailing whitespaces

2006-11-12 Thread Oleg Verych
  Tabify and strip trailing whitespaces.

Cc: Sam Ravnborg [EMAIL PROTECTED]
Signed-off-by: Oleg Verych [EMAIL PROTECTED]
---
 (... or open/save/close in GNU Emacs. Linus and all friends, editing
 this file, doesn't seem to use decent editor, he-he; khm, sorry ;)

 As i was beginner, i wanted to start from something really simple. First
 thing, came in mind was `make help', then `make -d help'. Resulting
 patch will follow this one.

 Makefile |   60 ++--
 1 file changed, 30 insertions(+), 30 deletions(-)

Index: linux-2.6.19-rc2-git7/Makefile
===
--- linux-2.6.19-rc2-git7.orig/Makefile 2006-10-22 13:01:08.0 +
+++ linux-2.6.19-rc2-git7/Makefile  2006-10-22 15:42:48.379932033 +
@@ -152,7 +152,7 @@
 # SUBARCH tells the usermode build what the underlying arch is.  That is set
 # first, and if a usermode build is happening, the ARCH=um on the command
 # line overrides the setting of ARCH below.  If a native build is happening,
-# then ARCH is assigned, getting whatever value it gets normally, and 
+# then ARCH is assigned, getting whatever value it gets normally, and
 # SUBARCH is subsequently ignored.
 
 SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
@@ -238,7 +238,7 @@
 # cmd_cc_o_c   = $(CC) $(c_flags) -c -o $@ $
 #
 # If $(quiet) is empty, the whole command will be printed.
-# If it is set to quiet_, only the short version will be printed. 
+# If it is set to quiet_, only the short version will be printed.
 # If it is set to silent_, nothing will be printed at all, since
 # the variable $(silent_cmd_cc_o_c) doesn't exist.
 #
@@ -308,13 +308,13 @@
 # Use LINUXINCLUDE when you must reference the include/ directory.
 # Needed to be compatible with the O= option
 LINUXINCLUDE:= -Iinclude \
-   $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
+  $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
   -include include/linux/autoconf.h
 
 CPPFLAGS:= -D__KERNEL__ $(LINUXINCLUDE)
 
 CFLAGS  := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-   -fno-strict-aliasing -fno-common
+  -fno-strict-aliasing -fno-common
 AFLAGS  := -D__ASSEMBLY__
 
 # Read KERNELRELEASE from include/config/kernel.release (if it exists)
@@ -385,12 +385,12 @@
 endif
 
 ifeq ($(KBUILD_EXTMOD),)
-ifneq ($(filter config %config,$(MAKECMDGOALS)),)
-config-targets := 1
-ifneq ($(filter-out config %config,$(MAKECMDGOALS)),)
-mixed-targets := 1
-endif
-endif
+   ifneq ($(filter config %config,$(MAKECMDGOALS)),)
+   config-targets := 1
+   ifneq ($(filter-out config %config,$(MAKECMDGOALS)),)
+   mixed-targets := 1
+   endif
+   endif
 endif
 
 ifeq ($(mixed-targets),1)
@@ -698,7 +698,7 @@
 # First command is ':' to allow us to use + in front of this rule
 cmd_ksym_ld = $(cmd_vmlinux__)
 define rule_ksym_ld
-   : 
+   :
+$(call cmd,vmlinux_version)
$(call cmd,vmlinux__)
$(Q)echo 'cmd_$@ := $(cmd_vmlinux__)'  $(@D)/.$(@F).cmd
@@ -707,7 +707,7 @@
 # Generate .S file with all kernel symbols
 quiet_cmd_kallsyms = KSYM$@
   cmd_kallsyms = $(NM) -n $ | $(KALLSYMS) \
- $(if $(CONFIG_KALLSYMS_ALL),--all-symbols)  $@
+$(if $(CONFIG_KALLSYMS_ALL),--all-symbols)  $@
 
 .tmp_kallsyms1.o .tmp_kallsyms2.o .tmp_kallsyms3.o: %.o: %.S scripts FORCE
$(call if_changed_dep,as_o_S)
@@ -749,7 +749,7 @@
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@
$(Q)rm -f .old_version
 
-# The actual objects are generated when descending, 
+# The actual objects are generated when descending,
 # make sure no implicit rule kicks in
 $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
 
@@ -814,7 +814,7 @@
 # checks as needed.
 ifdef CONFIG_LOCALVERSION_AUTO
_localver-auto = $(shell $(CONFIG_SHELL) \
- $(srctree)/scripts/setlocalversion $(srctree))
+ $(srctree)/scripts/setlocalversion $(srctree))
localver-auto  = $(LOCALVERSION)$(_localver-auto)
 endif
 
@@ -859,7 +859,7 @@
 prepare2: prepare3 outputmakefile
 
 prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \
-   include/asm include/config/auto.conf
+  include/asm include/config/auto.conf
 ifneq ($(KBUILD_MODULES),)
$(Q)mkdir -p $(MODVERDIR)
$(Q)rm -f $(MODVERDIR)/*
@@ -1027,13 +1027,13 @@
 # Directories  files removed with 'make clean'
 CLEAN_DIRS  += $(MODVERDIR)
 CLEAN_FILES += vmlinux System.map \
-.tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map
+   .tmp_kallsyms* .tmp_version .tmp_vmlinux

[kbuild-devel] [patch 00/02] kbuild: fix-make-rR-is-now-default-commit

2006-11-12 Thread Oleg Verych
--
  This is replacement for
  + makefile-cancel-implicit-rules-on-included-and-top-makefiles.patch
  +added to -mm tree

-o--=O`C
 #oo'L O
___=E M


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] [patch 02/02] kbuild: fix-rR-is-now-default

2006-11-12 Thread Oleg Verych
 `make -d help | grep Makefile` shows patterns, where make tries to rebuild
 included and top makefiles.

 While `make -rR is now default' commit should fix this, actually, it was
 just a little janitorial.

 This fix is aimed to complete canceling implicit rules.

Cc: Sam Ravnborg [EMAIL PROTECTED]
Signed-off-by: Oleg Verych [EMAIL PROTECTED]
---
 This one was submitted in hope, that it can be small and useful for .19.
 It was quied in -mm, this is update.

 Makefile |   17 +
 1 file changed, 9 insertions(+), 8 deletions(-)

Index: linux-2.6.19-rc3/Makefile
===
--- linux-2.6.19-rc3.orig/Makefile  2006-10-26 07:03:42.823669536 +
+++ linux-2.6.19-rc3/Makefile   2006-10-26 07:10:32.239000786 +
@@ -10,8 +10,11 @@
 # Comments in this file are targeted only to the developer, do not
 # expect to learn how to build the kernel reading this file.
 
-# Do not print Entering directory ...
-MAKEFLAGS += --no-print-directory
+# Do not:
+# o  use make's built-in rules and variables
+#(this increases performance and avoid hard-to-debug behavour);
+# o  print Entering directory ...;
+MAKEFLAGS += -rR --no-print-directory
 
 # We are using a recursive build, so we need to do a little thinking
 # to get the ordering right.
@@ -271,12 +274,8 @@
 # Look for make include files relative to root of kernel src
 MAKEFLAGS += --include-dir=$(srctree)
 
-# We need some generic definitions
-include  $(srctree)/scripts/Kbuild.include
-
-# Do not use make's built-in rules and variables
-# This increases performance and avoid hard-to-debug behavour
-MAKEFLAGS += -rR
+# We need some generic definitions.
+include $(srctree)/scripts/Kbuild.include
 
 # Make variables (CC, etc...)
 
@@ -1484,6 +1483,8 @@
 PHONY += FORCE
 FORCE:
 
+# Cancel implicit rules on top Makefile, `-rR' will apply to sub-makes.
+Makefile: ;
 
 # Declare the contents of the .PHONY variable as phony.  We keep that
 # information in a variable se we can use it in if_changed and friends.

--


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] Link lib to a kernel module

2006-10-25 Thread Oleg Verych
On 2006-10-25, Matthias Fechner wrote:
[]
 Makefile:
 KDIR:= /lib/modules/$(shell uname -r)/build
 PWD := $(shell pwd)

there's $(CURDIR), just in case...



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] Link lib to a kernel module

2006-10-24 Thread Oleg Verych
Hallo, Matthias.

On 2006-10-24, Matthias Fechner wrote:

 I tried today to link a lib (.a) to my kernel module but I could not
 found howto do it.

`Documentation/kbuild' directory in your linux sources.
`makefiles.txt' about `lib-y',
`modules.txt'   about modules.

Good luck.



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] [patch, rfc] kbuild: implement checksrc without building Cources (was Re: CHECK without C compile?)

2006-10-24 Thread Oleg Verych
On 2006-10-23, Randy Dunlap wrote:
 Hi Sam,

It seem he on vocation, let me get it, since i've started my develife
from makefiles.

 Is there an option/variant of CHECKSRC that does something like
   make checkall
 i.e., runs CHECK=sparse on all source files, without also building them
 with the C compiler?

As far as i can see, no, there isn't.
I have thing to propose, but something with generated header files
will not work yet (e.g kernel/config_data.h). Patch is rfc, of course.

---
From: Oleg Verych [EMAIL PROTECTED]
Subject: [patch, rfc] kbuild: implement checksrc without building Cources

  Implementation of configured source chacking without actual building.

Cc: Randy Dunlap [EMAIL PROTECTED]
Cc: Sam Ravnborg [EMAIL PROTECTED]
Signed-off-by: Oleg Verych [EMAIL PROTECTED]
---

  Configured sources means, some config target must be run already.
  After that
  ,-shell
  | make prepare
  | make C=something_not_0,1,2 _target_
  `--
  should run _target_ with checking and without building.

-o--=O`C  /. .\
 #oo'L O  o
___=E M^--

 scripts/Kbuild.include |6 +++---
 scripts/Makefile.build |   21 +
 2 files changed, 16 insertions(+), 11 deletions(-)

Index: linux-2.6.19-rc3/scripts/Kbuild.include
===
--- linux-2.6.19-rc3.orig/scripts/Kbuild.include2006-10-24 
12:47:09.670676021 +
+++ linux-2.6.19-rc3/scripts/Kbuild.include 2006-10-24 12:54:25.823530955 
+
@@ -153,7 +153,7 @@
 if_changed = $(if $(strip $(any-prereq) $(arg-check)),   \
@set -e; \
$(echo-cmd) $(cmd_$(1)); \
-   echo 'cmd_$@ := $(make-cmd)'  $(dot-target).cmd)
+   echo 'cmd_$@ := $(make-cmd)'  $(dot-target).cmd, @:)
 
 # execute the command and also postprocess generated .d dependencies
 # file
@@ -162,14 +162,14 @@
$(echo-cmd) $(cmd_$(1)); \
scripts/basic/fixdep $(depfile) $@ '$(make-cmd)'  $(dot-target).tmp;\
rm -f $(depfile);\
-   mv -f $(dot-target).tmp $(dot-target).cmd)
+   mv -f $(dot-target).tmp $(dot-target).cmd, @:)
 
 # Usage: $(call if_changed_rule,foo)
 # will check if $(cmd_foo) changed, or any of the prequisites changed,
 # and if so will execute $(rule_foo)
 if_changed_rule = $(if $(strip $(any-prereq) $(arg-check) ), \
@set -e; \
-   $(rule_$(1)))
+   $(rule_$(1)), @:)
 
 ###
 # why - tell why a a target got build
Index: linux-2.6.19-rc3/scripts/Makefile.build
===
--- linux-2.6.19-rc3.orig/scripts/Makefile.build2006-10-24 
12:46:45.161279310 +
+++ linux-2.6.19-rc3/scripts/Makefile.build 2006-10-24 13:14:11.947124287 
+
@@ -87,12 +87,17 @@
 
 # Linus' kernel sanity checking tool
 ifneq ($(KBUILD_CHECKSRC),0)
-  ifeq ($(KBUILD_CHECKSRC),2)
-quiet_cmd_force_checksrc = CHECK   $
-  cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $ ;
-  else
+  ifeq ($(KBUILD_CHECKSRC),1)
   quiet_cmd_checksrc = CHECK   $
 cmd_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $ ;
+  else
+quiet_cmd_force_checksrc = CHECK   $
+  cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $ ;
+ifneq ($(KBUILD_CHECKSRC),2)
+  if_changed  = @:
+  if_changed_dep  = @:
+  if_changed_rule = @:
+endif
   endif
 endif
 
@@ -207,8 +212,8 @@
 
 $(single-used-m): %.o: %.c FORCE
$(call cmd,force_checksrc)
-   $(call if_changed_rule,cc_o_c)
-   @{ echo $(@:.o=.ko); echo $@; }  $(MODVERDIR)/$(@F:.o=.mod)
+   $(call if_changed_rule,cc_o_c) || \
+   { echo $(@:.o=.ko); echo $@; }  $(MODVERDIR)/$(@F:.o=.mod)
 
 quiet_cmd_cc_lst_c = MKLST   $@
   cmd_cc_lst_c = $(CC) $(c_flags) -g -c -o $*.o $  \
@@ -310,8 +315,8 @@
$(call if_changed,link_multi-y)
 
 $(multi-used-m) : %.o: $(multi-objs-m) FORCE
-   $(call if_changed,link_multi-m)
-   @{ echo $(@:.o=.ko); echo $(link_multi_deps); }  
$(MODVERDIR)/$(@F:.o=.mod)
+   $(call if_changed,link_multi-m) || \
+   { echo $(@:.o=.ko); echo $(link_multi_deps); }  
$(MODVERDIR)/$(@F:.o=.mod)
 
 targets += $(multi-used-y) $(multi-used-m)
 


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists

Re: [kbuild-devel] [patch, rfc] kbuild: implement checksrc without building Cources (was Re: CHECK without C compile?)

2006-10-24 Thread Oleg Verych
On 2006-10-24, Oleg Verych wrote:
 On 2006-10-23, Randy Dunlap wrote:
 Hi Sam,

* It seems*

 + $(call if_changed_rule,cc_o_c) || \
 + { echo $(@:.o=.ko); echo $@; }  $(MODVERDIR)/$(@F:.o=.mod)

This doesn't work, use ifs instead. Updated.
I have no idea what to do with generated sources and headers.
One may be: check target `if_changed' to be %.c or %.h and let it be
built.

From: Oleg Verych [EMAIL PROTECTED]
Subject: [patch, rfc] kbuild: implement checksrc without building Cources

  Implementation of configured source chacking without actual building.

Cc: Randy Dunlap [EMAIL PROTECTED]
Cc: Sam Ravnborg [EMAIL PROTECTED]
Signed-off-by: Oleg Verych [EMAIL PROTECTED]
---

  Configured sources means, some config target must be run already.
  After that
  ,-shell
  | make prepare
  | make C=something_not_0,1,2 _target_
  `--
  should run _target_ with checking and without building.

-o--=O`C  /. .\
 #oo'L O  o
___=E M^--

 scripts/Kbuild.include |6 +++---
 scripts/Makefile.build |   25 -
 2 files changed, 19 insertions(+), 12 deletions(-)

Index: linux-2.6.19-rc3/scripts/Kbuild.include
===
--- linux-2.6.19-rc3.orig/scripts/Kbuild.include2006-10-24 
18:45:36.708292246 +
+++ linux-2.6.19-rc3/scripts/Kbuild.include 2006-10-24 19:11:29.552783811 
+
@@ -153,7 +153,7 @@
 if_changed = $(if $(strip $(any-prereq) $(arg-check)),   \
@set -e; \
$(echo-cmd) $(cmd_$(1)); \
-   echo 'cmd_$@ := $(make-cmd)'  $(dot-target).cmd)
+   echo 'cmd_$@ := $(make-cmd)'  $(dot-target).cmd ;)
 
 # execute the command and also postprocess generated .d dependencies
 # file
@@ -162,14 +162,14 @@
$(echo-cmd) $(cmd_$(1)); \
scripts/basic/fixdep $(depfile) $@ '$(make-cmd)'  $(dot-target).tmp;\
rm -f $(depfile);\
-   mv -f $(dot-target).tmp $(dot-target).cmd)
+   mv -f $(dot-target).tmp $(dot-target).cmd ;)
 
 # Usage: $(call if_changed_rule,foo)
 # will check if $(cmd_foo) changed, or any of the prequisites changed,
 # and if so will execute $(rule_foo)
 if_changed_rule = $(if $(strip $(any-prereq) $(arg-check) ), \
@set -e; \
-   $(rule_$(1)))
+   $(rule_$(1)) ;)
 
 ###
 # why - tell why a a target got build
Index: linux-2.6.19-rc3/scripts/Makefile.build
===
--- linux-2.6.19-rc3.orig/scripts/Makefile.build2006-10-24 
18:45:36.720292930 +
+++ linux-2.6.19-rc3/scripts/Makefile.build 2006-10-24 19:25:50.977873629 
+
@@ -87,12 +87,17 @@
 
 # Linus' kernel sanity checking tool
 ifneq ($(KBUILD_CHECKSRC),0)
-  ifeq ($(KBUILD_CHECKSRC),2)
-quiet_cmd_force_checksrc = CHECK   $
-  cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $ ;
-  else
+  ifeq ($(KBUILD_CHECKSRC),1)
   quiet_cmd_checksrc = CHECK   $
 cmd_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $ ;
+  else
+quiet_cmd_force_checksrc = CHECK   $
+  cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $ ;
+ifneq ($(KBUILD_CHECKSRC),2)
+  if_changed  =#
+  if_changed_dep  =#
+  if_changed_rule =#
+endif
   endif
 endif
 
@@ -204,11 +209,11 @@
$(call if_changed_rule,cc_o_c)
 
 # Single-part modules are special since we need to mark them in $(MODVERDIR)
-
 $(single-used-m): %.o: %.c FORCE
$(call cmd,force_checksrc)
-   $(call if_changed_rule,cc_o_c)
-   @{ echo $(@:.o=.ko); echo $@; }  $(MODVERDIR)/$(@F:.o=.mod)
+   $(if $(if_changed_rule), \
+ $(call if_changed_rule,cc_o_c) \
+ { echo $(@:.o=.ko); echo $@; }  $(MODVERDIR)/$(@F:.o=.mod))
 
 quiet_cmd_cc_lst_c = MKLST   $@
   cmd_cc_lst_c = $(CC) $(c_flags) -g -c -o $*.o $  \
@@ -310,8 +315,10 @@
$(call if_changed,link_multi-y)
 
 $(multi-used-m) : %.o: $(multi-objs-m) FORCE
-   $(call if_changed,link_multi-m)
-   @{ echo $(@:.o=.ko); echo $(link_multi_deps); }  
$(MODVERDIR)/$(@F:.o=.mod)
+   $(if $(if_changed), \
+ $(call if_changed,link_multi-m) \
+ { echo $(@:.o=.ko); \
+   echo $(link_multi_deps); }  $(MODVERDIR)/$(@F:.o=.mod))
 
 targets += $(multi-used-y) $(multi-used-m)
 


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
kbuild