[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] Problems adding CFLAGS in make menuconfig
From:       Simon Byrnand <simon () igrin ! co ! nz>
Date:       2005-01-27 20:01:50
Message-ID: 6.1.2.0.1.20050128085816.05c8d9f0 () pop3 ! igrin ! co ! nz
[Download RAW message or body]

At 01:38 28/01/2005, Tito wrote:

>On Wednesday 26 January 2005 22:21, Simon Byrnand wrote:
> > Hi All,
> >
> > I'm trying to override the default editor for crontab by adding a CFLAG
> > option in menuconfig, but I'm not having much success, after trying every
> > possible method of escaping and/or using single and double quotes. The
> > definition I'm trying to override (without directly editing the source) is:
> >
> > #ifndef PATH_VI
> > #define PATH_VI         "/bin/vi"   /* location of vi       */
> > #endif
> >
> > so I figured the following should work under the extra CFLAGS option:
> >
> > -DPATH_VI="/bin/e3pi"
> >
> > But no go. I get the following error:
> >
> > gcc -I/root/wireless-router/busybox-1.00/include
> > -I/root/wireless-router/busybox-1.00/include
> > -I/root/wireless-router/busybox-1.00/libbb -Wall -Wstrict-prototypes
> > -Wshadow -Os -march=i386 -mpreferred-stack-boundary=2  -malign-functions=0
> > -malign-jumps=0 -malign-loops=0 -fomit-frame-pointer -D_GNU_SOURCE
> > -DNDEBUG   -DPATH_VI=\/bin/e3pi\  -c -o
> > /root/wireless-router/busybox-1.00/miscutils/crontab.o
> > /root/wireless-router/busybox-1.00/miscutils/crontab.c
> > /root/wireless-router/busybox-1.00/miscutils/crontab.c: In function 
> `EditFile':
> > /root/wireless-router/busybox-1.00/miscutils/crontab.c:320: parse error
> > before `/'
> > make: *** [/root/wireless-router/busybox-1.00/miscutils/crontab.o] Error 1
> >
> > I've also tried backslash escaping the double quotes, using single quotes,
> > using no quotes at all, and all of them give me different error messages.
> > It seems to be an issue with the way the string is stored in the .config
> > file - as some escaping is done automatically by menuconfig. I'm at a bit
> > of a loss what to try next other than just editing the define directly.
> > (Which I will do for now, but which isn't as maintainable) Or am I doing
> > something stupidly wrong ? :)
> >
> > Regards,
> > Simon
> >
> >
>Hi,
>if you don't use the vi applet at all an alternative solution could be:
>
>1) edit this line in e3.h:
>%define DEFAULT_MODE PI                 ;<---- select one of WS, EM, NE, 
>PI, VI
>and compile.
>so e3 will start by default in pico mode.
>2) rename the e3 binary to vi and put it in /bin.

Hi,

I thought about that, but it was easier to modify busybox instead. I'm 
still noticing a problem though, for some reason e3 doesn't like working 
with busybox's crontab command - doing a crontab -e results in an existing 
crontab being opened as a temp file, such as /var/spool/cron/cron.56 and 
when I save any changes, somehow they are not saved. The editor doesn't 
even save the file successfully back to the temp file, despite saying the 
file is saved, and even though it has no problems editing it if I call it 
directly instead of via crontab. (Puzzled) Could the crontab command be 
keeping the temp file locked or something ??

Regards,
Simon



_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic