automake-patches
[Top][All Lists]
Advanced

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

Re: Option ansi2knr mishandles sources in different directories


From: Kevin Ryde
Subject: Re: Option ansi2knr mishandles sources in different directories
Date: Sat, 23 Nov 2002 06:24:09 +1000
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.1 (i386-debian-linux-gnu)

Alexandre Duret-Lutz <address@hidden> writes:
>
> This seems close to PR/374.  Basically the complain is that the
> .c -> _.c rule should honor per-target CFLAGS.  It seems you
> are just trying to emulate this using two Makefiles defining
> different INCLUDES.

Pretty much, it pre-dated the per-target stuff.  We probably still
want the second directory though, because it's got other stuff.

> Something that would be nice is to rewrite the ansi2knr
> supporting code as a language.

An alternative perhaps would be to lose the separate _.c altogether
and instead have a script to de-ansi then run the compiler,

  if ANSI2KNR
  COMPILE = $(SHELL) run-ansi2knr "$(CPP)" "$(CPPFLAGS)" "$(CC)" $(CFLAGS)
  else
  COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS)
  endif

Which if it worked would let everything happen through the normal .c.o
inference.

Another advantage would be that objects selected by configure and
merely AC_SUBST'ed into an LDADD would get compiled correctly.
(Currently you have to make sure any potential source is mentioned in
a libdummy to ensure there's a .c->_.c rule for it.)

But perhaps all this was considered and rejected when ansi2knr was
first introduced.




reply via email to

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