On Wed, Jun 11, 2008 at 04:15:31PM +0800, Cherife Li wrote:
> On 06/11/08 13:55, Willy Tarreau wrote:
> >It is because if you don't specify a TARGET, all returns you the help,
> TARGET has been specified during 'make TARGET=xxx ...'
> >otherwise it depends on "haproxy". Granted it's not very convenient
> >that way. I think the real reason behind this it to allow people to
> >run "make all install" without caring about the sequence ordering.
> Hmm, maybe some people would like this convenience.
Right, changed and uploaded :-)
> >We should make install-bin depend on haproxy instead of all, so that
> >it does not care about the TARGET variable which is not used during
> >installation. Try changing your makefile that way :
> >
> >-install-bin: all
> >+install-bin: haproxy
> I just removed the word 'all':
> $ sed -i '/^install-bin/s/\ all//' Makefile
> and then 'make install'. Nothing hurt.
OK, but a makefile normally should never have to be edited. That's the reason why there are variables in it.
> >Alternatively, you can simply run "make install TARGET=xxx" with anything
> >in TARGET provided that it is non null.
> Oh, no. We could install haproxy gracefully. :-)
OK
> So, if I get it correctly, it should check TARGET for 'make' rather than
> for 'make install' in Makefile, right?
No, it's just that when you do "make install", it will fail if TARGET is not set. Using the above solves the problem. But I've pushed the suggested change in the dependency from "all" to "haproxy" so that next snapshot will definitely fix this problem. I've also backported it to 1.3.14 and 1.3.15 branches.
> >I don't get it. PREFIX is used everywhere to construct other variables,
> >such as SBINDIR, and /usr/local is used nowhere except to assign a default
> >value to PREFIX. So if you change it (PREFIX=/usr), I don't see where
> >/usr/local would be used instead :-/
> Yeah, I know. Now I got it.
> As haproxy doesn't auto-generated Makefile through, e.g., ./configure,
> so I have to change the value of PREFIX before install.
No, you don't have to change any value *before* install. You just have to *set* the value *during* install :
# make install PREFIX=/usr
Regards,
Willy
Received on 2008/06/12 00:32
This archive was generated by hypermail 2.2.0 : 2008/06/12 00:46 CEST