forked from zeromq/clrzmq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (32 loc) · 1.2 KB
/
Makefile
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
PROJ = src/build.proj
FLAGS = /property:OperatingPlatform=Unix /property:NetFramework=Mono
XBUILD = xbuild /tv:4.0
VERSION =
BUILD =
REVISION =
MATURITY =
VERSTR = $(VERSION).$(BUILD).$(REVISION)
VERSIONINFO = src/Shared/VersionInfo.cs
PACK = tar -czf clrzmq-mono-$(VERSTR).tar.gz
PACKFILES = build/clrzmq.* README.md AUTHORS LICENSE
.PHONY=all release package clean
all:
$(XBUILD) $(FLAGS) $(PROJ)
release:
ifdef VERSION
mv $(VERSIONINFO) $(VERSIONINFO).bak
echo using System.Reflection; > $(VERSIONINFO)
echo. >> $(VERSIONINFO)
echo [assembly: AssemblyVersion("$(VERSION).0.0")] >> $(VERSIONINFO)
echo [assembly: AssemblyFileVersion("$(VERSTR)")] >> $(VERSIONINFO)
echo [assembly: AssemblyInformationalVersion("$(VERSTR) $(MATURITY)")] >> $(VERSIONINFO)
echo [assembly: AssemblyConfiguration("$(MATURITY)")] >> $(VERSIONINFO)
$(XBUILD) /target:Package $(FLAGS) /Property:Configuration=Release /Property:SignAssembly=true $(PROJ)
mv $(VERSIONINFO).bak $(VERSIONINFO)
else
$(error Invalid VERSION==$(VERSION) - specify package version. E.g., `make VERSION=3.0 BUILD=12345 REVISION=1 MATURITY=Beta')
endif
package: release
$(PACK) $(PACKFILES)
clean:
$(XBUILD) /target:Clean $(FLAGS) $(PROJ)