automake
[Top][All Lists]
Advanced

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

Re: compile multiple programs w/extension gives error


From: Ralf Wildenhues
Subject: Re: compile multiple programs w/extension gives error
Date: Tue, 15 Nov 2005 07:37:50 +0100
User-agent: Mutt/1.5.9i

* Harlan Stenn wrote on Tue, Nov 15, 2005 at 12:08:26AM CET:
> * Heiko Panther wrote:
> > Trying the following gives me an error.
> >
> > noinst_PROGRAMS = program.elf program.bin
> > program_elf_SOURCES = main.c
> >
> > program.bin: program.elf
> >       $(OBJCOPY) -O binary program.elf program.bin
> >
> > Use of uninitialized value in concatenation (.) or string at
> > /usr/bin/automake-1.6 line 8449.
> > : deprecated feature: `program.bin' overrides `program.bin$(EXEEXT)'
> > : change your target to read `program.bin$(EXEEXT)'
> >
> > Just to try it, I actually followed Automake's advice:
> >
> > noinst_PROGRAMS = program.elf program.bin$(EXEEXT)
> > program_elf_SOURCES = main.c

> Use:
> 
> noinst_PROGRAMS = program.elf
> noinst_SCRIPTS = program.bin

That's probably a good enough workaround.  But the decent solution is to
just override the target in the rule, and keep the original name in the
variable assignment.  This is because Automake does the appending of
$(EXEEXT) itself.  Like this:

noinst_PROGRAMS = program.elf program.bin
program_elf_SOURCES = main.c

program.bin$(EXEEXT): program.elf
      $(OBJCOPY) -O binary program.elf program.bin

By the way, Automake-1.9.6 has many bugs fixed compared to 1.6.

Cheers,
Ralf




reply via email to

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