public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] [OT]: Need help with a Makefile
@ 2012-03-09 19:50 meino.cramer
  2012-03-09 20:35 ` Todd Goodman
  0 siblings, 1 reply; 5+ messages in thread
From: meino.cramer @ 2012-03-09 19:50 UTC (permalink / raw
  To: Gentoo

Hi,

I am trying to compile a linux-kernel for an embedded system.
There is an (older) build environment. 
The kernel is based on a 2.4er linux kernel.
When doing a 
    make menuconfig
I get:

make menuconfig
Makefile:441: *** mixed implicit and normal rules.  Stop.
[1]    8814 exit 2     make menuconfig

The according part of the makefile is:

    include $(srctree)/arch/$(ARCH)/Makefile
    export KBUILD_DEFCONFIG

441 config %config: scripts_basic outputmakefile FORCE                
        $(Q)mkdir -p include/linux
        $(Q)$(MAKE) $(build)=scripts/kconfig $@
        $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease



I marked the according line with its number.

Unfortunately I am not familiar with makefiles...

I am using the make of the gentoo system, which is
GNU make 3.82...

What is wrong here?

Thank you very much in advance for any help!
Best regards,
mcc





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] [OT]: Need help with a Makefile
  2012-03-09 19:50 [gentoo-user] [OT]: Need help with a Makefile meino.cramer
@ 2012-03-09 20:35 ` Todd Goodman
  2012-03-09 22:05   ` Sebastian Pipping
  0 siblings, 1 reply; 5+ messages in thread
From: Todd Goodman @ 2012-03-09 20:35 UTC (permalink / raw
  To: gentoo-user

* meino.cramer@gmx.de <meino.cramer@gmx.de> [120309 14:54]:
> Hi,
> 
> I am trying to compile a linux-kernel for an embedded system.
> There is an (older) build environment. 
> The kernel is based on a 2.4er linux kernel.
> When doing a 
>     make menuconfig
> I get:
> 
> make menuconfig
> Makefile:441: *** mixed implicit and normal rules.  Stop.
> [1]    8814 exit 2     make menuconfig
> 
> The according part of the makefile is:
> 
>     include $(srctree)/arch/$(ARCH)/Makefile
>     export KBUILD_DEFCONFIG
> 
> 441 config %config: scripts_basic outputmakefile FORCE                
>         $(Q)mkdir -p include/linux
>         $(Q)$(MAKE) $(build)=scripts/kconfig $@
>         $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
> 
> 
> 
> I marked the according line with its number.
> 
> Unfortunately I am not familiar with makefiles...
> 
> I am using the make of the gentoo system, which is
> GNU make 3.82...
> 
> What is wrong here?
> 
> Thank you very much in advance for any help!
> Best regards,
> mcc
> 
> 

Hi Meino,

Unfortunately GNU Make changed the rules on Makefiles (or decided to
enforce a rule that wasn't previously enforced, I don't know which) and
the kernel Makefiles were caught out by it.

The later kernels have the changes made that are necessary but if you're
building an older kernel with a newer make then you'll run into this
problem.

You can look at newer kernel source to find the changes necessary.

In the case above, the imlicit rule is the %config target and the normal
rule is the config target.

You can just separate those into two separate rules with the same
recipes.

For example:
      config: scripts_basic outputmakefile FORCE                
         $(Q)mkdir -p include/linux
         $(Q)$(MAKE) $(build)=scripts/kconfig $@
         $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
      
      %config: scripts_basic outputmakefile FORCE                
         $(Q)mkdir -p include/linux
         $(Q)$(MAKE) $(build)=scripts/kconfig $@
         $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease

Regards,

Todd



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] [OT]: Need help with a Makefile
  2012-03-09 20:35 ` Todd Goodman
@ 2012-03-09 22:05   ` Sebastian Pipping
  2012-03-09 22:29     ` meino.cramer
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Pipping @ 2012-03-09 22:05 UTC (permalink / raw
  To: gentoo-user

Hello,


zhe troublesome changes occured between 3.81 and 3.82.  There is a
tracker bug on related breakage in case you are interested:

  https://bugs.gentoo.org/show_bug.cgi?id=gmake-3.82

Best,



Sebastian



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] [OT]: Need help with a Makefile
  2012-03-09 22:05   ` Sebastian Pipping
@ 2012-03-09 22:29     ` meino.cramer
  2012-03-10  1:57       ` Sebastian Pipping
  0 siblings, 1 reply; 5+ messages in thread
From: meino.cramer @ 2012-03-09 22:29 UTC (permalink / raw
  To: gentoo-user

Sebastian Pipping <sping@gentoo.org> [12-03-09 23:16]:
> Hello,
> 
> 
> zhe troublesome changes occured between 3.81 and 3.82.  There is a
> tracker bug on related breakage in case you are interested:
> 
>   https://bugs.gentoo.org/show_bug.cgi?id=gmake-3.82
> 
> Best,
> 
> 
> 
> Sebastian
> 

...which means to me and the problems I have: Reemerge make 3.81
???....or...

Best regards,
mcc





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] [OT]: Need help with a Makefile
  2012-03-09 22:29     ` meino.cramer
@ 2012-03-10  1:57       ` Sebastian Pipping
  0 siblings, 0 replies; 5+ messages in thread
From: Sebastian Pipping @ 2012-03-10  1:57 UTC (permalink / raw
  To: gentoo-user

On 03/09/2012 11:29 PM, meino.cramer@gmx.de wrote:
> ...which means to me and the problems I have: Reemerge make 3.81
> ???....or...

I would prefer a patch to the Makefile (like Tood Goodman proposed
earlier) over a downgrade of make.  I just meant to provide more
information about the issue.  Let us know if you have trouble patching
that very Makefile.

Best,



Sebastian



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-10  1:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-09 19:50 [gentoo-user] [OT]: Need help with a Makefile meino.cramer
2012-03-09 20:35 ` Todd Goodman
2012-03-09 22:05   ` Sebastian Pipping
2012-03-09 22:29     ` meino.cramer
2012-03-10  1:57       ` Sebastian Pipping

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox