automake
[Top][All Lists]
Advanced

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

Re: install-exec-hook question


From: Ralf Wildenhues
Subject: Re: install-exec-hook question
Date: Fri, 6 Jun 2008 19:49:12 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

* Maynard Johnson wrote on Wed, Jun 04, 2008 at 08:21:37PM CEST:
> I have a need to run some post-install commands that may print a message
> that the user must see (so it must be near the end of the output).

You have a graph of Makefile.am vertices connected by directed edges,
SUBDIRS entries.  Even with parallel make, this graph is traversed
serially, in the order induced by SUBDIRS ordering (presence of '.' in
this list defaults to last, if not listed explicitly).  Locate the last
vertex traversed.  Put your message in that Makefile.am.

> If running on a multi-processor system, does the 'make
> install-exec-hook' line run in parallel with the "normal install"?

Well, install-exec-hook runs strictly after other install-exec* thingies
run *in that directory*.  But that says nothing about the order in which
directories are traversed, and it does not either say anything about the
order with respect to install-data* thingies; in fact, the latter are
likely to run concurrently with a parallel make install, although
without parallel make, the data thingies come after the exec ones.
(For GNU make, you could use '.NOTPARALLEL:' in that Makefile.)

Still, with this method, you have at least a set of "leaving directory"
messages from make unless you 'make -s'.

> In short, is there a way to print out a user message at the end of
> 'make install'?

Here's a different method, rather crazy if you try to understand it; and
the quoting is wild, and if you want to use variables in your message,
you need to pass them to config.status via the third argument of
AC_CONFIG_COMMANDS (please read the details in the Autoconf manual if
needed).  FWIW, there are TABs before the echo commands.

AC_CONFIG_FILES([Makefile],
  [sed '/^install:/{
                s/^/my-/
                i\
install: my-install\
\       echo "Installation is really,"\
\       echo "really done now"
        }
       ' < Makefile > Makefile.t
   mv -f Makefile.t Makefile
  ])


Hope that helps, or at least amuses.

Cheers,
Ralf




reply via email to

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