Alexey 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/\\";$$/";/'
That looks like a good solution.
--
They now pass three KNIGHTS impaled to a tree. With their feet off the
ground, with one lance through the lot of them, they are skewered up
like a barbecue.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///