[Zlib-devel] [PATCH] 1.2.3 makefile.msc usability & rc fix (too late)

William A. Rowe, Jr. wrowe at rowe-clan.net
Thu May 4 01:36:13 EDT 2006


Andrei Polushin wrote:
> William A. Rowe, Jr. wrote:
> 
>>Cosmin Truta wrote:
>>
>>>But is the manifest necessary? 
>>
>>>Does it not cause the build to fail on vc6 (which, by the way, appears
>>>to be most popular among programmers who are not interested in .Net)?
>>
>>No.  Notice the use of if exist $@.manifest before we go to work.  For any
>>traditional compiler users, the manifest changes don't get triggered.
> 
> Probably you are to supply the configured manifests (and other files),
> as long as they are required to build properly.

Arghhh!  NO.  zlib1.dll.manifest, for example, is not created.  The if exist
evaluates to false.  The continuation of this line isn't invoked.

There's no reason for the manifest because msvcrt.dll is not in WinSxS,
it lives in Windows\System32\ and your zlib1.dll or compiled application
finds this clib just fine.

link.exe creates a zlib1.dll.manifest because the corresponding file we
must have, msvcr80.dll, does not live in Windows\System32\.  It is nested
inside of Windows\WinSxS\.  Surely you have access to a Windows 2003/XP box
that you can observe this for yourself by exploring the contents of the
WinSxS directory tree.

link invoked prior to Visual Studio 2005 creates no .manifest this way; the
compiler /MD or /MDd flags don't trigger a .manifest, and we don't need to
generate such polution, ourselves.

> To build it on MSVC 6.0, we can detect MSVC version from NMAKE, see the
> attached patch for an example.

Overkill.  One fundemental rule of makefiles - KISS.

And nmake.exe isn't the component that does the linking.  That would be as
productive as testing the version of gmake to determine the system's version
of ld.  I can offer you a test for the necessary version of cl.exe (that bit
which caused the mess in the first place) but there's truly no need.

Bill




More information about the Zlib-devel mailing list