[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pre and post install targets
From: |
Ralf Wildenhues |
Subject: |
Re: pre and post install targets |
Date: |
Sun, 20 Jul 2008 21:29:32 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello,
* Bernd Jendrissek wrote on Fri, Jul 18, 2008 at 01:32:34PM CEST:
> On Thu, Jul 17, 2008 at 10:20 AM, Jose-Marcio <address@hidden> wrote:
> > Currently, I've defined a new target (upgrade) which depends
> > on :
> >
> > upgrade : preinstall install postinstall
>
> Note that that breaks under make -j upgrade.
Yep. If you were to let install depend on preinstall, and postinstall
on install then parallel make works again, but you cannot run
make postinstall
usefully. What you can do instead is
upgrade:
$(MAKE) $(AM_MAKEFLAGS) preinstall
$(MAKE) $(AM_MAKEFLAGS) install
$(MAKE) $(AM_MAKEFLAGS) postinstall
or, if you assume a recent GNU make, then you can use order-only
dependencies:
install: | preinstall
postinstall: | install
Note that Automake provides install-{data,exec}-hook to which
postinstall actions may be hooked, as they are run strictly after
(the Automake-provided target named) install. However, there is no
dedicated target to use for preinstall.
I'm not sure whether we should introduce such pre hooks.
Hope that helps.
Cheers,
Ralf