Markus Heidelberg wrote:

> Bram Moolenaar, 2010-02-24 15:08:
> > 
> > Patch 7.2.372 (extra)
> > Problem:    Cross-compiling GvimExt and xxd doesn't work.
> > Solution:   Change the build files. (Markus Heidelberg)
> > Files:          src/INSTALLpc.txt, src/GvimExt/Make_ming.mak, 
> > src/Make_cyg.mak,
> >         src/Make_ming.mak, src/xxd/Make_cyg.mak
> > 
> > 
> > *** ../vim-7.2.371/src/Make_ming.mak        2009-09-11 12:48:56.000000000 
> > +0200
> > --- src/Make_ming.mak       2010-02-24 15:01:31.000000000 +0100
> > ***************
> > *** 241,255 ****
> >   DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
> >     -DHAVE_PATHDEF -DFEAT_$(FEATURES)
> >   ifeq ($(CROSS),yes)
> > ! # cross-compiler:
> > ! CC = i586-pc-mingw32msvc-gcc
> >   DEL = rm
> >   MKDIR = mkdir -p
> > ! WINDRES = i586-pc-mingw32msvc-windres
> >   else
> >   # normal (Windows) compilation:
> > - CC = gcc
> >   ifneq (sh.exe, $(SHELL))
> >   DEL = rm
> >   MKDIR = mkdir -p
> >   DIRSLASH = /
> > --- 241,255 ----
> >   DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
> >     -DHAVE_PATHDEF -DFEAT_$(FEATURES)
> >   ifeq ($(CROSS),yes)
> > ! # cross-compiler prefix:
> > ! CROSS_COMPILE = i586-pc-mingw32msvc-
> >   DEL = rm
> >   MKDIR = mkdir -p
> > ! DIRSLASH = /
> >   else
> >   # normal (Windows) compilation:
> >   ifneq (sh.exe, $(SHELL))
> > + CROSS_COMPILE =
> 
> Why did you move this empty variable definition after the ifneq? If
> ifneq is false, CROSS_COMPILE is now undefined in this case. The
> CROSS_COMPILE variable should be set to an empty value if CROSS is
> not set to "yes".

What happened is that I could not apply the patch, it failed for an
unknown reason.  So I had to apply by hand.  Apparently I made a
mistake.  I'm glad you noticed.

> 
> >   DEL = rm
> >   MKDIR = mkdir -p
> >   DIRSLASH = /
> > ***************
> > *** 258,265 ****
> >   MKDIR = mkdir
> >   DIRSLASH = \\
> >   endif
> > - WINDRES = windres
> >   endif
> >   
> >   #>>>>> end of choices
> >   
> > ###########################################################################
> > --- 258,266 ----
> >   MKDIR = mkdir
> >   DIRSLASH = \\
> >   endif
> >   endif
> > + CC := $(CROSS_COMPILE)gcc
> > + WINDRES := $(CROSS_COMPILE)windres
> >   
> >   #>>>>> end of choices
> >   
> > ###########################################################################
> > ***************
> > *** 549,558 ****
> >     upx vim.exe
> >   
> >   xxd/xxd.exe: xxd/xxd.c
> > !   $(MAKE) -C xxd -f Make_cyg.mak
> >   
> >   GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc 
> > GvimExt/gvimext.h
> >     $(MAKE) -C GvimExt -f Make_ming.mak
> >   
> >   clean:
> >     -$(DEL) $(OUTDIR)$(DIRSLASH)*.o
> > --- 550,560 ----
> >     upx vim.exe
> >   
> >   xxd/xxd.exe: xxd/xxd.c
> > !   $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC)
> >   
> >   GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc 
> > GvimExt/gvimext.h
> >     $(MAKE) -C GvimExt -f Make_ming.mak
> 
> I don't know how this could happen, but in my patch this line above was
> removed and not kept.

I wasn't very careful, apparently.  Correctional patch coming soon.

> > +   $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) 
> > CROSS_COMPILE=$(CROSS_COMPILE)
> >   
> >   clean:
> >     -$(DEL) $(OUTDIR)$(DIRSLASH)*.o

-- 
Microsoft's definition of a boolean: TRUE, FALSE, MAYBE
"Embrace and extend"...?

 /// 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    ///

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui