Permalink
Fetching contributors…
Cannot retrieve contributors at this time
243 lines (192 sloc) 8.8 KB
#----------------------------------------------------------------------
#
# Purpose:
# Main makefile. Named makefile.cfix in order not to interfere with
# building process, which is driven by build.exe
#
# Copyright:
# 2009, Johannes Passing (passing at users.sourceforge.net)
#
#----------------------------------------------------------------------
!IF [cscript /nologo buildnum.vbs > __buildnum.inc]
!ENDIF
!INCLUDE __buildnum.inc
VERSION=1.1.0.$(BUILDNUMBER)
CUSTOMSYMSTORE=D:\XSYMBOLS\Custom
CFIX_CLAGS=-f -z
!if ( "$(DDKBUILDENV)" != "" )
!ERROR Build environment found. Execute this command in a normal shell, not in a WDK shell.
!endif
!if ( "$(CFIX_TREE)" == "" )
!ERROR CFIX_TREE not set.
!endif
!if ( "$(SDKBASE)" == "" )
!MESSAGE WARNING: SDKBASE not set. Set to base directory of Windows SDK.
!MESSAGE WARNING: Note that the path must not contain any spaces - required by build.exe
!endif
#----------------------------------------------------------------------
#
# Binaries. Build process is driven by build.exe.
#
#----------------------------------------------------------------------
build: clean chk fre symadd
ci: clean chk fre
symadd:
symstore add /r /f bin\chk\i386\cfix*.pdb /s "$(CUSTOMSYMSTORE)" /t cfix /v $(VERSION)
symstore add /r /f bin\chk\amd64\cfix*.pdb /s "$(CUSTOMSYMSTORE)" /t cfix /v $(VERSION)
symstore add /r /f bin\fre\i386\cfix*.pdb /s "$(CUSTOMSYMSTORE)" /t cfix /v $(VERSION)
symstore add /r /f bin\fre\amd64\cfix*.pdb /s "$(CUSTOMSYMSTORE)" /t cfix /v $(VERSION)
version:
tools\rcstamp src\cfixctl\cfixctl\cfixctl.rc $(VERSION)
tools\rcstamp src\cfixctl\cfixhost\cfixhost.rc $(VERSION)
tools\assemblyversion\AssemblyInfoUtil.exe -set:$(VERSION) src\Cfix.Addin\Cfix.Addin\AssemblyInfo.cs
tools\assemblyversion\AssemblyInfoUtil.exe -set:$(VERSION) src\Cfix.Control\Cfix.Control\Properties\AssemblyInfo.cs
tools\assemblyversion\AssemblyInfoUtil.exe -set:$(VERSION) src\Cfix.Control\Cfix.Control.TreeView\Properties\AssemblyInfo.cs
tools\assemblyversion\AssemblyInfoUtil.exe -set:$(VERSION) src\Cfix.Control\Cfix.Control.Ui\Properties\AssemblyInfo.cs
cat src\Cfix.Addin\Cfix.Addin\Cfix.Addin.Addin.template-template | sed s/VERSION/$(VERSION)/ > src\Cfix.Addin\Cfix.Addin\Cfix.Addin.Addin.template
i386chk: version
if not exist bin\chk\i386 md bin\chk\i386
copy /Y $(CFIX_TREE)\bin\chk\i386\cfix32.exe bin\chk\i386
copy /Y $(CFIX_TREE)\bin\chk\i386\cfix.dll bin\chk\i386
copy /Y $(CFIX_TREE)\bin\chk\i386\cfixemb.dll bin\chk\i386
copy /Y $(CFIX_TREE)\bin\chk\i386\cfixcons.dll bin\chk\i386
copy /Y $(CFIX_TREE)\bin\chk\i386\cfixkl.dll bin\chk\i386
copy /Y $(CFIX_TREE)\bin\chk\i386\cdiag.dll bin\chk\i386
copy /Y $(CFIX_TREE)\redist\i386\dbghelp.dll bin\chk\i386
copy /Y $(CFIX_TREE)\redist\i386\symsrv.dll bin\chk\i386
cmd /C tools\ddkbuild -WNETW2K checked . -cZ
tools\pdbcopy.exe bin\chk\i386\cfixctl.pdb bin\chk\i386\cfixctl-public.pdb -p
tools\pdbcopy.exe bin\chk\i386\cfixhs32.pdb bin\chk\i386\cfixhs32-public.pdb -p
i386fre: version
if not exist bin\fre\i386 md bin\fre\i386
copy /Y $(CFIX_TREE)\bin\fre\i386\cfix32.exe bin\fre\i386
copy /Y $(CFIX_TREE)\bin\fre\i386\cfix.dll bin\fre\i386
copy /Y $(CFIX_TREE)\bin\fre\i386\cfixemb.dll bin\fre\i386
copy /Y $(CFIX_TREE)\bin\fre\i386\cfixcons.dll bin\fre\i386
copy /Y $(CFIX_TREE)\bin\fre\i386\cfixkl.dll bin\fre\i386
copy /Y $(CFIX_TREE)\bin\fre\i386\cdiag.dll bin\fre\i386
copy /Y $(CFIX_TREE)\redist\i386\dbghelp.dll bin\fre\i386
copy /Y $(CFIX_TREE)\redist\i386\symsrv.dll bin\fre\i386
cmd /C tools\ddkbuild -WNETW2K free . -cZ
tools\pdbcopy.exe bin\fre\i386\cfixctl.pdb bin\fre\i386\cfixctl-public.pdb -p
tools\pdbcopy.exe bin\fre\i386\cfixhs32.pdb bin\fre\i386\cfixhs32-public.pdb -p
amd64chk: version
if not exist bin\chk\amd64 md bin\chk\amd64
copy /Y $(CFIX_TREE)\bin\chk\amd64\cfix64.exe bin\chk\amd64
copy /Y $(CFIX_TREE)\bin\chk\amd64\cfix.dll bin\chk\amd64
copy /Y $(CFIX_TREE)\bin\chk\amd64\cfixemb.dll bin\chk\amd64
copy /Y $(CFIX_TREE)\bin\chk\amd64\cfixcons.dll bin\chk\amd64
copy /Y $(CFIX_TREE)\bin\chk\amd64\cfixkl.dll bin\chk\amd64
copy /Y $(CFIX_TREE)\bin\chk\amd64\cdiag.dll bin\chk\amd64
copy /Y $(CFIX_TREE)\redist\amd64\dbghelp.dll bin\chk\amd64
copy /Y $(CFIX_TREE)\redist\amd64\symsrv.dll bin\chk\amd64
cmd /C tools\ddkbuild -WLHNETA64 checked . -cZ
tools\pdbcopy.exe bin\chk\amd64\cfixctl.pdb bin\chk\amd64\cfixctl-public.pdb -p
tools\pdbcopy.exe bin\chk\amd64\cfixhs64.pdb bin\chk\amd64\cfixhs64-public.pdb -p
amd64fre: version
if not exist bin\fre\amd64 md bin\fre\amd64
copy /Y $(CFIX_TREE)\bin\fre\amd64\cfix64.exe bin\fre\amd64
copy /Y $(CFIX_TREE)\bin\fre\amd64\cfix.dll bin\fre\amd64
copy /Y $(CFIX_TREE)\bin\fre\amd64\cfixemb.dll bin\fre\amd64
copy /Y $(CFIX_TREE)\bin\fre\amd64\cfixcons.dll bin\fre\amd64
copy /Y $(CFIX_TREE)\bin\fre\amd64\cfixkl.dll bin\fre\amd64
copy /Y $(CFIX_TREE)\bin\fre\amd64\cdiag.dll bin\fre\amd64
copy /Y $(CFIX_TREE)\redist\amd64\dbghelp.dll bin\fre\amd64
copy /Y $(CFIX_TREE)\redist\amd64\symsrv.dll bin\fre\amd64
cmd /C tools\ddkbuild -WLHNETA64 free . -cZ
tools\pdbcopy.exe bin\fre\amd64\cfixctl.pdb bin\fre\amd64\cfixctl-public.pdb -p
tools\pdbcopy.exe bin\fre\amd64\cfixhs64.pdb bin\fre\amd64\cfixhs64-public.pdb -p
managedchk:
msbuild src\Cfix.Control\Cfix.Control.sln /t:rebuild /p:Configuration=Debug
msbuild src\Cfix.Addin\Cfix.Addin.sln /t:rebuild /p:Configuration=Debug
managedfre:
msbuild src\Cfix.Control\Cfix.Control.sln /t:rebuild /p:Configuration=Release
msbuild src\Cfix.Addin\Cfix.Addin.sln /t:rebuild /p:Configuration=Release
chk: i386chk amd64chk managedchk
fre: i386fre amd64fre managedfre
i386: i386chk i386fre managedchk managedfre
amd64: amd64chk amd64fre
cleantemps:
-1 for /f "delims=" %%i in ('dir /ad/s/b obj*') do @rd /S /Q %%i
-1 for /f "delims=" %%i in ('dir /s/b *.log') do @del %%i
-1 for /f "delims=" %%i in ('dir /s/b *.err') do @del %%i
-1 for /f "delims=" %%i in ('dir /s/b *.wrn') do @del %%i
clean: cleantemps
if exist bin\chk rd /S /Q bin\chk
if exist bin\fre rd /S /Q bin\fre
#----------------------------------------------------------------------
#
# Unit tests.
#
#----------------------------------------------------------------------
# helper macro, invoked indirectly
__cfixtests:
$(CFIX_CMD) $(CFIX_FLAGS) testctl.dll
$(CFIX_CMD) $(CFIX_FLAGS) testlic.dll
testi386chk:
echo i386 checked
cd bin\chk\i386
$(MAKE) -f ..\..\..\makefile.cfix CFIX_CMD=$(CFIX_TREE)\bin\chk\i386\cfix32.exe __cfixtests
cd ..\..\..
nunit-console-x86 /noshadow bin\chk\i386\Cfix.Control.Test.dll
nunit-console-x86 /noshadow bin\chk\i386\Cfix.Addin.Test.dll
testi386fre:
echo i386 free
cd bin\fre\i386
$(MAKE) -f ..\..\..\makefile.cfix CFIX_CMD=$(CFIX_TREE)\bin\fre\i386\cfix32.exe __cfixtests
cd ..\..\..
nunit-console-x86 /noshadow bin\fre\i386\Cfix.Control.Test.dll
nunit-console-x86 /noshadow bin\fre\i386\Cfix.Addin.Test.dll
testamd64chk:
echo amd64 checked
cd bin\chk\amd64
$(MAKE) -f ..\..\..\makefile.cfix CFIX_CMD=$(CFIX_TREE)\bin\chk\amd64\cfix64.exe __cfixtests
cd ..\..\..
testamd64fre:
echo amd64 free
cd bin\fre\amd64
$(MAKE) -f ..\..\..\makefile.cfix CFIX_CMD=$(CFIX_TREE)\bin\fre\amd64\cfix64.exe __cfixtests
cd ..\..\..
!if ( "$(ARCH)" == "AMD64" )
testchk: testi386chk testamd64chk
testfre: testi386fre testamd64fre
!else
testchk: testi386chk
testfre: testi386fre
!endif
test: testchk testfre
#----------------------------------------------------------------------
#
# Documentation.
#
#----------------------------------------------------------------------
docs:
cd doc
$(MAKE) $(MAKEFLAGS)
cd ..
#----------------------------------------------------------------------
#
# Installer.
#
#----------------------------------------------------------------------
signbinaries:
codesign.cmd "Visual Assert" bin\fre\i386\cfixhs32.exe bin\fre\amd64\cfixhs64.exe
pad:
sed s/__VERSION__/$(VERSION)/ installer\pad.xml | sed s/__DAY__/$(NOW_DAY)/ | sed s/__MONTH__/$(NOW_MONTH)/ | sed s/__YEAR__/$(NOW_YEAR)/ > rtm\pad.xml
test-installer: build docs
cd installer
$(MAKE) clean VisualAssert.msi
cd ..
test-installer-vs100: build docs
cd installer
$(MAKE) ADDITIONALCANDLEOPTS=-dVs100 clean VisualAssert.msi
cd ..
installer: signbinaries docs
cd installer
$(MAKE) clean VisualAssert.msi
cd ..
copy /Y installer\versioninfo.xml rtm\
release: build installer pad
if not exist rtm md rtm
copy installer\VisualAssert_$(VERSION).msi rtm\
codesign.cmd "Visual Assert Installer" rtm\VisualAssert_$(VERSION).msi