On Mon, Mar 10, 2014 at 11:43:33AM +0100, LEVAI Daniel wrote:
> On h, márc 10, 2014 at 11:32:22 +0100, Marc Espie wrote:
> > On Mon, Mar 10, 2014 at 10:37:27AM +0100, LEVAI Daniel wrote:
> > > Hi!
> > > 
> > > I have this Makefile in a source that has the usual `?=' conditional
> > > assignments, but for the CFLAGS and LDFLAGS variables too. I see that
> > > make(1) reads /usr/share/mk/sys.mk first, and that defines those two, so
> > > this won't fly with base make(1) because it leaves them out of the game.
> > > 
> > > Are there other solutions for this, except patching these away in the
> > > Makefile?
> > 
> > Yes. Pass them on as command line args to make. This will supersede
> > anything.  Read make(1), again and again.
> > 
> > That's the basic usability feature of make.
> 
> Doh, sorry, I wasn't clear enough :-/
> 
> I don't want to supersede the variables in the Makefile -- quite the
> opposite --, I need them to take effect!
> 
> The lines are like these in the Makefile:
> 
> [...]
> LDFLAGS ?= <LDsomething>
> CFLAGS ?= <Csomething>
> [...]
> 
> 
> And running base `make' will define LDFLAGS and CFLAGS beforehand, so
> the options in the Makefile itself won't get used. You see, I need those
> options, and the only workaround I can think of now (besides using gmake
> ;) ) is to remove the '?' characters from the Makefile and use simple
> variable assignment.
> 

Yeah, you need a patch for that one.  I don't even see how this can
possibly work without extensions.

Reply via email to