[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: substitution vs expansion in Makefile.am
From: |
Ralf Wildenhues |
Subject: |
Re: substitution vs expansion in Makefile.am |
Date: |
Tue, 4 Mar 2008 22:57:58 +0100 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
Hi John,
* John Calcote wrote on Tue, Mar 04, 2008 at 10:38:50PM CET:
> Newbie question here: Is it better to do this in a Makefile.am:
>
> install-exec-hook:
> $(mkdir_p) $(DESTDIR)@syslogdir@
>
> or this:
>
> install-exec-hook:
> $(mkdir_p) $(DESTDIR)$(syslogdir)
>
> assuming, of course, that I called AC_SUBST(syslogdir) in configure.ac?
>
> The first will expand to $(prefix)/..., so you'd have the option of
> changing the resulting directory by passing prefix= on the make
> command line. The second will allow you to change the resulting
> directory with either prefix= or syslogdir= on the make command line.
> I guess you'd get a bit more flexibility by using the second option
> because you could change the syslogdir without changing the prefix.
> But, is there a conventional, or more correct approach?
Nice question. You already deliver the answer, including full rationale
and all: the second form is preferable because it allows more override.
In general, there is one other bit of difference between @foo@ and
$(foo) in that automake may not be able to look into the former.
But for this case that makes little difference.
Cheers,
Ralf
- substitution vs expansion in Makefile.am, John Calcote, 2008/03/04
- Re: substitution vs expansion in Makefile.am,
Ralf Wildenhues <=
- Re: substitution vs expansion in Makefile.am, John Calcote, 2008/03/04
- Re: substitution vs expansion in Makefile.am, Ralf Wildenhues, 2008/03/04
- Re: substitution vs expansion in Makefile.am, Paul Smith, 2008/03/04
- Re: substitution vs expansion in Makefile.am, Bob Friesenhahn, 2008/03/04
- Re: substitution vs expansion in Makefile.am, John Calcote, 2008/03/04
- Re: substitution vs expansion in Makefile.am, Harlan Stenn, 2008/03/04
- Re: substitution vs expansion in Makefile.am, Erik de Castro Lopo, 2008/03/04
- Re: substitution vs expansion in Makefile.am, Harlan Stenn, 2008/03/04
- Re: substitution vs expansion in Makefile.am, John Calcote, 2008/03/05
- Re: substitution vs expansion in Makefile.am, John Calcote, 2008/03/05