bug-automake
[Top][All Lists]
Advanced

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

Re: install-local target?


From: Ralf Wildenhues
Subject: Re: install-local target?
Date: Tue, 14 Apr 2009 21:45:24 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Karl,

* Karl Berry wrote on Sat, Apr 11, 2009 at 02:54:16AM CEST:
> 1) In the Extending node of the automake (1.10.2) manual, there's a typo:
> 
> now: respected by `automake' to ensure the user always have the last word.
> new: respected by `automake' to ensure the user always has the last word.

Yes.  This has already been fixed in branch-1-10 and master, along with
several other typographical and grammatical nits in the manual.

>    Also, it might be clearer to make each of the following two sentences
>    into an @item.

Thanks, fixed as below; pushed to master.

> 2) Anyway, what I'm really writing about is ... I gather there is no
>    install-local target.  Or any other way to run additional commands at
>    install time, after install-exec and install-data have run.
>    
>    The usefulness is to run a post-install command installed by
>    install-exec, using data installed by install-data.  I need to do
>    this in the TeX tree.
>    
>    I worked around it by using a different rule that depends on install,
>    which is fine, so this isn't make-or-break or anything.  I just
>    wanted to suggest it.  Or is there another way to accomplish it?
>    I guess install: could be made into a double-colon target, but
>    that doesn't exactly seem right either.

Not really.  Naming such a thing install-local seems suboptimal for
these reasons:

- It will be very tempting to abuse it, when install-{data,exec}-local
would have been more appropriate; maybe install-hook would be better,
esp. given that its semantics would be to clearly run after all other
installation has finished.

- It isn't clear to me what should happen if the user typed
  make install-data

or
  make install-exec

only.  Letting the hook run after one of them only seems clearly wrong.
Not running it at all would require some sort of `post-install' target
or so.  Running it twice would require some sort of state in the form of
"we've already done the other".  And frankly, I don't see how that state
can be deduced automatically from automake-generated code; we'd have to
require that the user (or at least the Makefile.am author) provide this
information (we can often reliably find out whether one of the target
has _not_ yet been run, but the reverse is typically not possible).

Can you work around it (or have already done so) by simply adding
install-{data,exec}-local rules in the last Makefile.am traversed by
make, which should be one that installs no other files important to
this post-install action?

Cheers, and thanks for the report,
Ralf

2009-04-14  Karl Berry  <address@hidden>

        manual: improve markup: itemize list in `Extending'.
        * doc/automake.texi (Extending): Use address@hidden's for user override
        semantics.

diff --git a/doc/automake.texi b/doc/automake.texi
index de46d21..c5ac962 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -9314,12 +9314,18 @@ different places (@file{Makefile.am}, 
@file{configure.ac}, and
 @command{automake} itself), it is possible to have conflicting
 definitions of rules or variables.  When building @file{Makefile.in}
 the following priorities are respected by @command{automake} to ensure
-the user always has the last word.  User defined variables in
address@hidden have priority over variables @code{AC_SUBST}ed from
address@hidden, and @code{AC_SUBST}ed variables have priority
-over @command{automake}-defined variables.  As far as rules are
-concerned, a user-defined rule overrides any
+the user always has the last word:
+
address@hidden
address@hidden
+User defined variables in @file{Makefile.am} have priority over
+variables @code{AC_SUBST}ed from @file{configure.ac}, and
address@hidden variables have priority over
address@hidden variables.
address@hidden
+As far as rules are concerned, a user-defined rule overrides any
 @command{automake}-defined rule for the same target.
address@hidden itemize
 
 @cindex overriding rules
 @cindex overriding semantics




reply via email to

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