lkml.org 
[lkml]   [2003]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Linux 2.6.0-test6
    On Sun, Sep 28, 2003 at 09:16:22PM +0200, Jörn Engel wrote:
    > How about a check_headers target that roughly works like this:
    >
    > for (all header files in include/linux and include/asm) {
    > echo "#include <$HEADER>" > header.c
    > make header.o
    > rm header.c header.o
    > }
    >
    > Did a quick test for linux/fs.h in -test5 and it compiled fine, but
    > broke after removing some random #include.
    >
    > Another thing, Sam, "make header.o" causes make to call itself
    > indefinitely. Had to "make somedir/header.o". Not sure if you
    > consider this to be a bug, your decision.

    I have a bad feeling about this, so I'll make the following comments
    up front before all the reports start rolling in. It may be a good
    idea to document this somewhere. (Coding style?)

    If a header has something like these:

    struct my_headers_struct {
    struct task_struct *tsk;
    };

    void my_function(struct task_struct *tsk);

    and gcc warns that "struct task_struct" has not been declared, please
    don't think about adding another header. Just declare the structure
    in the header file which needs it like this:

    struct task_struct;

    and that will prevent the #include maze of 2.4, which resulted in
    everything being rebuilt just because one header file was touched.

    --
    Russell King (rmk@arm.linux.org.uk) http://www.arm.linux.org.uk/personal/
    Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
    maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
    2.6 Serial core
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:48    [W:2.327 / U:0.400 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site