-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.nmake
81 lines (65 loc) · 3.03 KB
/
Makefile.nmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#NAnt nmake makefile for building on windows
CSC=csc
RESGEN=resgen
TARGET=net-2.0
!ifdef MONO
DEFINE = MONO
FRAMEWORK_DIR = mono
!else
DEFINE = NET
FRAMEWORK_DIR = net
!endif
!if "$(TARGET)" == "net-2.0" || "$(TARGET)" == "mono-2.0"
DEFINE = $(DEFINE),NET_1_0,NET_1_1,NET_2_0,ONLY_2_0
!else if "$(TARGET)" == "net-3.5" || "$(TARGET)" == "mono-3.5"
DEFINE = $(DEFINE),NET_1_0,NET_1_1,NET_2_0,NET_3_5,ONLY_3_5
!else if "$(TARGET)" == "net-4.0" || "$(TARGET)" == "mono-4.0"
DEFINE = $(DEFINE),NET_1_0,NET_1_1,NET_2_0,NET_3_5,NET_4_0,ONLY_4_0
!else
!error Specified target "$(TARGET)" is not valid
!endif
!ifdef DEBUG
NANT_DEBUG = -debug+
!endif
TARGET_FRAMEWORK = -t:$(TARGET)
NANT = $(MONO) bootstrap\NAnt.exe $(NANT_DEBUG)
all: bootstrap build-nant
build-nant: bootstrap
$(NANT) $(TARGET_FRAMEWORK) -f:NAnt.build build
clean:
if exist bootstrap rmdir /S /Q bootstrap
if exist build rmdir /S /Q build
install: bootstrap
$(NANT) $(TARGET_FRAMEWORK) -f:NAnt.build install -D:prefix="$(prefix)" -D:destdir="$(DESTDIR)" -D:doc.prefix="$(docdir)"
run-test: bootstrap
$(NANT) $(TARGET_FRAMEWORK) -f:NAnt.build test
bootstrap: setup bootstrap\NAnt.exe bootstrap\NAnt.Core.dll bootstrap\NAnt.DotNetTasks.dll bootstrap\NAnt.CompressionTasks.dll bootstrap\NAnt.Win32Tasks.dll
setup:
if not exist bootstrap md bootstrap
if not exist bootstrap\lib md bootstrap\lib
xcopy lib bootstrap\lib /S /Y /Q
copy lib\common\neutral\log4net.dll bootstrap
copy src\NAnt.Console\App.config bootstrap\NAnt.exe.config
bootstrap\NAnt.exe:
$(CSC) $(DEBUG) -target:exe -define:$(DEFINE) -out:bootstrap\NAnt.exe -r:bootstrap\log4net.dll \
-r:System.Configuration.dll -recurse:src\NAnt.Console\*.cs src\CommonAssemblyInfo.cs
bootstrap\NAnt.Core.dll:
$(RESGEN) src\NAnt.Core\Resources\Strings.resx bootstrap\NAnt.Core.Resources.Strings.resources
$(CSC) $(DEBUG) -target:library -warn:0 -define:$(DEFINE) -out:bootstrap\NAnt.Core.dll -r:bootstrap\log4net.dll \
-r:System.Web.dll -resource:bootstrap\NAnt.Core.Resources.Strings.resources \
-recurse:src\NAnt.Core\*.cs src\CommonAssemblyInfo.cs
bootstrap\NAnt.DotNetTasks.dll:
$(RESGEN) src\NAnt.DotNet\Resources\Strings.resx bootstrap\NAnt.DotNet.Resources.Strings.resources
$(CSC) $(DEBUG) -target:library -warn:0 -define:$(DEFINE) -out:bootstrap\NAnt.DotNetTasks.dll \
-r:bootstrap\NAnt.Core.dll -r:bootstrap/lib/common/neutral/NDoc.Core.dll \
-resource:bootstrap\NAnt.DotNet.Resources.Strings.resources -recurse:src\NAnt.DotNet\*.cs \
src\CommonAssemblyInfo.cs
bootstrap\NAnt.CompressionTasks.dll:
$(CSC) $(DEBUG) -target:library -warn:0 -define:$(DEFINE) -out:bootstrap\NAnt.CompressionTasks.dll \
-r:bootstrap\NAnt.Core.dll -r:bootstrap\lib\common\neutral\ICSharpCode.SharpZipLib.dll \
-recurse:src\NAnt.Compression\*.cs src\CommonAssemblyInfo.cs
bootstrap\NAnt.Win32Tasks.dll:
$(CSC) $(DEBUG) -target:library -warn:0 -define:$(DEFINE) -out:bootstrap\NAnt.Win32Tasks.dll \
-r:bootstrap\NAnt.Core.dll -r:bootstrap\NAnt.DotNetTasks.dll -r:System.ServiceProcess.dll \
-recurse:src\NAnt.Win32\*.cs \
src\CommonAssemblyInfo.cs