Loading ...
Sorry, an error occurred while loading the content.

Make_ivc.mak subsidiary targets not $(CFG) affected.

Expand Messages
  • Walter Briscoe
    I was doing some work on dosinst.c and uninstal.c. I found that Make_ivc.mak always builds release versions for those files and for vimrun.c. I altered
    Message 1 of 5 , Mar 29, 2003
    • 0 Attachment
      I was doing some work on dosinst.c and uninstal.c. I found that
      Make_ivc.mak always builds release versions for those files and for
      vimrun.c. I altered Make_ivc.mak so they are built with parameters
      equivalent to those for $(VIM).exe. I lost the work! (attrib +h used
      where attrib +r was intended.) I did the work again. This time, I did as
      little as possible to achieve the desired result and ended with better
      work.) There was one oddity. A diagnostic when compiling uninstal.c. The
      following shows the behaviour:
      C:\wfb\vim\bld\vim61\src> :: 0uninstal.c is the original version before I patched it
      C:\wfb\vim\bld\vim61\src> :: This is the original command line
      C:\wfb\vim\bld\vim61\src> cl.exe /nologo -DNDEBUG -DWIN32 0uninstal.c shell32.lib advapi32.lib
      0uninstal.c

      C:\wfb\vim\bld\vim61\src> :: This is the original command line patched with the diagnostic-producing change
      C:\wfb\vim\bld\vim61\src> cl.exe /nologo /W3 -DNDEBUG -DWIN32 0uninstal.c shell32.lib advapi32.lib
      0uninstal.c
      0uninstal.c(46) : warning C4101: 'p' : unreferenced local variable

      C:\wfb\vim\bld\vim61\src> :: The replacement command line consists of about 400 characters
      C:\wfb\vim\bld\vim61\src> :: I do not show it to respect bandwidth
      C:\wfb\vim\bld\vim61\src> :: Reference to this suggests I should test on Windows 95.
      C:\wfb\vim\bld\vim61\src> :: DOS had a command line limit of ~ 124 bytes.
      That was a dumb piece of paranoia. I realised that after starting the
      test. However look below for timing results.

      C:\wfb\vim\bld\vim61\src> :: The /W default is /W1; VC IDE implementations specify /W3 by default.
      C:\wfb\vim\bld\vim61\src> cd ..

      C:\wfb\vim\bld\vim61> diff -c src/0uninstal.c src/uninstal.c
      *** src/0uninstal.c Mon Aug 27 16:31:28 2001
      --- src/uninstal.c Fri Mar 28 10:26:32 2003
      ***************
      *** 43,49 ****
      long value_type;
      long bufsize = BUFSIZE;
      int r;
      - char *p;

      /* Open the key where the path to gvim.exe is stored. */
      if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", 0, KEY_READ,
      --- 43,48 ----

      C:\wfb\vim\bld\vim61> cd src

      C:\wfb\vim\bld\vim61\src> cl.exe /nologo /W3 -DNDEBUG -DWIN32 uninstal.c shell32.lib advapi32.lib
      uninstal.c

      C:\wfb\vim\bld\vim61\src>

      Changes made to Make_ivc.mak:
      1) /c removed from CPP_PROJ and put in .c and .cpp actions so
      $(CPP_PROJ) can be used to build both .obj and .exe files.
      2)LINK32_FLAGS now uses $* and $@ in place of values of $(VIM)
      (This was the big improvement between the lost and latest version.)
      3) ".\" and '"' elements removed where they caused grief.
      Would Bram like me to test the removability of all such string tokens as
      none seem to be necessary?
      4) clean rule patched to remove all files produced by the running value
      of CFG. Would Bram like me to make it $CFG) independent. For example,
      current $(VIM) is vim; current Make_ivc.mak removes vim.exe. Proposed
      Make_vim.exe would remove vim.exe gvim.exe etc.
      5) Added batch compilation rule for .c.obj Conditional code selects
      unbatched rule where batched is un-supported. I had tried and failed to
      make this work in 2001. It had no significant difference on build time -
      3 seconds in 110 for VC6.0. (17 seconds in 659 on W95.) It saves writing
      ~ 40 compilation lines to the nmake output.
      6) Added .c.exe implicit rule. This is used for uninstal.exe and for
      vimrun.exe but can't be used for
      install.exe : dosinst.c
      Would replacing install.exe by dosinst.exe be unprofitable? I tend to a
      hysterical aversion to such history!
      7) /subsystem:windows /subsystem:console is generated in several paths.
      It is equivalent to /subsystem:console for the tested implementations.

      The work has been tested with VC4.0; VC4.1; VC4.2; VC5.0; VC6.0. I don't
      have the horsepower to run later versions. I was particularly interested
      in the acceptability/convertability of the file to the IDE. All this was
      in W2K SP3. After starting this description, I was suspicious and
      checked with VC6.0 on W95 in fear of a command line length problem. Test
      failed - no problem found.

      This - self-evidently - is the Make_ivc.mak patch:
      *** src/0Make_ivc.mak Thu Mar 21 19:14:28 2002
      --- src/Make_ivc.mak Sat Mar 29 08:52:30 2003
      ***************
      *** 37,42 ****
      --- 37,44 ----
      # 2001-08-09 W.Briscoe Restored VC4.0-required trailing space in !MESSAGE afore
      # Enhanced if_ole.idl rule to use /out argument.
      # Default rules now relative to . to reduce IDE/nmake difs
      + # 2003-03-28 W.Briscoe Have $(CFG) affect install.exe, vimrun.exe, uninstal.exe
      + # Got batch build working

      # TARGTYPE "Win32 (x86) Console Application" 0x0103

      ***************
      *** 85,91 ****
      CPP=cl.exe
      LINK32=link.exe

      ! CPP_PROJ= /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c
      # ADD CPP /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c

      LINK32_FLAGS= oldnames.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib comctl32.lib advapi32.lib shell32.lib ole32.lib uuid.lib /nologo
      /machine:I386 /nodefaultlib
      --- 87,93 ----
      CPP=cl.exe
      LINK32=link.exe

      ! CPP_PROJ= /nologo /MT /W3 /GX /I ".\proto" /D "WIN32"
      # ADD CPP /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c

      LINK32_FLAGS= oldnames.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib comctl32.lib advapi32.lib shell32.lib ole32.lib uuid.lib /nologo
      /machine:I386 /nodefaultlib
      ***************
      *** 111,117 ****
      RSC_PROJ=$(RSC_PROJ) /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res
      # ADD RSC /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res

      ! LINK32_FLAGS=$(LINK32_FLAGS) /pdb:none libc.lib oleaut32.lib /subsystem:windows /out:.\gvim.exe
      # ADD LINK32 /pdb:none libc.lib oleaut32.lib /subsystem:windows /out:.\gvim.exe

      !ELSEIF "$(CFG)" == "Vim - Win32 Debug gvim OLE"
      --- 113,119 ----
      RSC_PROJ=$(RSC_PROJ) /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res
      # ADD RSC /I ".\oleRel" /d "NDEBUG" /d "FEAT_OLE" /fo.\oleRel\vim.res

      ! LINK32_FLAGS=$(LINK32_FLAGS) /pdb:none libc.lib oleaut32.lib /subsystem:windows /out:$@
      # ADD LINK32 /pdb:none libc.lib oleaut32.lib /subsystem:windows /out:.\gvim.exe

      !ELSEIF "$(CFG)" == "Vim - Win32 Debug gvim OLE"
      ***************
      *** 130,136 ****
      RSC_PROJ=$(RSC_PROJ) /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res
      # ADD RSC /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res

      ! LINK32_FLAGS=$(LINK32_FLAGS) libcd.lib oleaut32.lib /subsystem:windows /debug /profile /pdb:.\oleDbg/gvimd.pdb /map:.\oleDbg\gvimd.map
      /out:.\gvimd.exe
      # ADD LINK32 libcd.lib oleaut32.lib /subsystem:windows /debug /profile /pdb:.\oleDbg/gvimd.pdb /map:.\oleDbg\gvimd.map
      /out:.\gvimd.exe


      --- 132,138 ----
      RSC_PROJ=$(RSC_PROJ) /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res
      # ADD RSC /I .\oleDbg /d "_DEBUG" /d "FEAT_OLE" /fo.\oleDbg\vim.res

      ! LINK32_FLAGS=$(LINK32_FLAGS) libcd.lib oleaut32.lib /subsystem:windows /debug /profile /pdb:.\oleDbg/$*.pdb /map:.\oleDbg\$*.map /out:$@
      # ADD LINK32 libcd.lib oleaut32.lib /subsystem:windows /debug /profile /pdb:.\oleDbg/gvimd.pdb /map:.\oleDbg\gvimd.map
      /out:.\gvimd.exe


      ***************
      *** 150,156 ****
      RSC_PROJ=$(RSC_PROJ) /d "NDEBUG" /fo.\gRel\vim.res
      # ADD RSC /d "NDEBUG" /fo.\gRel\vim.res

      ! LINK32_FLAGS=$(LINK32_FLAGS) /pdb:none libc.lib /subsystem:windows /out:.\gvim.exe
      # ADD LINK32 /pdb:none libc.lib /subsystem:windows /out:.\gvim.exe

      !ELSEIF "$(CFG)" == "Vim - Win32 Debug gvim"
      --- 152,158 ----
      RSC_PROJ=$(RSC_PROJ) /d "NDEBUG" /fo.\gRel\vim.res
      # ADD RSC /d "NDEBUG" /fo.\gRel\vim.res

      ! LINK32_FLAGS=$(LINK32_FLAGS) /pdb:none libc.lib /subsystem:windows /out:$@
      # ADD LINK32 /pdb:none libc.lib /subsystem:windows /out:.\gvim.exe

      !ELSEIF "$(CFG)" == "Vim - Win32 Debug gvim"
      ***************
      *** 169,175 ****
      RSC_PROJ=$(RSC_PROJ) /d "_DEBUG" /fo.\gDbg\vim.res
      # ADD RSC /d "_DEBUG" /fo.\gDbg\vim.res

      ! LINK32_FLAGS=$(LINK32_FLAGS) libcd.lib /subsystem:windows /debug /profile /pdb:.\gDbg/gvimd.pdb /map:.\gDbg\gvimd.map /out:.\gvimd.exe
      # ADD LINK32 libcd.lib /subsystem:windows /debug /profile /pdb:.\gDbg/gvimd.pdb /map:.\gDbg\gvimd.map /out:.\gvimd.exe

      !ELSEIF "$(CFG)" == "Vim - Win32 Release vim"
      --- 171,177 ----
      RSC_PROJ=$(RSC_PROJ) /d "_DEBUG" /fo.\gDbg\vim.res
      # ADD RSC /d "_DEBUG" /fo.\gDbg\vim.res

      ! LINK32_FLAGS=$(LINK32_FLAGS) libcd.lib /subsystem:windows /debug /profile /pdb:.\gDbg/$*.pdb /map:.\gDbg\$*.map /out:$@
      # ADD LINK32 libcd.lib /subsystem:windows /debug /profile /pdb:.\gDbg/gvimd.pdb /map:.\gDbg\gvimd.map /out:.\gvimd.exe

      !ELSEIF "$(CFG)" == "Vim - Win32 Release vim"
      ***************
      *** 185,191 ****
      CPP_PROJ=$(CPP_PROJ) /O2 /D "NDEBUG" /Fd.\Rel/ /Fo.\Rel/
      # ADD CPP /O2 /D "NDEBUG" /Fd.\Rel/ /Fo.\Rel/

      ! LINK32_FLAGS=$(LINK32_FLAGS) /pdb:none libc.lib /subsystem:console /out:.\vim.exe
      # ADD LINK32 /pdb:none libc.lib /subsystem:console /out:.\vim.exe

      !ELSEIF "$(CFG)" == "Vim - Win32 Debug vim"
      --- 187,193 ----
      CPP_PROJ=$(CPP_PROJ) /O2 /D "NDEBUG" /Fd.\Rel/ /Fo.\Rel/
      # ADD CPP /O2 /D "NDEBUG" /Fd.\Rel/ /Fo.\Rel/

      ! LINK32_FLAGS=$(LINK32_FLAGS) /pdb:none libc.lib /subsystem:console /out:$@
      # ADD LINK32 /pdb:none libc.lib /subsystem:console /out:.\vim.exe

      !ELSEIF "$(CFG)" == "Vim - Win32 Debug vim"
      ***************
      *** 201,212 ****
      CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /Fd.\Dbg/ /Fo.\Dbg/
      # ADD CPP /Zi /Od /D "_DEBUG" /Fd.\Dbg/ /Fo.\Dbg/

      ! LINK32_FLAGS=$(LINK32_FLAGS) libcd.lib /subsystem:console /debug /profile /pdb:.\Dbg/vimd.pdb /map:.\Dbg/vimd.map /out:.\vimd.exe
      # ADD LINK32 libcd.lib /subsystem:console /debug /profile /pdb:.\Dbg/vimd.pdb /map:.\Dbg/vimd.map /out:.\vimd.exe

      !ENDIF

      ! ALL : .\$(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe

      LINK32_OBJS= \
      $(EXTRAS) \
      --- 203,214 ----
      CPP_PROJ=$(CPP_PROJ) /Zi /Od /D "_DEBUG" /Fd.\Dbg/ /Fo.\Dbg/
      # ADD CPP /Zi /Od /D "_DEBUG" /Fd.\Dbg/ /Fo.\Dbg/

      ! LINK32_FLAGS=$(LINK32_FLAGS) libcd.lib /subsystem:console /debug /profile /pdb:.\Dbg/$*.pdb /map:.\Dbg/$*.map /out:$@
      # ADD LINK32 libcd.lib /subsystem:console /debug /profile /pdb:.\Dbg/vimd.pdb /map:.\Dbg/vimd.map /out:.\vimd.exe

      !ENDIF

      ! ALL : $(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe

      LINK32_OBJS= \
      $(EXTRAS) \
      ***************
      *** 251,257 ****
      "$(INTDIR)/version.obj" \
      "$(INTDIR)/window.obj"

      ! ".\$(VIM).exe" : "$(INTDIR)" $(EXTRAS) $(LINK32_OBJS)
      @if exist $(INTDIR)\$(VIM).pdb del $(INTDIR)\$(VIM).pdb
      $(LINK32) $(LINK32_FLAGS) $(LINK32_OBJS)

      --- 253,259 ----
      "$(INTDIR)/version.obj" \
      "$(INTDIR)/window.obj"

      ! $(VIM).exe : "$(INTDIR)" $(EXTRAS) $(LINK32_OBJS)
      @if exist $(INTDIR)\$(VIM).pdb del $(INTDIR)\$(VIM).pdb
      $(LINK32) $(LINK32_FLAGS) $(LINK32_OBJS)

      ***************
      *** 273,301 ****
      -@if exist Make_ivc.ncb erase Make_ivc.ncb
      -@if exist Make_ivc.opt erase Make_ivc.opt
      -@if exist Make_ivc.plg erase Make_ivc.plg

      ! install.exe: dosinst.c
      ! $(CPP) /Fe$@ /nologo -DNDEBUG -DWIN32 dosinst.c kernel32.lib shell32.lib ole32.lib advapi32.lib uuid.lib

      ! uninstal.exe: uninstal.c
      ! $(CPP) /nologo -DNDEBUG -DWIN32 uninstal.c shell32.lib advapi32.lib

      ! vimrun.exe: vimrun.c
      ! $(CPP) /nologo -DNDEBUG vimrun.c

      xxd/xxd.exe: xxd/xxd.c
      cd xxd
      $(MAKE) /NOLOGO -f Make_mvc.mak
      cd ..

      {.}.c{$(INTDIR)/}.obj:
      ! $(CPP) $(CPP_PROJ) $<

      {.}.cpp{$(INTDIR)/}.obj:
      ! $(CPP) $(CPP_PROJ) /I $(INTDIR) $<

      {.}.rc{$(INTDIR)/}.res:
      $(RSC) $(RSC_PROJ) $<

      # Begin Target

      --- 275,323 ----
      -@if exist Make_ivc.ncb erase Make_ivc.ncb
      -@if exist Make_ivc.opt erase Make_ivc.opt
      -@if exist Make_ivc.plg erase Make_ivc.plg
      + -@if exist vimrun.exe erase vimrun.exe
      + -@if exist vimrun.ilk erase vimrun.ilk
      + -@if exist vimrun.map erase vimrun.map
      + -@if exist vimrun.pdb erase vimrun.pdb
      + -@if exist install.exe erase install.exe
      + -@if exist install.ilk erase install.ilk
      + -@if exist install.map erase install.map
      + -@if exist install.pdb erase install.pdb
      + -@if exist uninstal.exe erase uninstal.exe
      + -@if exist uninstal.ilk erase uninstal.ilk
      + -@if exist uninstal.map erase uninstal.map
      + -@if exist uninstal.pdb erase uninstal.pdb
      + cd xxd
      + -$(MAKE) /NOLOGO -f Make_mvc.mak clean
      + cd ..

      ! install.exe: "$(INTDIR)" dosinst.c
      ! $(CPP) $(CPP_PROJ) dosinst.c /link $(LINK32_FLAGS) /subsystem:console

      ! uninstal.exe: "$(INTDIR)" uninstal.c

      ! vimrun.exe: "$(INTDIR)" vimrun.c

      xxd/xxd.exe: xxd/xxd.c
      cd xxd
      $(MAKE) /NOLOGO -f Make_mvc.mak
      cd ..

      + !IFDEF _NMAKE_VER
      + {.}.c{$(INTDIR)/}.obj:: # Double colon for batch compilation
      + !ELSE
      {.}.c{$(INTDIR)/}.obj:
      ! !ENDIF
      ! $(CPP) $(CPP_PROJ) /c $<

      {.}.cpp{$(INTDIR)/}.obj:
      ! $(CPP) $(CPP_PROJ) /c /I $(INTDIR) $<

      {.}.rc{$(INTDIR)/}.res:
      $(RSC) $(RSC_PROJ) $<
      +
      + .c.exe:
      + $(CPP) $(CPP_PROJ) $< /link $(LINK32_FLAGS) /subsystem:console

      # Begin Target


      --
      Walter Briscoe
    • Bram Moolenaar
      ... [...] Be very careful about changing Make_ivc.mak. The format must be so that it can be read into Developer studio. That gives weird and unexpected
      Message 2 of 5 , Mar 29, 2003
      • 0 Attachment
        Walter Briscoe wrote:

        > I was doing some work on dosinst.c and uninstal.c. I found that
        > Make_ivc.mak always builds release versions for those files and for
        > vimrun.c. I altered Make_ivc.mak so they are built with parameters
        [...]

        Be very careful about changing Make_ivc.mak. The format must be so that
        it can be read into Developer studio. That gives weird and unexpected
        requirements and after every non-obvious change it has to be tested with
        several versions of Developer studio. That is a lot of work, thus it's
        better to leave this Makefile alone. Only change it to fix real
        problems.

        > C:\wfb\vim\bld\vim61> diff -c src/0uninstal.c src/uninstal.c

        I'll remove that unused "p" pointer declaration.

        > ! CPP_PROJ= /nologo /MT /W3 /GX /I ".\proto" /D "WIN32"
        > # ADD CPP /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c

        I'm quite sure these lines should be equal. Same remark for most other
        changes.

        I am missing the reason why you made these changes...

        --
        Did you hear about the new 3 million dollar West Virginia State Lottery?
        The winner gets 3 dollars a year for a million years.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
        \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
        \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
      • Walter Briscoe
        In message of Sat, 29 Mar 2003 13:40:13 in , Bram Moolenaar writes ... In message
        Message 3 of 5 , Mar 30, 2003
        • 0 Attachment
          In message <200303291240.h2TCeDo00867@...> of Sat, 29 Mar
          2003 13:40:13 in , Bram Moolenaar <Bram@...> writes
          >
          >Walter Briscoe wrote:
          >
          >> I was doing some work on dosinst.c and uninstal.c. I found that
          >> Make_ivc.mak always builds release versions for those files and for
          >> vimrun.c. I altered Make_ivc.mak so they are built with parameters
          >[...]
          >
          >Be very careful about changing Make_ivc.mak. The format must be so that
          >it can be read into Developer studio. That gives weird and unexpected
          >requirements and after every non-obvious change it has to be tested with
          >several versions of Developer studio. That is a lot of work, thus it's
          In message <erGU6aLvAXh+Ew5D@...> of Sat, 29 Mar 2003
          10:06:39 in , Walter Briscoe <wbriscoe@...> writes
          >The work has been tested with VC4.0; VC4.1; VC4.2; VC5.0; VC6.0. I don't
          >have the horsepower to run later versions. I was particularly interested
          >in the acceptability/convertability of the file to the IDE. All this was
          >in W2K SP3. After starting this description, I was suspicious and
          >checked with VC6.0 on W95 in fear of a command line length problem. Test
          >failed - no problem found.
          Sure it is a lot of work. Making and testing this change took more
          than one working day. (I suspended work on mch_FullName() to do this
          as I had already lost the work and wanted to make it "safe".) I have
          an incomplete understanding of Make_ivc.mak; I assume any change will
          break it; I give it a LOT of testing given my incomplete knowledge; I
          do not fear to change it.
          The file has to be acceptable in format and function in both nmake.exe
          and msdev.exe. Versions 4.[012] and probably 4.3 of nmake try to
          overwrite it to an equivalent verbose form. Vim delivers it as a UNIX
          format file in
          ftp://ftp.vim.org/pub/vim/extra/vim-6.1-extra.tar.gz as
          -rw-r--r-- mool/mool 16507 2002-03-21 19:14:27 vim61/src/Make_ivc.mak
          To be usable it should be converted to a DOS format file and should be
          write protected. This can be done in the vim61/src directory with
          copy Make_ivc.mak 0Make_ivc.mak
          gzip -c t.t | gzip -acd Make_ivc.mak
          attrib +r Make_ivc.mak

          If the format of the file is unacceptable, dialogs are produced as
          follows:
          4.[012] The makefile $Folder\Make_ivc.mak has been modified and cannot
          be used as an internal project workspace.
          A dialog offering to wrap the makefile follows.
          [56].0 give a dialog asking if the makefile should be converted. On
          "Yes", a dialog is given:
          "$Folder\\Make_ivc.mak\n\n"
          "This makefile could not be converted to a Developer Studio project.\n\n"
          "Continuing will create a new Developer Studio project to wrap this makefile. You will be prompted to save after the\n"
          "new project has been created.\n\n"
          "Do you want to continue?"

          These responses should not happen when the file is converted to a
          read-only DOS format file. Instead:
          4.0 says
          "This project's makefile has read-only attributes. You will not be able to save your changes to this project."
          On closing msdev, a further dialog allowing cancellation is given
          saying the changes will not be saved.
          4.[12] have the same dialogs; they only happen if a change is tried.
          [56].0 offer the dialog mentioned above to convert the project. A huge
          dialog is given explaining what is done.

          One can then build the several configurations in the file. 4.[01] do
          not support the OLE configurations as if_ole.idl is not compatible
          with their version of midl.exe. The same thing happens when nmake is
          used.

          I hope all this description of what happens convinces Bram that my
          testing was as thorough as I could make it.

          >better to leave this Makefile alone. Only change it to fix real
          >problems.
          I consider the following a real problem.
          `nmake /f Make_ivc.mak cfg="Vim - Win32 Debug vim"` currently builds
          Release versions of install.exe uninstall.exe and vimrun.exe. To build
          Debug versions of those programs, one must use another Makefile or
          work out how to do the work by hand. I believe in scripting such work
          and having aiming towards makefiles which behave consistently.
          Anything less than perfection is not enough once an improvement has
          been identified.

          >
          >> C:\wfb\vim\bld\vim61> diff -c src/0uninstal.c src/uninstal.c
          >
          >I'll remove that unused "p" pointer declaration.
          Thanks!

          >
          >> ! CPP_PROJ= /nologo /MT /W3 /GX /I ".\proto" /D "WIN32"
          >> # ADD CPP /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c
          >
          >I'm quite sure these lines should be equal. Same remark for most other
          >changes.
          See 1) below. I want to use $(CPP_PROJ) without /c so that I can use
          lines such as
          >! install.exe: "$(INTDIR)" dosinst.c
          >! $(CPP) $(CPP_PROJ) dosinst.c /link $(LINK32_FLAGS) /subsystem:console
          Each lost /c is restored in the actions of the following implicit
          rules:
          >+ !IFDEF _NMAKE_VER
          >+ {.}.c{$(INTDIR)/}.obj:: # Double colon for batch compilation
          >+ !ELSE
          > {.}.c{$(INTDIR)/}.obj:
          >! !ENDIF
          >! $(CPP) $(CPP_PROJ) /c $<
          >
          > {.}.cpp{$(INTDIR)/}.obj:
          >! $(CPP) $(CPP_PROJ) /c /I $(INTDIR) $<

          I would appreciate you (Bram) re-reading the following extract from my
          original posting and answering the questions. I will be happy to try
          and answer any doubts you have. If I fail to do so, we also have a
          success.

          In message <erGU6aLvAXh+Ew5D@...> of Sat, 29 Mar 2003
          10:06:39 in , Walter Briscoe <wbriscoe@...> writes
          >Changes made to Make_ivc.mak:
          >1) /c removed from CPP_PROJ and put in .c and .cpp actions so
          >$(CPP_PROJ) can be used to build both .obj and .exe files.
          >2)LINK32_FLAGS now uses $* and $@ in place of values of $(VIM)
          >(This was the big improvement between the lost and latest version.)
          >3) ".\" and '"' elements removed where they caused grief.
          >Would Bram like me to test the removability of all such string tokens as
          >none seem to be necessary?
          >4) clean rule patched to remove all files produced by the running value
          >of CFG. Would Bram like me to make it $CFG) independent. For example,
          >current $(VIM) is vim; current Make_ivc.mak removes vim.exe. Proposed
          >Make_vim.exe would remove vim.exe gvim.exe etc.
          >5) Added batch compilation rule for .c.obj Conditional code selects
          >unbatched rule where batched is un-supported. I had tried and failed to
          >make this work in 2001. It had no significant difference on build time -
          >3 seconds in 110 for VC6.0. (17 seconds in 659 on W95.) It saves writing
          >~ 40 compilation lines to the nmake output.
          >6) Added .c.exe implicit rule. This is used for uninstal.exe and for
          >vimrun.exe but can't be used for
          >install.exe : dosinst.c
          >Would replacing install.exe by dosinst.exe be unprofitable? I tend to a
          >hysterical aversion to such history!
          >7) /subsystem:windows /subsystem:console is generated in several paths.
          >It is equivalent to /subsystem:console for the tested implementations.

          >
          >I am missing the reason why you made these changes...
          >
          I started work again on the file because it did not make Debug
          versions of the subsidiary targets. 1), 2), 3), 6), and 7) above were
          needed to do that. 4) corrects defects in the clean rule. 5) is a
          luxury; I failed to find a portable way of using batch rules in
          2001-08 and wrote:
          # 6) nmake 1.62 and later support batch compilation. I was unable to use this
          # in a manner acceptable to earlier IDEs.
          That ancient comment is inconsistent with the patch. :-(

          I can now do batch compilation and do. It is not perfect: OLE gvim
          takes 3 compilations; it used to take about 43; one would be perfect.

          I view this file as a good example of most of what I know about
          portable, VC4.0 IDE-compatible makefiles - It also makes vim! :-)
          That knowledge came as a result of Bram's perception that a VC4.0
          makefile can be portable to all later VC implementations.
          The questions are on small matters where I have no strong belief that
          change should be made but would make them myself if I had editorial
          control; that probably explains why vim is a hugely successful product
          and some work I did on sed languishes undelivered.
          --
          Walter Briscoe
        • Bram Moolenaar
          Walter Briscoe wrote: [long text] Hey, you really didn t have to give such a long explanation! Just saying I know would have been sufficient. I distribute
          Message 4 of 5 , Mar 31, 2003
          • 0 Attachment
            Walter Briscoe wrote:

            [long text]

            Hey, you really didn't have to give such a long explanation! Just
            saying "I know" would have been sufficient.

            I distribute all the files in Unix fileformat, because making diffs
            doesn't work otherwise. Only a few of the files need to be in DOS
            format before they can be used. Perhaps we should include a Vim script
            that does the conversion.

            > >better to leave this Makefile alone. Only change it to fix real
            > >problems.
            > I consider the following a real problem.
            > `nmake /f Make_ivc.mak cfg="Vim - Win32 Debug vim"` currently builds
            > Release versions of install.exe uninstall.exe and vimrun.exe. To build
            > Debug versions of those programs, one must use another Makefile or
            > work out how to do the work by hand. I believe in scripting such work
            > and having aiming towards makefiles which behave consistently.
            > Anything less than perfection is not enough once an improvement has
            > been identified.

            OK, that is a good reason.

            > >> ! CPP_PROJ= /nologo /MT /W3 /GX /I ".\proto" /D "WIN32"
            > >> # ADD CPP /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c
            > >
            > >I'm quite sure these lines should be equal. Same remark for most other
            > >changes.
            > See 1) below. I want to use $(CPP_PROJ) without /c so that I can use
            > lines such as

            I wasn't saying the /c should not be removed, I was saying that the "ADD
            CPP" line should probably include the same change. I thought that line
            was used by the IDE.

            > I would appreciate you (Bram) re-reading the following extract from my
            > original posting and answering the questions. I will be happy to try
            > and answer any doubts you have. If I fail to do so, we also have a
            > success.

            > >3) ".\" and '"' elements removed where they caused grief.
            > >Would Bram like me to test the removability of all such string tokens as
            > >none seem to be necessary?

            My preference is to change only those things that need to be fixed. We
            don't fully understand the requirements for this Makefile, especially
            considering how it's read back into Devstudio. Better take no risk here.
            It's easy to break something for a specific situation (combination of
            Windows version and VC version, we can't test them all).

            > >4) clean rule patched to remove all files produced by the running value
            > >of CFG. Would Bram like me to make it $CFG) independent. For example,
            > >current $(VIM) is vim; current Make_ivc.mak removes vim.exe. Proposed
            > >Make_vim.exe would remove vim.exe gvim.exe etc.

            I usually delete vim*.exe by hand, even though "make clean" should do
            it. It would be nice if "make clean" only deletes files for one specific
            configuration.

            > >5) Added batch compilation rule for .c.obj Conditional code selects
            > >unbatched rule where batched is un-supported. I had tried and failed to
            > >make this work in 2001. It had no significant difference on build time -
            > >3 seconds in 110 for VC6.0. (17 seconds in 659 on W95.) It saves writing
            > >~ 40 compilation lines to the nmake output.

            This is one thing that I would suspect might break something. I would
            leave this alone if there isn't a good reason to change it. Making the
            compilation go a few seconds faster isn't a very good reason.

            > >6) Added .c.exe implicit rule. This is used for uninstal.exe and for
            > >vimrun.exe but can't be used for
            > >install.exe : dosinst.c
            > >Would replacing install.exe by dosinst.exe be unprofitable? I tend to a
            > >hysterical aversion to such history!

            Most packages come with an "install.exe", thus we should keep that. I
            can't recall why we don't use install.c, but I'm sure there was a good
            reason for it.

            Please don't spend too much time on making Make_ivc.mak a very nice
            makefile. It must work reliably, that is the main thing.

            --
            hundred-and-one symptoms of being an internet addict:
            269. You wonder how you can make your dustbin produce Sesame Street's
            Oscar's the Garbage Monster song when you empty it.

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
            \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
            \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
          • Walter Briscoe
            In message of Mon, 31 Mar 2003 10:20:15 in , Bram Moolenaar writes ... My first explanation did
            Message 5 of 5 , Mar 31, 2003
            • 0 Attachment
              In message <200303310820.h2V8KFq00581@...> of Mon, 31 Mar 2003
              10:20:15 in , Bram Moolenaar <Bram@...> writes
              >
              >Walter Briscoe wrote:
              >
              >[long text]
              >
              >Hey, you really didn't have to give such a long explanation! Just
              >saying "I know" would have been sufficient.
              My first explanation did not work. It seemed easier to do a brain dump
              to show that a lot of testing had been done! While doing so, I found the
              work failed and walked away. I was using a UNIX file. :(

              >
              >I distribute all the files in Unix fileformat, because making diffs
              >doesn't work otherwise. Only a few of the files need to be in DOS
              >format before they can be used. Perhaps we should include a Vim script
              >that does the conversion.
              For a long time, I (incestuously) used Vim to do this. I think a script
              which does NOT depend on Vim is better. I have the following in my own
              build script.
              echo Transforming ff=unix to ff=dos where needed
              cd %vim_bld_home%\vim%nostop%\src
              call 0hide Make_ivc.mak
              call unix2dos 0Make_ivc.mak Make_ivc.mak
              call 0hide vim16.def
              call unix2dos 0vim16.def vim16.def

              0hide is roughly equivalent to rename %1 0%1 && attrib +r %1

              I quite like unix2dos; it is portable between COMMAND.COM and cmd.exe;
              it is not as good as I would achieve with a shell script.
              :: Interface is similar to that of Microsoft UNIX tools version of unix2dos
              :: Default arguments are not supported, etc.
              if %2[== [ for %%c in (echo goto:last) do %%c Usage %0 infile outfile
              if exist %2 for %%c in (echo goto:last) do %%c %2 already exists
              if not exist %1 for %%c in (echo goto:last) do %%c %1 does not exist
              gzip -c %1 | gzip -acd > %2
              if not exist %2 for %%c in (echo goto:last) do %%c %2 not created
              :last

              >
              >> >better to leave this Makefile alone. Only change it to fix real
              >> >problems.
              >> I consider the following a real problem.
              >> `nmake /f Make_ivc.mak cfg="Vim - Win32 Debug vim"` currently builds
              >> Release versions of install.exe uninstall.exe and vimrun.exe. To build
              >> Debug versions of those programs, one must use another Makefile or
              >> work out how to do the work by hand. I believe in scripting such work
              >> and having aiming towards makefiles which behave consistently.
              >> Anything less than perfection is not enough once an improvement has
              >> been identified.
              >
              >OK, that is a good reason.
              Good!

              >
              >> >> ! CPP_PROJ= /nologo /MT /W3 /GX /I ".\proto" /D "WIN32"
              >> >> # ADD CPP /nologo /MT /W3 /GX /I ".\proto" /D "WIN32" /c
              >> >
              >> >I'm quite sure these lines should be equal. Same remark for most other
              >> >changes.
              >> See 1) below. I want to use $(CPP_PROJ) without /c so that I can use
              >> lines such as
              >
              >I wasn't saying the /c should not be removed, I was saying that the "ADD
              >CPP" line should probably include the same change. I thought that line
              >was used by the IDE.
              The change should be made in CPP_PROJ and NOT in ADD CPP. CPP_PROJ is
              used in nmake command lines and /c is added there when needed; ADD CPP
              lines are used by the IDE. I have not tried additional ADD CPP lines to
              correspond to the nmake lines which use /c. It might work!

              >
              >> I would appreciate you (Bram) re-reading the following extract from my
              >> original posting and answering the questions. I will be happy to try
              >> and answer any doubts you have. If I fail to do so, we also have a
              >> success.
              >
              >> >3) ".\" and '"' elements removed where they caused grief.
              >> >Would Bram like me to test the removability of all such string tokens as
              >> >none seem to be necessary?
              >
              >My preference is to change only those things that need to be fixed. We
              OK!

              >don't fully understand the requirements for this Makefile, especially
              >considering how it's read back into Devstudio. Better take no risk here.
              I think I understand it fairly well. I remain suspicious and do broad
              testing before showing any work to you.

              >It's easy to break something for a specific situation (combination of
              >Windows version and VC version, we can't test them all).
              I think you exaggerate the difficulty. The current file is small where
              it was large because I acquired an adequate understanding.

              >
              >> >4) clean rule patched to remove all files produced by the running value
              >> >of CFG. Would Bram like me to make it $CFG) independent. For example,
              >> >current $(VIM) is vim; current Make_ivc.mak removes vim.exe. Proposed
              >> >Make_vim.exe would remove vim.exe gvim.exe etc.
              >
              >I usually delete vim*.exe by hand, even though "make clean" should do
              >it. It would be nice if "make clean" only deletes files for one specific
              >configuration.
              The current "make clean" does what you seem to think should be done.

              >
              >> >5) Added batch compilation rule for .c.obj Conditional code selects
              >> >unbatched rule where batched is un-supported. I had tried and failed to
              >> >make this work in 2001. It had no significant difference on build time -
              >> >3 seconds in 110 for VC6.0. (17 seconds in 659 on W95.) It saves writing
              >> >~ 40 compilation lines to the nmake output.
              >
              >This is one thing that I would suspect might break something. I would
              >leave this alone if there isn't a good reason to change it. Making the
              >compilation go a few seconds faster isn't a very good reason.
              50 euros to Uganda from me if you show it is broken inside 50 days; from
              you otherwise? :)

              >
              >> >6) Added .c.exe implicit rule. This is used for uninstal.exe and for
              >> >vimrun.exe but can't be used for
              >> >install.exe : dosinst.c
              >> >Would replacing install.exe by dosinst.exe be unprofitable? I tend to a
              >> >hysterical aversion to such history!
              >
              >Most packages come with an "install.exe", thus we should keep that. I
              >can't recall why we don't use install.c, but I'm sure there was a good
              >reason for it.
              I always assumed that there was an attempt to show the limited scope of
              the file; I never understood why uninstal.c did not follow similar
              principles.

              There is a tendency to lose the thoughts behind changes due to the lack
              of a version control system. I dislike the resultant fear of change.

              >
              >Please don't spend too much time on making Make_ivc.mak a very nice
              By definition, it can't be a nice file; most information in it has to be
              specified at least twice!

              >makefile. It must work reliably, that is the main thing.
              >
              It did; it now works better!
              --
              Walter Briscoe
            Your message has been successfully submitted and would be delivered to recipients shortly.