[PATCH 2.6.14-rc4] kbuild: once again use Makefiles in obj tree

From: Mark Rustad (MRustad_at_mac.com)
Date: 10/20/05

  • Next message: Ingo Oeser: "Re: [PATCH] Adaptive read-ahead v4"
    Date:	Thu, 20 Oct 2005 10:02:37 -0500
    To: linux-kernel@vger.kernel.org
    
    

    This is a re-send of a patch that I mistakenly only sent to Sam. This reflects a simplfication
    of an earlier patch to restore the use of Makefiles from the objects tree, which is something
    that stopped working somewhere in 2.6.14. The previous patch had extended the behavior for Kbuild
    files, whereas this patch does not do that.

    Sam,

    On 10/16/05 at 11:15 PM Sam Ravnborg <sam@ravnborg.org> wrote:

    >On Fri, Oct 14, 2005 at 09:23:28AM -0500, Mark Rustad wrote:
    >> I believe that I have found and fixed the problem that I encountered earlier this week
    >> with Makefiles not being used from the objects tree as they had been in every 2.6 kernel
    >> I have worked with since 2.6.5. I I view this as a regression in 2.6.14-rc4. I believe
    >> that the following patch fixes it.
    >
    >Hi Mark.
    >kbuild will not guarantee you way of working in all cases. Therefore no
    >special implementation will be accepted to try to support it for
    >specific files.
    >
    >The changes you point out that breaks your working methodology was added
    >to fix broken support for external modules.

    I tested the (slightly) simplified patch today and it seems fine. So, this checks for Kbuild
    files in one place, and Makefile in two, thereby not extending the behavior that Makefiles
    had prior to 2.6.14-rc* to Kbuild files.

    Below is the patch I tried today. Please consider it.

    This patch restores behavior that the build system had up through 2.6.13.
    That is, that Makefiles present in the objects tree are used in favor of
    those in the source tree when an objects tree is in use.

    This patch does not extend that behavior for Kbuild files.

    Signed-off-by: Mark Rustad <mrustad@mac.com>

    ---
    --- a/scripts/Makefile.build	2005-10-11 09:27:42.000000000 -0500
    +++ b/scripts/Makefile.build	2005-10-18 09:11:22.042672607 -0500
    @@ -12,7 +12,10 @@ __build:
     
     # The filename Kbuild has precedence over Makefile
     kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
    -include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile)
    +kbuild-inc := $(wildcard $(kbuild-dir)/Kbuild)
    +kbuild-inc := $(if $(kbuild-inc),$(kbuild-inc),$(wildcard $(obj)/Makefile))
    +kbuild-inc := $(if $(kbuild-inc),$(kbuild-inc),$(kbuild-dir)/Makefile)
    +include $(kbuild-inc)
     
     include scripts/Kbuild.include
     include scripts/Makefile.lib
    --- a/scripts/Makefile.clean	2005-10-11 09:27:42.000000000 -0500
    +++ b/scripts/Makefile.clean	2005-10-18 09:11:44.165706089 -0500
    @@ -14,7 +14,10 @@ clean := -f $(if $(KBUILD_SRC),$(srctree
     
     # The filename Kbuild has precedence over Makefile
     kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
    -include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile)
    +kbuild-inc := $(wildcard $(kbuild-dir)/Kbuild)
    +kbuild-inc := $(if $(kbuild-inc),$(kbuild-inc),$(wildcard $(obj)/Makefile))
    +kbuild-inc := $(if $(kbuild-inc),$(kbuild-inc),$(kbuild-dir)/Makefile)
    +include $(kbuild-inc)
     
     # Figure out what we need to build from the various variables
     # ==========================================================================
    -- 
    Mark Rustad, mrustad@mac.com
    -
    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/
    

  • Next message: Ingo Oeser: "Re: [PATCH] Adaptive read-ahead v4"

    Relevant Pages

    • Revamp of kerberos5/ makefiles
      ... Subject: kerberos5/ makefiles revamp ... - Dropped support for standalone builds, ... What would probably meet some resistance is dropping support ... Please note that before attempting to apply this patch you need ...
      (freebsd-arch)
    • Re: [PATCH v2] documentation: build source files in Documentation sub-dir
      ... Add the ability to build source files that are in the Documentation/ dir. ... (i386 allmodconfig). ... Change all -I$in Makefiles to -I$. ... New patch file with only that change is below. ...
      (Linux-Kernel)
    • Re: [PATCH v2] documentation: build source files in Documentation sub-dir
      ... Add the ability to build source files that are in the Documentation/ dir. ... (i386 allmodconfig). ... Change all -I$in Makefiles to -I$. ... New patch file with only that change is below. ...
      (Linux-Kernel)
    • Re: Compiling dbd-oracle on hpux64
      ... A patch to Makefile.PL would be nice. ... I don't speak perl, I'm merely the unix admin who has ... I corrected the generated Makefiles by ...
      (perl.dbi.users)
    • [BK] kbuild updates
      ... Restructure build of vmlinux in top-level Makefile ... Updated kbuild support files so they build on cygwin & Solaris ... Move localversion config option to top of menu ... um patch will be submitted by the UML folks. ...
      (Linux-Kernel)