Re: Patch: Make_mvc.mak creates an empty gvim.exe.mnf file

2006-06-19 Thread Mathias Michaelis
Bram

 Patch
 Problem:Make_mvc.mak creates an empty gvim.exe.mnf file
 (or stops with an error message).
 Solution:   Don't use 'echo' to create files. Use inline files
 instead.
 Files:  src/Make_mvc.mak
 
 Before including this change I would have to check the file still works
 with old versions of MSVC.  I still need to use 4.1 to be able to
 generate a win32s version.
 
I have downloaded NMAKE 1.5 from

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084#appliesto

and saw, that it can handle inline files too. I think NMAKE 1.5 is
only a bug fix release with no additional features so NMAKE 1.4
should also handle inline files. The actual version on NMAKE is
about 8.00.xxx.

The method of using inline files is much more reliable than using
echo, by reasons mentioned already at other places of that thread.

With best regards

Mathias


Re: Patch: Make_mvc.mak creates an empty gvim.exe.mnf file

2006-06-18 Thread Mathias Michaelis
Bram

 Patch
 Problem:Make_mvc.mak creates an empty gvim.exe.mnf file
 (or stops with an error message).
 Solution:   Don't use 'echo' to create files. Use inline files
 instead.
 Files:  src/Make_mvc.mak
 
 This has always worked just fine.  When does it fail?
 
The gvim.exe.mnf always was empty -- but as George Reilly (who made
the skipt) told me, it is only used for 64-Bit Windows.

On the other hand, the error message (FATAL error: echo returned
'1') was only issued from time to time, depending on the commands I
typed in before. However, the message appeared in a reproducible
manner if I issued the nmake command from within a BATCH file.

I checked the documentation of nmake from VC 8.0 (VS 2005) and from
VC 6.0 to see if inline files can be handled. Since it is possible
and since I can compile Vim _only_ like that, I'm pretty sure this
patch facilitate the life of many users.

My environment: Visual Studio 2005 Express Edition.

C:cmd -version
Microsoft Windows XP [Version 5.1.2600]

C:nmake /?
Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation.  All rights reserved.

With best regards

Mathias


Re: Patch: Make_mvc.mak creates an empty gvim.exe.mnf file

2006-06-18 Thread A.J.Mechelynck

Bram Moolenaar wrote:

Mathias Michaelis wrote:


Patch
Problem:Make_mvc.mak creates an empty gvim.exe.mnf file
(or stops with an error message).
Solution:   Don't use 'echo' to create files. Use inline files
instead.
Files:  src/Make_mvc.mak

This has always worked just fine.  When does it fail?


The gvim.exe.mnf always was empty -- but as George Reilly (who made
the skipt) told me, it is only used for 64-Bit Windows.


Strange, the echo commands for the pathdef.c file have always worked just
fine.
 

On the other hand, the error message (FATAL error: echo returned
'1') was only issued from time to time, depending on the commands I
typed in before. However, the message appeared in a reproducible
manner if I issued the nmake command from within a BATCH file.


This smells like a bug in nmake.


I checked the documentation of nmake from VC 8.0 (VS 2005) and from
VC 6.0 to see if inline files can be handled. Since it is possible
and since I can compile Vim _only_ like that, I'm pretty sure this
patch facilitate the life of many users.

My environment: Visual Studio 2005 Express Edition.

C:cmd -version
Microsoft Windows XP [Version 5.1.2600]

C:nmake /?
Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation.  All rights reserved.


Before including this change I would have to check the file still works
with old versions of MSVC.  I still need to use 4.1 to be able to
generate a win32s version.



echo string1   file
echo string2  file
echo string3  file
etc.

ought to work, _except_ when the string is (ignoring case) ON OFF or 
empty (in which case you will set, clear or display the echo on/off 
setting instead of writing / appending to the file). People were using 
it in batch files in Dos from time immemorial, with shells which didn't 
know about inline documents.



Best regards,
Tony.


Re: Patch: Make_mvc.mak creates an empty gvim.exe.mnf file

2006-06-18 Thread Bram Moolenaar

Tony Mechelynck wrote:

   echo string1   file
   echo string2  file
   echo string3  file
 etc.
 
 ought to work, _except_ when the string is (ignoring case) ON OFF or 
 empty (in which case you will set, clear or display the echo on/off 
 setting instead of writing / appending to the file). People were using 
 it in batch files in Dos from time immemorial, with shells which didn't 
 know about inline documents.

You are apparently reading documentation.  Does it also say something
about having  and  characters in the string?  That may be the cause of
the problem:

@echo ^?xml version=1.0 encoding=UTF-8 standalone=yes?^ $@
@echo ^assembly xmlns=urn:schemas-microsoft-com:asm.v1 
manifestVersion=1.0^ $@


The ^ character is apparently used to escape the special meaning of 
and .

-- 
ARTHUR:  I did say sorry about the `old woman,' but from the behind you
 looked--
DENNIS:  What I object to is you automatically treat me like an inferior!
ARTHUR:  Well, I AM king...
  The Quest for the Holy Grail (Monty Python)

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


Re: Patch: Make_mvc.mak creates an empty gvim.exe.mnf file

2006-06-18 Thread A.J.Mechelynck

Bram Moolenaar wrote:

Tony Mechelynck wrote:


echo string1   file
echo string2  file
echo string3  file
etc.

ought to work, _except_ when the string is (ignoring case) ON OFF or 
empty (in which case you will set, clear or display the echo on/off 
setting instead of writing / appending to the file). People were using 
it in batch files in Dos from time immemorial, with shells which didn't 
know about inline documents.


You are apparently reading documentation.  Does it also say something
about having  and  characters in the string?  That may be the cause of
the problem:

@echo ^?xml version=1.0 encoding=UTF-8 standalone=yes?^ $@
@echo ^assembly xmlns=urn:schemas-microsoft-com:asm.v1 
manifestVersion=1.0^ $@


The ^ character is apparently used to escape the special meaning of 
and .



ah, that may depend on the shell version; I expect that old shells might 
not know about it. Maybe inline documents (handled by the make utility) 
might be better then? Of course, we are back to whether old versions of 
nmake support them.



Best regards,
Tony.


Re: Patch: Make_mvc.mak creates an empty gvim.exe.mnf file

2006-06-17 Thread Bram Moolenaar

Mathias Michaelis wrote:

 Patch
 Problem:Make_mvc.mak creates an empty gvim.exe.mnf file (or stops
 with an error message). (Suresh Govindachar)
 Solution:   Don't use 'echo' to create files. Use inline files instead.
 Files:  src/Make_mvc.mak

This has always worked just fine.  When does it fail?

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


Patch: Make_mvc.mak creates an empty gvim.exe.mnf file

2006-05-22 Thread Mathias Michaelis
Patch
Problem:Make_mvc.mak creates an empty gvim.exe.mnf file (or stops
with an error message). (Suresh Govindachar)
Solution:   Don't use 'echo' to create files. Use inline files instead.
Files:  src/Make_mvc.mak


*** ..\vim-7.0.000\src\Make_mvc.mak 2006-05-07 16:13:02.0 +0200
--- src\Make_mvc.mak2006-05-22 22:11:29.768449600 +0200
***
*** 963,1001 
  E_CFLAGS = $(E0_CFLAGS:=\)

  $(PATHDEF_SRC): auto
!   @echo creating $(PATHDEF_SRC)
!   @echo /* pathdef.c */  $(PATHDEF_SRC)
!   @echo #include vim.h  $(PATHDEF_SRC)
!   @echo char_u *default_vim_dir = (char_u *)$(VIMRCLOC:\=\\);  
$(PATHDEF_SRC)
!   @echo char_u *default_vimruntime_dir = (char_u 
*)$(VIMRUNTIMEDIR:\=\\);  $(PATHDEF_SRC)
!   @echo char_u *all_cflags = (char_u *)$(CC:\=\\) $(E_CFLAGS);  
$(PATHDEF_SRC)
!   @echo char_u *all_lflags = (char_u *)$(link:\=\\) $(LINKARGS1:\=\\) 
$(LINKARGS2:\=\\);  $(PATHDEF_SRC)
!   @echo char_u *compiled_user = (char_u *)$(USERNAME);  $(PATHDEF_SRC)
!   @echo char_u *compiled_sys = (char_u *)$(USERDOMAIN);  
$(PATHDEF_SRC)

  gvim.exe.mnf: auto
!   @echo ^?xml version=1.0 encoding=UTF-8 standalone=yes?^ $@
!   @echo ^assembly xmlns=urn:schemas-microsoft-com:asm.v1 
manifestVersion=1.0^ $@
!   @echo   ^assemblyIdentity $@
!   @echo processorArchitecture=$(ASSEMBLY_ARCHITECTURE) $@
!   @echo version=7.0.0.0 $@
!   @echo type=win32 $@
!   @echo name=Vim $@
!   @echo   /^ $@
!   @echo   ^description^Vi Improved - A Text Editor^/description^ $@
!   @echo   ^dependency^ $@
!   @echo ^dependentAssembly^ $@
!   @echo   ^assemblyIdentity $@
!   @echo type=win32 $@
!   @echo name=Microsoft.Windows.Common-Controls $@
!   @echo version=6.0.0.0 $@
!   @echo publicKeyToken=6595b64144ccf1df $@
!   @echo language=* $@
!   @echo processorArchitecture=$(ASSEMBLY_ARCHITECTURE) $@
!   @echo   /^ $@
!   @echo ^/dependentAssembly^ $@
!   @echo   ^/dependency^ $@
!   @echo ^/assembly^ $@

  auto:
if not exist auto/nul mkdir auto
--- 963,1005 
  E_CFLAGS = $(E0_CFLAGS:=\)

  $(PATHDEF_SRC): auto
!   @echo creating $@
!   @copy  $@
! /* pathdef.c */
! #include vim.h
! char_u *default_vim_dir = (char_u *)$(VIMRCLOC:\=\\);
! char_u *default_vimruntime_dir = (char_u *)$(VIMRUNTIMEDIR:\=\\);
! char_u *all_cflags = (char_u *)$(CC:\=\\) $(E_CFLAGS);
! char_u *all_lflags = (char_u *)$(link:\=\\) $(LINKARGS1:\=\\) 
$(LINKARGS2:\=\\);
! char_u *compiled_user = (char_u *)$(USERNAME);
! char_u *compiled_sys = (char_u *)$(USERDOMAIN);
! 

  gvim.exe.mnf: auto
!   @copy  $@
! ?xml version=1.0 encoding=UTF-8 standalone=yes?
! assembly xmlns=urn:schemas-microsoft-com:asm.v1 manifestVersion=1.0
!  assemblyIdentity
!processorArchitecture=$(ASSEMBLY_ARCHITECTURE)
!version=7.0.0.0
!type=win32
!name=Vim
!  /
!  descriptionVi Improved - A Text Editor/description
!  dependency
!dependentAssembly
!  assemblyIdentity
!type=win32
!name=Microsoft.Windows.Common-Controls
!version=6.0.0.0
!publicKeyToken=6595b64144ccf1df
!language=*
!processorArchitecture=$(ASSEMBLY_ARCHITECTURE)
!  /
!/dependentAssembly
!  /dependency
! /assembly
! 

  auto:
if not exist auto/nul mkdir auto

-- 
Thanks a lot for the VIM Editor!
Greetings
Mathias