bug-automake
[Top][All Lists]
Advanced

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

bug#10128: am_foo_OBJECTS is empty when ...


From: Stefano Lattarini
Subject: bug#10128: am_foo_OBJECTS is empty when ...
Date: Mon, 02 Jan 2012 19:03:25 +0100

Hi Sebastian, sorry for the terrible delay.

On 11/24/2011 01:02 PM, Sebastian Freundt wrote:
> The (internal) variable am_foo_OBJECTS is empty when OBJEXT has been
> redefined *and* no .SOURCE_EXT.o rule is present.
> 
> Example:
> 
> --8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--
> 
> AM_DEFAULT_SOURCE_EXT = .lisp
> OBJEXT = fasl
> 
> noinst_PROGRAMS = foo
> foo_SOURCES = bar.lisp
> 
> .lisp.fasl:
>         touch $@
> 
> --8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--
>
This does really seem like an abuse of already corner-case Automake features ...
What are you trying to obtain actually?  Perhaps it can be done with less poking
of Automake's dark corners ...

> Now the generated Makefile lists:
> 
> am_foo_OBJECTS =
> foo_OBJECTS = $(am_foo_OBJECTS)
> 
> However, adding a .lisp.o (the old OBJEXT) magically makes it all work:
> 
Well, actually it doesn't, because ...

> --8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--
> 
> AM_DEFAULT_SOURCE_EXT = .lisp
> OBJEXT = fasl
> 
> noinst_PROGRAMS = foo
> foo_SOURCES = bar.lisp
> 
> .lisp.o:  ## just be
> 
> .lisp.fasl:
>         touch $@
> 
> --8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--
> 
> am_foo_OBJECTS = bar.$(OBJEXT)
> foo_OBJECTS = $(am_foo_OBJECTS)
>
... if you try to run the generated Makefile you will obtain some error
like:

  make: *** No rule to make target `bar.fasl', needed by `foo'.
  make: Target `all' not remade because of errors.

In fact, I'm not sure the Automake APIs are designed to allow a redefinition
of `OBJEXT' at all; but I can't find anything explicit about this in the manual.
I'll need to investigate on this.

Thanks,
  Stefano





reply via email to

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