automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: Making only some targets on cross-compilation


From: Philip A. Prindeville
Subject: Re: Fwd: Making only some targets on cross-compilation
Date: Wed, 26 Aug 2009 16:32:33 -0700
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Ralf Wildenhues wrote:
> Hello Philip,
>
> * Philip A. Prindeville wrote on Wed, Aug 26, 2009 at 08:23:06AM CEST:
>   
>> Sent this email out, but then didn't hear back... it struck me that it's
>> not an ALSA bug so much as an automake bug.
>>
>> The problem is simple: normally, targets like "all" use the
>> "all-recursive" indirect target (or "install" and "install-recursive",
>> etc), which then looks like:
>>     
> [...]
>   
>> so the problem is this. If you don't want to patch the Makefile,
>> Makefile.in, or Makefile.am, but want to only build or install a subset
>> of directories (say for instance your building binary only targets for a
>> cross-compiled system), then the "include", "doc", and "test" targets
>> are useless.
>>     
>
> The most common way to address this would be to let the developer add
> logic to the Makefile.am to not build these directories, when the user
> (you) enabled some switch, which could be seeded by the cross compiling
> state.
>
> That said, however,
>
>   
>> So you try to build as:
>>
>> make all ... SUBDIRS='src utils'
>>     
>
> if you're desperate to have it in a command line, you can also
> just override SUBDIRS in your own little additional makefile:
>   echo "SUBDIRS = src utils" | make -f Makefile -f -
>
> Hope that helps.
>
> Cheers,
> Ralf
>   

Yeah, I thought about that or some "makefile.wrapper" like:

SUBDIRS=src utils
include Makefile

and using that.

That said, I have to believe that this is a broad/generic enough issue
that people must run into it elsewhere, and was wondering if it's worth
including a fix in the generated Makefiles from automake to not inherit
SUBDIRS into sub-makes from the parent.

Passing overriding values via the command-line *is* a basic capability
in gmake, so if automake is to be robust is should probably do the right
thing in all cases (or all reasonable cases).

-Philip





reply via email to

[Prev in Thread] Current Thread [Next in Thread]