nested nmake
- From: nickdu <nickdu@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 20 Jan 2006 12:09:02 -0800
I'm no nmake expert and so I'm running into trouble trying to do what I
assume is a simple task. I prefer to use nmake to build my projects rather
than the visual IDE. I'm building .NET 2.0 assemblies. I would like to
setup a hierarchical directory structure which will cascade nmakes. So
whatever level I run nmake at it will traverse down the directory structure
running nmake at each level. I don't need it to dynamically figure out what
directories are contained below and can code that into the make file. I'm
having trouble getting the correct targets to ripple through however. So if
I do an 'nmake clean' it want all the successive nmakes to make the 'clean'
target. I have the following makefile (which doesn't work) which I copied
from something I did a while ago which I thought was working. When I do an
nmake clean
it appears it's actually doing a
nmake
followed by a
nmake clean
Any ideas what I'm doing wrong or just suggestions on how I should be doing
this?
Services=Services
Services=$(Services:type=)
Frameworks=Frameworks
Frameworks=$(Frameworks:type=)
!ifndef OUTPUTBASE
OUTPUTBASE=bin
!endif
OUTPUTDIR=$(OUTPUTBASE)\buildtype
THIRDPARTY=3rdParty
!ifdef RELEASE
OUTPUTDIR=$(OUTPUTDIR:buildtype=release)
!else
OUTPUTDIR=$(OUTPUTDIR:buildtype=debug)
DEBUGFLAGS=/debug+
!endif
all: $(OUTPUTBASE) $(OUTPUTDIR) $(Services:type=) $(Frameworks:type=) \
$(OUTPUTDIR)\Cougar.exe
clean: $(Services:type=clean) $(Frameworks:type=clean)
!if EXISTS($(OUTPUTDIR)\Cougar.exe)
del $(OUTPUTDIR)\Cougar.exe
!endif
!if EXISTS($(OUTPUTDIR)\Cougar.pdb)
del $(OUTPUTDIR)\Cougar.pdb
!endif
rebuild: clean all
$(OUTPUTBASE):
md $(OUTPUTBASE)
$(OUTPUTDIR):
md $(OUTPUTDIR)
$(Services:type=)::
cd Services
set RELEASE=$(RELEASE)
set THIRDPARTY=..\$(THIRDPARTY)
set OUTPUTBASE=..\$(OUTPUTBASE)
nmake
cd ..
$(Frameworks:type=)::
cd Frameworks
set RELEASE=$(RELEASE)
set THIRDPARTY=..\$(THIRDPARTY)
set OUTPUTBASE=..\$(OUTPUTBASE)
nmake
cd ..
$(Services:type=clean)::
cd Services
set RELEASE=$(RELEASE)
set THIRDPARTY=..\$(THIRDPARTY)
set OUTPUTBASE=..\$(OUTPUTBASE)
nmake clean
cd ..
$(Frameworks:type=clean)::
cd Frameworks
set RELEASE=$(RELEASE)
set THIRDPARTY=..\$(THIRDPARTY)
set OUTPUTBASE=..\$(OUTPUTBASE)
nmake clean
cd ..
$(OUTPUTDIR)\Cougar.exe: Cougar.cs
csc $(DEBUGFLAGS) /out:$@ $**
--
Thanks,
Nick
.
- Follow-Ups:
- RE: nested nmake
- From: nickdu
- RE: nested nmake
- Prev by Date: Re: App Verifier 3.0 Will Not Install on Windows Server 2003 Std SP1
- Next by Date: Re: AppVerifier 3.0.0026 would not install on Win XP Pro SP2
- Previous by thread: AppVerifier 3.0.0026 would not install on Win XP Pro SP2
- Next by thread: RE: nested nmake
- Index(es):
Relevant Pages
|