Saturday, August 24, 2019

Re: Compile vim with clipboard support.

Tony Mechelynck <antoine.mechelynck@gmail.com> 于2019年8月23日周五 下午10:49写道:
>
> On Fri, Aug 23, 2019 at 4:24 PM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
> >
> > Tony Mechelynck <antoine.mechelynck@gmail.com> 于2019年8月23日周五 下午10:04写道:
> > >
> > > On Fri, Aug 23, 2019 at 3:48 PM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
> > > > Sorry for my last reply to this thread. I try in a incorrect dir.
> > > >
> > > > Thanks a lot, I tried both of the following methods, it seems they all
> > > > will do the trick:
> > > >
> > > > ./configure ...
> > > > make -24 reconfig
> >
> > My typo, I mean `-j24'
> >
> > >
> > > "make reconfig" is the equivalent of "make distclean && make config &&
> > > make", you don't need to run config just before but you do need to set
> > > your config arguments in environment variables, otherwise it will
> > > invoke configure with no arguments and you'll get a default Vim with
> > > none of your customizations
> >
> > This method is not so convenient, considering that I must prepare a
> > separate file for environment variables
> > and then source it before `make reconfig'. And, the most
> > inconvenient thing is that the name for the environment variables are
> > not so easy to find, remember and write.
> >
> > What's point of view?
>
> Well,
> 1) this way you get the same configure settings from one run of make
> to the next, you don't need to type them yourself;
> 2) this way you don't need to run configure separately; make does it for you
> 3) sometimes an incremental "make" will run "configure" before it
> starts compiling even if you started a plain "make" with no arguments;
> in that case, if you haven't set your configure settings in the
> environment you'll get a "default Vim" without your customizations
> 4) which environment variables to set can be found by inspecting the
> src/Makefile which has comments at the beginning describing them; and
> the most usual of them can be seen in my HowTo page
> http://users.skynet.be/antoine.mechelynck/vim/compunix.htm

Based on the instructions given here:

https://github.com/vim/vim/blob/master/src/INSTALL

It said that:

-----------
The advantage of running configure separately, is that you can write a script
to build Vim, without changing the Makefile or feature.h. Example (using sh):

CFLAGS=-DCOMPILER_FLAG ./configure --enable-gui=motif

One thing to watch out for: If the configure script itself changes, running
"make" will execute it again, but without your arguments. Do "make clean" and
run configure again.
-----------

So, it should be enough to do the following for using specific
configure arguments:

make clean
./configure ...
make

Am I right?

> >
> > On the other hand, due to this is a git local repo, I tried with the
> > following steps and it does work as I have posted here:
> >
> > Under the src dir of vim:
> >
> > git clean -xdf
> > ./configure ...
> > make
> >
> > See the following info with the above method:
> >
> > ---------------
> > werner@localhost:~/software/editor/vim/vim.git$ vim --version
> > VIM - Vi IMproved 8.1 (2018 May 18, compiled Aug 23 2019 22:22:27)
> > Included patches: 1-1912
> > Compiled by werner@localhost
> > Huge version with GTK2 GUI. Features included (+) or not (-):
> > +acl -farsi -mouse_sysmouse -tag_any_white
> > +arabic +file_in_path +mouse_urxvt +tcl
> > +autocmd +find_in_path +mouse_xterm +termguicolors
> > +autochdir +float +multi_byte +terminal
> > +autoservername +folding +multi_lang +terminfo
> > +balloon_eval -footer -mzscheme +termresponse
> > +balloon_eval_term +fork() +netbeans_intg +textobjects
> > +browse +gettext +num64 +textprop
> > ++builtin_terms +hangul_input +packages +timers
> > +byte_offset +iconv +path_extra +title
> > +channel +insert_expand +perl +toolbar
> > +cindent +job +persistent_undo +user_commands
> > +clientserver +jumplist +postscript +vartabs
> > +clipboard +keymap +printer +vertsplit
> > +cmdline_compl +lambda +profile +virtualedit
> > +cmdline_hist +langmap -python +visual
> > +cmdline_info +libcall +python3 +visualextra
> > +comments +linebreak +quickfix +viminfo
> > +conceal +lispindent +reltime +vreplace
> > +cryptv +listcmds +rightleft +wildignore
> > +cscope +localmap +ruby +wildmenu
> > +cursorbind +lua +scrollbind +windows
> > +cursorshape +menu +signs +writebackup
> > +dialog_con_gui +mksession +smartindent +X11
> > +diff +modify_fname +sound -xfontset
> > +digraphs +mouse +spell -xim
> > +dnd +mouseshape +startuptime +xpm
> > -ebcdic +mouse_dec +statusline +xsmp_interact
> > +emacs_tags +mouse_gpm -sun_workshop +xterm_clipboard
> > +eval -mouse_jsbterm +syntax -xterm_save
> > +ex_extra +mouse_netterm +tag_binary
> > +extra_search +mouse_sgr -tag_old_static
> > system vimrc file: "$VIM/vimrc"
> > user vimrc file: "$HOME/.vimrc"
> > 2nd user vimrc file: "~/.vim/vimrc"
> > user exrc file: "$HOME/.exrc"
> > system gvimrc file: "$VIM/gvimrc"
> > user gvimrc file: "$HOME/.gvimrc"
> > 2nd user gvimrc file: "~/.vim/gvimrc"
> > defaults file: "$VIMRUNTIME/defaults.vim"
> > system menu file: "$VIMRUNTIME/menu.vim"
> > fall-back for $VIM: "/usr/local/share/vim"
> > Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
> > -pthread -I/usr/include/gtk-2.0
> > -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include
> > -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo
> > -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo
> > -I/usr/include/pixman-1 -I/usr/include/libpng16
> > -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16
> > -I/usr/include/pango-1.0 -I/usr/include/harfbuzz
> > -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
> > -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2
> > -g -O2 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
> > Linking: gcc -L. -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic
> > -Wl,-export-dynamic -Wl,-E -L/usr/local/lib -Wl,--as-needed -o vim
> > -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo
> > -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0
> > -lglib-2.0 -lfontconfig -lfreetype -lSM -lICE -lXpm -lXt -lX11 -lXdmcp
> > -lSM -lICE -lm -ltinfo -lnsl -lselinux -lcanberra -lacl -lattr
> > -lgpm -ldl -L/usr/lib -llua5.2 -Wl,-E -fstack-protector-strong
> > -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.24/CORE -lperl
> > -ldl -lm -lpthread -lcrypt
> > -L/home/werner/.pyenv/versions/3.7.4/lib/python3.7/config-3.7m-x86_64-linux-gnu
> > -lpython3.7m -lcrypt -lpthread -ldl -lutil -lm
> > -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lieee -lm
> > -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm
> > werner@localhost:~/software/editor/vim/vim.git$
> > ---------------
> >
> > Regards
> >
> If it works for you, so much the better. One characteristic of Vim is
> that there are often several ways to achieve the same result.
>
> Best regards,
> Tony.
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXs%3DCFu6Pbhsjtjn4eMBgzsKbnNU9tmhbP4hiKBjHTCD5w%40mail.gmail.com.



--
Hongsheng Zhao <hongyi.zhao@gmail.com>
Institute of Semiconductors, Chinese Academy of Sciences
GnuPG DSA: 0xD108493

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAGP6POKgfJQtUpAgCbkX52BLUcTGsmopzo2ssvGDsMzv5Q6c8A%40mail.gmail.com.

No comments:

Post a Comment