nmake building what it shouldn't?!

Tech-Archive recommends: Fix windows errors by optimizing your registry



I have an app that is made with one solution and several projects
within it. Each project is independent, and when one doesn't build for
some reason, I still need the others to build and the executable to be
produced. I don't want to simply ignore all errors, because I need to
determine which projects I want to build and make sure they do build.

The way this is currently handled, with VS6, is with nmake makefiles.
There is a separate file containing macros, and this file is included
into the main makefile for the solution. Each project has its own
makefile in a subdirectory, along with its source code and project
file. Each project's makefile includes another file which includes the
file containing the macro definitions. I know these includes are
working because if they weren't, and I typed "nmake app" at the prompt,
I'd get a complaint that whatever file to include couldn't be found.
This isn't happening.

So, inside a project's makefile, we have something like this, where
PROJECT_AA is nowhere to be found in the list of defined macros,
because this isn't a project I want to have built (see the VS6 version
commented out, and the VC2005 line inserted after):

!IF "$(PROJECT_AA)"!=""
dll:
# msdev ..\MySolution.dsw /make "aa - Win32 Release"
vcbuild aa.vcproj "Release|Win32"
!ELSE

So if I use a command prompt to go into project AA's directory and type
"nmake dll" I get the errors I expect to see. That's fine. This happens
whether I'm using VS6 or 2005. Now, I invoke the main makefile and I
expect this project to be ignored because the PROJECT_AA macro is NOT
defined anywhere. This works fine with VS6 but with 2005 the errors
from the project are causing the build to fail, and no executable is
created. Why is this happening? All I did from VS6 to VC8 is convert
the dsw/dsp files to .sln/vcproj, and hand edit each makefile to use
vcbuild instead of msdev.

I don't know if this makes a difference, but for the 2005 builds I'm
using the nmake.exe downloaded from VC++ Express while I try it out. I
don't expect it to be any different from the paid-for version.

Help Please!!!

Thank you,
Jeanne

.



Relevant Pages

  • Re: nmake building what it shouldnt?!
    ... The way this is currently handled, with VS6, is with nmake makefiles. ... There is a separate file containing macros, ... into the main makefile for the solution. ...
    (microsoft.public.vc.ide_general)
  • Re: GNU make: recursive make vs single makefile
    ... technics of using single makefile and who knows in practice about ... I also made a set of macros so you could add new ... You learn a lot about make syntax and features getting it working ... sub-make defines the same variable. ...
    (comp.os.linux.development.system)
  • Re: newbie has linker error
    ... > Here are the abridged listings of the base class declaration and the ... > makefile for library: ... >>Provide some sample code please. ... the 'C' macros for C++ usage, rather than using the C++ macros, ...
    (comp.os.linux.development.apps)
  • Re: DSP Files to makefile (OT?)
    ... > Toolkit 2003" und den MSSDK. ... > Leider liegt auch kein makefile for. ... bzw. den anderen oben erwähnten Projektdateien ein Makefile zu ... VS6 hat noch die Möglichkeit dsp Dateien als make Datei zu exportieren. ...
    (microsoft.public.de.vc)
  • Re: makefile and PSDK
    ... That's because nmake (VS6) appears reject ... machines depending on the order or creation/installation of the directory. ... Thus a makefile that works on a developer machine often does not work on ...
    (microsoft.public.win32.programmer.tools)