Alexey I. Froloff wrote:
There is QUOTESED expression for creating auto/pathdef.c:
QUOTESED = sed -e 's/"/\\"/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
...
@echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' | $(QUOTESED) >> $@
However:
gcc -c -I. -Iproto -DHAVE_CONFIG_H -pipe -Wall -O2 -march=pentium4
-DSYS_VIMRC_FILE=\"/etc/vim/vimrc\" -DSYS_GVIMRC_FILE=\"/etc/vim/gvimrc\"
-o objects/pathdef.o auto/pathdef.c
auto/pathdef.c:7: error: 'etc' undeclared here (not in a function)
auto/pathdef.c:7: error: 'vim' undeclared here (not in a function)
auto/pathdef.c:7: error: stray '\' in program
auto/pathdef.c:7: error: stray '\' in program
auto/pathdef.c:7: error: 'vimrc' undeclared here (not in a function)
auto/pathdef.c:7: error: expected ',' or ';' before string constant
auto/pathdef.c:7: error: stray '\' in program
auto/pathdef.c:7: error: stray '\' in program
$ grep all_cflags auto/pathdef.c
char_u *all_cflags = (char_u *)"gcc -c -I. -Iproto -DHAVE_CONFIG_H -pipe -Wall -O2 -march=pentium4 -DSYS_VIMRC_FILE=\\"/etc/vim/vimrc\\" -DSYS_GVIMRC_FILE=\\"/etc/vim/gvimrc\\"
I think QUOTESED should look like:
QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
Hmmm... it seems you configured a nonstandard location for your system
vimrc and gvimrc.
My src/Makefile (version 7.0, changed at patchlevel 6 and maybe later)
includes
QUOTESED = sed -e 's/"/\\"/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
and I set my configure arguments by sourcing the following before the make:
#!/bin/bash
#
# this file must be sourced, not run
#
# set environment variables
export CONF_OPT_GUI='--enable-gnome-check'
export CONF_OPT_PERL='--enable-perlinterp'
export CONF_OPT_PYTHON='--enable-pythoninterp'
export CONF_OPT_TCL='--enable-tclinterp --with-tcl=tclsh8.4'
export CONF_OPT_RUBY='--enable-rubyinterp'
export CONF_OPT_MZSCHEME='--enable-mzschemeinterp'
export CONF_OPT_CSCOPE='--enable-cscope'
export CONF_OPT_MULTIBYTE='--enable-multibyte'
export CONF_OPT_OUTPUT='--enable-fontset'
export CONF_OPT_FEAT='--with-features=huge'
export CONF_OPT_COMPBY='"[EMAIL PROTECTED]"'
Line 7 in my auto/pathdef.c is (take a deep breath)
char_u *all_cflags = (char_u *)"gcc -c -I. -Iproto -DHAVE_CONFIG_H
-DFEAT_GUI_GTK -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API
-I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib/gtk-2.0/include
-I/usr/X11R6/include -I/opt/gnome/include/atk-1.0
-I/opt/gnome/include/pango-1.0 -I/usr/include/freetype2
-I/usr/include/freetype2/config -I/opt/gnome/include/glib-2.0
-I/opt/gnome/lib/glib-2.0/include -DORBIT2=1 -pthread -DXTHREADS
-D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/libart-2.0
-I/usr/include/libxml2 -I/opt/gnome/include/libgnomeui-2.0
-I/opt/gnome/include/libgnome-2.0
-I/opt/gnome/include/libgnomecanvas-2.0 -I/opt/gnome/include/gtk-2.0
-I/opt/gnome/include/gconf/2 -I/opt/gnome/include/libbonoboui-2.0
-I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include
-I/opt/gnome/include/orbit-2.0 -I/opt/gnome/include/libbonobo-2.0
-I/opt/gnome/include/gnome-vfs-2.0
-I/opt/gnome/lib/gnome-vfs-2.0/include
-I/opt/gnome/include/bonobo-activation-2.0
-I/opt/gnome/include/pango-1.0 -I/usr/include/freetype2
-I/opt/gnome/lib/gtk-2.0/include -I/usr/X11R6/include
-I/opt/gnome/include/atk-1.0 -I/usr/include/freetype2/config -O2
-fno-strength-reduce -Wall -I/usr/X11R6/include -D_REENTRANT
-D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -pipe -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-I/usr/lib/perl5/5.8.6/i586-linux-thread-multi/CORE
-I/usr/include/python2.4 -pthread -I/usr/include
-D_LARGEFILE64_SOURCE=1 -I/usr/lib/ruby/1.8/i686-linux ";
; compiling pathdef.c gives me no errors or warnings whatsoever. How did
you configure yours?
Best regards,
Tony.