Mail Archives: djgpp/2009/08/20/19:45:07
Hi,
On Jul 17, 9:54=A0pm, Rugxulo <rugx DOT DOT DOT AT gmail DOT com> wrote:
>
> Well, obviously, the user will use a pre-built binary or else compile
> themselves. And since this is a newsgroup about that specific
> compiler, I'm telling anybody in advance who might be interested (so
> far, only you). =A0 ;-)
If anybody cares for a lightweight Emacs client (not perfect, but good
enough) with undo, multiple files, no 64k limit, they can enjoy ZILE.
I don't claim these hacks are ideal, so YMMV (caveat emptor). :-P
P.S. Real GNU Emacs has many more features, try it!! (Hi, Eli !) ;-)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
@echo off
echo.
echo silly .BAT written by rugxulo _AT_ gmail _DOT_ com
echo (don't bug Reuben Thomas [rrt] about this except for his bugs!!)
echo.
echo This .BAT needs LFNs (eek!), DJGPP 2.03p2 or 2.04, GCC 3.2.3+,
and ...
echo ... BinUtils, Gawk, Grep, Make, Sed, File-/Text-/Shell-Utils,
and ...
echo ... PDcurses, and /beta/'s Bash 2.05
echo.
echo http://www.gnu.org/software/zile/
echo ftp://ftp.gnu.org/gnu/zile/zile-2.3.10.tar.gz
echo.
pause
if "%ZILE%"=3D=3D"" set ZILE=3D2.3.10
if "%DJGPP%"=3D=3D"" goto end
if not exist zile-%ZILE%.tar.gz goto end
djtar -x zile-%ZILE%.tar.gz
cd zile-%ZILE%
if "%1"=3D=3D"" if "%CFLAGS%"=3D=3D"" set CFLAGS=3D-s -Os
if not "%1"=3D=3D"" if "%CFLAGS%"=3D=3D"" set CFLAGS=3D%1 %2 %3 %4 %5 %6 %7=
%8
%9
if not "%1"=3D=3D"debug" set DEPEND=3D--disable-dependency-tracking
if "%1"=3D=3D"debug" set CFLAGS=3D-g -O
REM -----------------------------------------------------------------
REM work around a bug in either AutoConf 2.64 or DJGPP Bash 2.0x
(argh)
REM uses either slow sed version or fast ed version
sh -c "ls /dev/env/DJDIR/bin/ed.exe 2>/dev/null"
if errorlevel 1 goto sedfix
if exist fixme.tmp goto edfix
sh -c "echo '1,$s/return \$ac_.*/( & )/' >fixme.tmp ; echo wq >>
fixme.tmp"
:edfix
if exist fixme.tmp ed -s configure < fixme.tmp
:sedfix
if not exist fixme.tmp sed -i -e "/return \$ac_.*/s//( & )/" configure
REM -----------------------------------------------------------------
REM Backspace doesn't work when using PDcurses, only in Ncurses
(why??)
sh -c "./configure %DEPEND% CFLAGS=3D'%CFLAGS%' CURSES_LIB=3D-lpdcurses"
REM bug in AutoConf 2.63, but thankfully fixed in 2.64
REM sed -i "s/\\\\r/\\r/" config.status
REM sh -c "./config.status"
REM Lua isn't really needed except by the maintainer (rrt)
REM sed -i "\,LUA_INIT=3D,s,^,#," src/makefile
REM ignore attempts to run AutoConf / AutoMake
REM sed -i "/^AUTO.* =3D/s//& djecho blah #/" makefile
REM Andris' small patch for 2.04's time.h so as to avoid rdtsc()
linker errors
sh -c "cd /dev/env/DJDIR/include ; sed -i -e '/^unsi.* _rdtsc(/s/^/
static /' -e 's/extern \(__inline__\)/static \1/' time.h"
REM DJGPP 2.03p2 doesn't define EILSEQ like 2.04 but iconv.h does
echo #ifndef EILSEQ // GNU iconv.h (licv*b.zip) or DJGPP 2.04's
errno.h >>config.h
echo #define EILSEQ 41 >>config.h
echo #endif >>config.h
REM 2.03p2 lacks fchown though 2.04 has it, but Gnulib omits pulling
in the fix!
sed -i "/gl_LIBOBJS *=3D.*/s/$/ fchown-stub.o/" lib/makefile
REM 4DOS users, change to ">&" instead else manually use DJGPP's
"redir -eo ..."
REM N.B. I know it's a long line, but it's still less than 126 bytes!!
sed -i -e "/xasprintf/s/2>&1//" -e "\,SIGTSTP,s,^,system(\"cls\");
system(\"\"); term_full_redisplay(); //," src/funcs.c
REM fix mkstemp() to work (why is P_tmpdir =3D "c:/" ?? Vista forbids
it!)
sed -i "\,P_tmpdir.*,s,,\"/dev/env/TEMP/ziXXXXXX\"; // &," src/funcs.c
REM DJGPP doesn't define SIGBUS, so we just ignore it
REM also change ".zile" to "_zile" a la GNU Emacs (for being 8.3
friendly)
sed -i -e "\,SIGBUS,s,^,//," -e "/astr_cat_cstr/s/\./_/" src/main.c
REM ring-bell is annoying, so I turn it off in "%HOME%\_zile"
REM ... or load it manually via "zile -l \my\path\_zile"
sed "/setq ring-bell/s/ t)/ nil)/" src/dotzile.sample > src\_zile
make
if not "%1"=3D=3D"debug" upx --best --lzma --all-filters src/zile.exe
:end
set ZILE=3D
set DEPEND=3D
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
- Raw text -