From octave-maintainers-request at bevo dot che dot wisc dot edu Mon Nov 18 14:22:45 1996 Subject: Re: .oct files From: "John W. Eaton" To: Doug Warner Cc: jwe at bevo dot che dot wisc dot edu, octave-maintainers@bevo.che.wisc.edu Date: Mon, 18 Nov 1996 14:21:59 -0600 On 18-Nov-1996, Doug Warner wrote: : For some reason, the link $prefix/include/octave still pointed to the : last installed snapshot. Maybe this patch will fix that. Index: Makefile.in =================================================================== RCS file: /home/jwe/src/master/octave/src/Makefile.in,v retrieving revision 1.155 diff -c -r1.155 Makefile.in *** Makefile.in 1996/11/17 21:42:37 1.155 --- Makefile.in 1996/11/18 20:11:08 *************** *** 294,305 **** if [ "$$linkdir" = $(octincludedir) ] ; then \ true ; \ else \ ! if [ -d $$linkdir ] ; then \ ! true ; \ ! else \ ! rm -f $$linkdir ; \ ! $(LN_S) $(octincludedir) $$linkdir ; \ ! fi ; \ fi .PHONY: install-lib --- 294,300 ---- if [ "$$linkdir" = $(octincludedir) ] ; then \ true ; \ else \ ! rm -f $$linkdir && $(LN_S) $(octincludedir) $$linkdir ; \ fi .PHONY: install-lib The intent here is to update the $prefix/include/octave link that points to the real directory $prefix/include/octave-$version if $prefix/include/octave is a link. If it is actually a directory, I don't want to wipe it out (so rm -rf is not used). The previous code didn't work because if $linkdir is a symbolic link, test -d returns information about the ultimate file, not the link. I would use a test option to check to see if it is a link, but apparently that is not very portable (then again, I'm not sure that this is either). Thanks, jwe