[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to install makefiles and unix scripts?
From: |
Stefan Urbanek |
Subject: |
Re: How to install makefiles and unix scripts? |
Date: |
Tue, 30 Jul 2002 15:07:06 +0200 |
Nicola Pero wrote:
>
> > > > And, is it ok (without confilct with makefile.postable) to use rules
> > > > before-install:: and after-install:: in library makefiles (that are
> > > > going to
> > > > be installed)? Or is there some another way?
> > >
> > > Ahm - not sure - you can add stuff to before-install:: and
> > > after-install::, and it shouldn't conflict with makefile.postamble - so
> > > it's fine, except I'm not sure why you want to do it :-)
> > >
> > > If you provide me with some code or example or explanation of what you
> > > need/want to do, I might be able to suggest how to best tackle the problem
> > > (which in the end might perfectly well be to use before-install:: and
> > > after-install:: :-)
> >
> > Well, I need to install something in a makefile provided by a library where
> > I
> > use before-install and after-install rules.
>
> > But the problem is, if user wants to use same rules in makefile.postamble.
>
> before-install:: and after-install:: are double-colon rules, which means
> there can be multiple declaration of those rules (with different commands
> to execute in each declaration), not necessarily a single one (as for
> normal rules) - all the provided commands in the rules are executed
> independently of each other - so it will always work.
>
> They are double-colon rules precisely for that. They are already declared
> (with empty commands) in standard makefiles.
>
That is what I wanted to know :-)
> > I have tested it and it seems to work like this:
> >
> > at the end of GNUmakefile:
> > --
> > -include makefile.preamble
> > include my.make
> > -include makefile.postamble
>
> >From this code snippet, I think you are creating a new project type. In
> that case, you are implementing the install rule yourself. Why don't you
> just put your code in the install rule (more precisely, into the
> internal-xxx-install_ rule) rather than in before-install:: and
> after-install::. Anyway - I don't want to confuse you :-) if you are
> doing something very simple (from a makefile point of view),
> before-install:: and after-install:: should work fine.
Yes, it is something like new project type, but it is just a wrapper around
the bundle.make. I think that before/after install rules are fine.
Anyway, how the internal-xxx-install rulle is supposed to be used? Just like:
internal-my-install:
install-stuff
Thank you for your time,
Stefan