Vladimir Marek wrote:
>>> One more time, for the sake of the braindead (such as me):
>>>
>>> How about:
>>>
>>> ifeq ($(LINK_TO_VI),y)
>>> LINKIT="ln -s -f"
>>> else
>>> LINKIT=":"
>>> endif
>>>
>>> ...
>>>
>>>     -$(LINKIT) $(BINDIR)/$(VIMTARGET) $(DESTDIR)/usr/bin/vim
>>>
>>> instead?
>>>       
>> What make understands "ifeq"?  This looks restricted to some versions of
>> make.
>>     
>
> Correct, this is gnu make extension afaik. It can be constructed like
> this however:
>
> LINK_TO_VI = YES
>
> LINKIT_YES = ln -s -f
> LINKIT_NO = :
> LINKIT = $(LINKIT_$(LINK_TO_VI))
>
> Other possibility would be to solve this at automake/autoconf level,
> adding new parameter to 'configure' script.
>
>
>
>   
>> How can LINKIT only be ":"?
>>     
>
> : is shell builtin, try 'type :'. It just expands arguments and returns
> true. (so that ': $(touch a)' creates file a). To be sure I checked it
> for sh, bash and ksh on Solaris.
>
>   

Well, this is what I finally ended up using:

+--- vim71/src/Makefile.orig    2007-05-12 04:57:13.000000000 -0700
++++ vim71/src/Makefile 2007-12-18 23:39:14.000000000 -0800
+@@ -1074,8 +1074,10 @@
+ # default vi editor, it will create a link from vi to Vim when doing
+ # "make install".  An existing file will be overwritten!
+ # When not using it, some make programs can't handle an undefined $(LINKIT).
+-#LINKIT = -ln -f -s $(BINDIR)/$(VIMTARGET) /usr/bin/vi
+-LINKIT = @echo >/dev/null
++LINKIT_n = @:
++LINKIT_ = $(LINKIT_n)
++LINKIT_y = ln -f -s
++LINKIT = $(LINKIT_$(LINK_TO_VI))
+ 
+ ###
+ ### GRAPHICAL USER INTERFACE (GUI).  {{{1
+@@ -1761,7 +1764,7 @@
+       $(STRIP) $(DEST_BIN)/$(VIMTARGET)
+       chmod $(BINMOD) $(DEST_BIN)/$(VIMTARGET)
+ # may create a link to the new executable from /usr/bin/vi
+-      -$(LINKIT)
++      -$(LINKIT) $(BINDIR)/$(VIMTARGET) $(DESTDIR)/usr/bin/vi
+ 
+ # Long list of arguments for the shell script that installs the manual pages
+ # for one language.


Can we get it reviewed, approved, and committed?

Thanks,

-Philip



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui