[Nagiosplug-devel] Re: problem with plugins/Makefile.am

Karl DeBisschop kdebisschop at mail.debisschop.net
Tue Nov 19 07:21:04 CET 2002


Voon, Ton writes: 

>> On Mon, 2002-11-18 at 12:36, Michael Haro wrote:
>> > I updated from CVS, ran tools/setup and then configure and make
>> > 
>> > make install failed with at the ln -sf stuff
>> > 
>> > replacing
>> > 	ln -sf $(DESTDIR)$(libexecdir)/check_tcp $$i; \
>> > with
>> > 	(cd $(DESTDIR)$(libexecdir) && ln -sf check_tcp $$i ) \
>> > 
>> > solved my problem.  I'm not sure if this is a correct fix though.
>> > 
>> > This is on Solaris 8 using gnu-make.
>> > 
>> > Michael 
>> 
>> Thanks. I updated CVS with: 
>> 
>> install-exec-hook:
>> 	cd $(DESTDIR)$(libexecdir)
>> 	for i in $(check_tcp_programs) ; do ln -sf check_tcp $$i ; done 
>> 
>> which should have the same effect as your patch 
>> 
> -- 
> Karl DeBisschop <karl at debisschop.net> 
> 
> I think this will not work because each makefile line is run in a separate
> subshell. I've tested the following and it works okay: 
> 
> install-exec-hook:
>         cd $(DESTDIR)$(libexecdir) && for i in $(check_tcp_programs) ; do ln
> -sf check_tcp $$i ; done

duh. Thanks. 

> Also, I've noticed that in SunOS 5.6 and SunOS 5.8:
> $ cd /tmp
> $ touch afile
> $ ln -sf afile alink
> $ ln -sf afile alink
> ln: cannot create alink: File exists 
> 
> Which I'm sure is not correct behaviour. To overcome this, can the links be
> hard links?

I'd prefer to retain the symlinks so RPM and other packages can minimize 
installed footprint. 

Can't we do instead: 

for i in $(check_tcp_programs); do rm $$i; ln -sf check_tcp $$i; done 

> install-exec-hook:
>         cd $(DESTDIR)$(libexecdir) && for i in $(check_tcp_programs) ; do ln
> -f check_tcp $$i ; done 
> 
> Or add an rm before the ln -sf? 
> 
> install-exec-hook:
>         cd $(DESTDIR)$(libexecdir) && for i in $(check_tcp_programs) ; do rm
> -f $$i ; ln -sf check_tcp $$i ; done 
> 
> 
> This private and confidential e-mail has been sent to you by Egg.
> The Egg group of companies includes Egg Banking plc
> (registered no. 2999842), Egg Financial Products Ltd (registered
> no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
> carries out investment business on behalf of Egg and is regulated
> by the Financial Services Authority.  
> Registered in England and Wales. Registered offices: 1 Waterhouse Square,
> 138-142 Holborn, London EC1N 2NA.
> If you are not the intended recipient of this e-mail and have
> received it in error, please notify the sender by replying with
> 'received in error' as the subject and then delete it from your
> mailbox. 
> 
 




More information about the Devel mailing list