Opened 22 years ago

Closed 21 years ago

#487 closed defect (fixed)

change vim's compilation part: make CPPFLAGS=-DSYS_VIMRC_FILE=\\\"/etc/vimrc\\\"

Reported by: gerard@… Owned by: lfs-book@…
Priority: high Milestone:
Component: Book Version: CVS
Severity: normal Keywords:
Cc:

Description

Try out: CPPFLAGS='-DSYS_VIMRC_FILE=\"/etc/vimrc\"'

Less backslash mess for sure. Not sure if there are other caveats.

Attachments (1)

vim61-vimrc.patch (1.1 KB ) - added by iwanek@… 22 years ago.
vim-6.1-vimrc - makes vim look for vimrc and gvimrc in /etc

Download all attachments as: .zip

Change History (6)

comment:1 by iwanek@…, 22 years ago

according to the INSTALL file in the vim package:


Unix: PUTTING vimrc IN /etc Some Linux distributions prefer to put the global vimrc file in /etc, and the Vim runtime files in /usr. This can be done with:

./configure --prefix=/usr make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim MAKE="make -e"


this might be better than the kludge we use so far, besides when using the patches the current method fails

comment:2 by gerard@…, 22 years ago

"make -e" is deemed a Very Bad Thing. It means that any environment variables you have set will override what is in Makefile files. CFLAGS, LDFLAGS, CPPFLAGS come to mind that could have settings causing other problems with building a package. I'm not too keen on anything that requires a 'make -e' to modify a build behaviour. I rather fix it a proper way (patch, sed, whatever).

by iwanek@…, 22 years ago

Attachment: vim61-vimrc.patch added

vim-6.1-vimrc - makes vim look for vimrc and gvimrc in /etc

comment:3 by gerard@…, 21 years ago

Another suggestion was made: --sysconfdir=/etc

Maybe that works, maybe not. This current CPPFLAGS hack was based on a previous vim version, back then sysconfir didn't work. Maybe it will work now. There's also the release of Vim-6.2 and upgrade into the book soon, maybe it already has fixes for this integrated (ie: one of those 400+ vim patches).

comment:4 by iwanek@…, 21 years ago

--sysconfdir=/etc still dosnt work, and as of vim-6.2 our CPPFLAGS mangling dosnt work the only remaing options are: 1) the following command taken from vim's INSTALL file and modified to use a self contained enviroment (env -i) env -i PATH=$PATH make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim MAKE="make -e" 2) a patch, the one that tushar wrote for BLFS or the the one which ive attached to this bug will work fine I suggest #2 since it makes for an easier build (less to type therfore less to go wrong)

comment:5 by gerard@…, 21 years ago

Resolution: fixed
Status: newclosed

Fixed in a different way that seems more correct: echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' >> src/feature.h

Note: See TracTickets for help on using tickets.