Re: ifdef expessions in Makefile.am

2009-12-17 Thread Joakim Tjernlund
Peter Johansson  wrote on 18/12/2009 00:43:06:

> From: Peter Johansson 
> To: Joakim Tjernlund 
> Cc: automake@gnu.org
> Date: 18/12/2009 00:42
> Subject: Re: ifdef expessions in Makefile.am
>
> Joakim Tjernlund wrote:
> > I tried the example you pointed me to, added this to configure.ac:
> >   AM_CONDITIONAL([COND_OPT], [test "$want_opt" = yes])
> > and got:
> > # > autoconf
> > configure.ac:32: error: possibly undefined macro: AM_CONDITIONAL
> >   If this token and others are legitimate, please use m4_pattern_allow.
> >   See the Autoconf documentation.
> >
> > This is autoconf 2.63
> >
> >
> Sounds like you called `autoconf' directly. What if you issue
> `autoreconf -v' instead?

That works too. I am a bit careful running autoreconf as I have
hacked libtool.m4(replaced -fPIC with -fpic) for our needs.
I really wish there were a way to use -fpic with libtool
without hacks.

 Jocke





Re: ifdef expessions in Makefile.am

2009-12-17 Thread Joakim Tjernlund
Joakim Tjernlund/Transmode wrote on 18/12/2009 00:32:11:

> From: Joakim Tjernlund/Transmode
> To: Peter Johansson 
> Cc: automake@gnu.org
> Date: 18/12/2009 00:32
> Subject: Re: ifdef expessions in Makefile.am
>
> Peter Johansson  wrote on 18/12/2009 00:05:46:
>
> > From: Peter Johansson 
> > To: Joakim Tjernlund 
> > Cc: automake@gnu.org
> > Date: 18/12/2009 00:05
> > Subject: Re: ifdef expessions in Makefile.am
> >
> > Hi Joakim,
> >
> > Joakim Tjernlund wrote:
> > > Thanks, but I can't make that work for me
> > > AM_CONDITIONAL seems to be an automake 1.11 feature
> > >
> >
> > That seems inaccurate because I've used AM_CONDITIONAL since 2004.
> >
> > > and the AC_SUBST variant does not quite fit
> > > Basically I want:
> > > if @TEST@ then
> > >  SUBDIRS+= dir1/dir2/@TEST@
> > >  SUBDIRS+= dir3/dir2/@TEST@
> > >  SUBDIRS+= dir4/@TEST@
> > > 
> > > endif
> > >
> > >
> > Would you mind, rather than telling us what syntax you wanna use, let us
> > know why you cannot use AM_CONDITIONAL. In particular it would be useful
> > to know where the value of @TEST@ is decided? What values can @TEST@ take?
> >

> I tried the example you pointed me to, added this to configure.ac:
>   AM_CONDITIONAL([COND_OPT], [test "$want_opt" = yes])
> and got:
> # > autoconf
> configure.ac:32: error: possibly undefined macro: AM_CONDITIONAL
>   If this token and others are legitimate, please use m4_pattern_allow.
>   See the Autoconf documentation.
>
> This is autoconf 2.63

Aha, I must run aclocal first. That was really a surprise to
me.

 Jocke





Re: ifdef expessions in Makefile.am

2009-12-17 Thread Peter Johansson

Joakim Tjernlund wrote:

I tried the example you pointed me to, added this to configure.ac:
  AM_CONDITIONAL([COND_OPT], [test "$want_opt" = yes])
and got:
# > autoconf
configure.ac:32: error: possibly undefined macro: AM_CONDITIONAL
  If this token and others are legitimate, please use m4_pattern_allow.
  See the Autoconf documentation.

This is autoconf 2.63

  
Sounds like you called `autoconf' directly. What if you issue 
`autoreconf -v' instead?


Thanks,
Peter

--
Peter Johansson

svndigest maintainer, http://dev.thep.lu.se/svndigest
yat maintainer,   http://dev.thep.lu.se/yat





Re: ifdef expessions in Makefile.am

2009-12-17 Thread Joakim Tjernlund
Peter Johansson  wrote on 18/12/2009 00:05:46:

> From: Peter Johansson 
> To: Joakim Tjernlund 
> Cc: automake@gnu.org
> Date: 18/12/2009 00:05
> Subject: Re: ifdef expessions in Makefile.am
>
> Hi Joakim,
>
> Joakim Tjernlund wrote:
> > Thanks, but I can't make that work for me
> > AM_CONDITIONAL seems to be an automake 1.11 feature
> >
>
> That seems inaccurate because I've used AM_CONDITIONAL since 2004.
>
> > and the AC_SUBST variant does not quite fit
> > Basically I want:
> > if @TEST@ then
> >  SUBDIRS+= dir1/dir2/@TEST@
> >  SUBDIRS+= dir3/dir2/@TEST@
> >  SUBDIRS+= dir4/@TEST@
> > 
> > endif
> >
> >
> Would you mind, rather than telling us what syntax you wanna use, let us
> know why you cannot use AM_CONDITIONAL. In particular it would be useful
> to know where the value of @TEST@ is decided? What values can @TEST@ take?
>

I tried the example you pointed me to, added this to configure.ac:
  AM_CONDITIONAL([COND_OPT], [test "$want_opt" = yes])
and got:
# > autoconf
configure.ac:32: error: possibly undefined macro: AM_CONDITIONAL
  If this token and others are legitimate, please use m4_pattern_allow.
  See the Autoconf documentation.

This is autoconf 2.63

 Jocke






Re: ifdef expessions in Makefile.am

2009-12-17 Thread Peter Johansson

Hi Joakim,

Joakim Tjernlund wrote:

Thanks, but I can't make that work for me
AM_CONDITIONAL seems to be an automake 1.11 feature
  


That seems inaccurate because I've used AM_CONDITIONAL since 2004.


and the AC_SUBST variant does not quite fit
Basically I want:
if @TEST@ then
 SUBDIRS+= dir1/dir2/@TEST@
 SUBDIRS+= dir3/dir2/@TEST@
 SUBDIRS+= dir4/@TEST@

endif

  
Would you mind, rather than telling us what syntax you wanna use, let us 
know why you cannot use AM_CONDITIONAL. In particular it would be useful 
to know where the value of @TEST@ is decided? What values can @TEST@ take?


Thanks,
Peter

--
Peter Johansson

svndigest maintainer, http://dev.thep.lu.se/svndigest
yat maintainer,   http://dev.thep.lu.se/yat





Re: ifdef expessions in Makefile.am

2009-12-17 Thread Harlan Stenn
Dave Hart wrote:
> You're running up against something else.  AM_CONDITIONAL goes back
> some time, and has worked splendidly for the NTP reference
> implementation built using Automake 1.10.

and even automake 1.9, and probably earlier versions as well.

H




Re: ifdef expessions in Makefile.am

2009-12-17 Thread Dave Hart
On Thu, Dec 17, 2009 at 22:29 UTC, Joakim Tjernlund wrote:
> AM_CONDITIONAL seems to be an automake 1.11 feature

You're running up against something else.  AM_CONDITIONAL goes back
some time, and has worked splendidly for the NTP reference
implementation built using Automake 1.10.

Cheers,
Dave Hart




Re: ifdef expessions in Makefile.am

2009-12-17 Thread Joakim Tjernlund
Peter Johansson  wrote on 17/12/2009 22:52:35:

> From: Peter Johansson 
> To: Joakim Tjernlund 
> Cc: automake@gnu.org
> Date: 17/12/2009 22:52
> Subject: Re: ifdef expessions in Makefile.am
>
> Joakim Tjernlund wrote:
> > I want to do something that is similar to:
> >  SUBDIRS+= dir1/dir2/@TEST@
> > but only if @TEST@ is defined.
> >
> > Any suggestions?
> >
> http://www.gnu.org/software/automake/manual/automake.html#Conditional-Subdirectories

Thanks, but I can't make that work for me
AM_CONDITIONAL seems to be an automake 1.11 feature
and the AC_SUBST variant does not quite fit
Basically I want:
if @TEST@ then
 SUBDIRS+= dir1/dir2/@TEST@
 SUBDIRS+= dir3/dir2/@TEST@
 SUBDIRS+= dir4/@TEST@

endif





Re: ifdef expessions in Makefile.am

2009-12-17 Thread Peter Johansson

Joakim Tjernlund wrote:

I want to do something that is similar to:
 SUBDIRS+= dir1/dir2/@TEST@
but only if @TEST@ is defined.

Any suggestions?
  

http://www.gnu.org/software/automake/manual/automake.html#Conditional-Subdirectories



--
Peter Johansson

svndigest maintainer, http://dev.thep.lu.se/svndigest
yat maintainer,   http://dev.thep.lu.se/yat





ifdef expessions in Makefile.am

2009-12-17 Thread Joakim Tjernlund

I want to do something that is similar to:
 SUBDIRS+= dir1/dir2/@TEST@
but only if @TEST@ is defined.

Any suggestions?
I am stuck with automake 1.10.2

 Jocke





Re: BUILT_SOURCES

2009-12-17 Thread Russell Shaw

Simon Richter wrote:

Hi,

On Fri, Dec 18, 2009 at 12:07:40AM +1100, Russell Shaw wrote:


BUILT_SOURCES: gran.proc.tab.c


BUILT_SOURCES is a variable, not a target.


Ok Thanks Simon. Should be '=' instead of ':'.
I knew that, but i didn't type what i mean ;)




BUILT_SOURCES

2009-12-17 Thread Russell Shaw

Hi,
BUILT_SOURCES has no effect. gran.proc.tab.c should be built
first, but it doesn't happen. eerat isn't even run:

bin_PROGRAMS = appmain

appmain_SOURCES = appmain.c
nodist_appmain_SOURCES = gran.proc.tab.c

BUILT_SOURCES: gran.proc.tab.c

gran.proc.tab.c: gran.spec
eerat $< -o gran


Automake is 1.9.6 on debian/unstable

Inspecting the generated Makefile doesn't seem to do anything
with BUILT_SOURCES.