-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.thoni
99 lines (86 loc) · 3.17 KB
/
Makefile.thoni
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#######################################################################
include mk/include_guard.mk
#
# This Makefile is included from Makefile.common if running on ThoNi's
# machines, which are Windows machines. This primarily handles the release
# process.
#
CHANGES_HEADER = `head -1 CHANGES`
.PHONY: release
release:
# Do some checking before building the release...
@if ! printf -- '%s' "$(CHANGES_HEADER)" | egrep -q -- "$(VERSION)" ; then \
echo "CHANGES is not updated for $(VERSION)" ; \
exit 1 ; \
else if ! git --no-pager diff --exit-code --quiet ; then \
echo "Commit changes before making a release" ; \
exit 1 ; \
else if ! git --no-pager diff --exit-code --quiet --cached ; then \
echo "Commit cached changes before making a release" ; \
exit 1 ; \
else if ! [[ -z `git rev-list @{upstream}.. -n 1` ]] ; then \
echo "Push all local changes before making a release" ; \
exit 1 ; \
fi fi fi fi
# Enable WinAlan & WinArun if not enabled already
ifeq ($(WINALAN_ENABLED),)
@echo Enable WinAlan
cp compiler/Makefile.local.template compiler/Makefile.local
echo "WINALAN_ENABLED=true" >> compiler/Makefile.local
else
@echo WinAlan already enabled! Good!
endif
ifeq ($(WINALAN_ENABLED),)
@echo Enable WinArun
cp interpreter/Makefile.local.template interpreter/Makefile.local
echo "WINARUN_ENABLED=true" >> interpreter/Makefile.local
else
@echo WinArun already enabled! Good!
endif
$(MAKE) releasebuild
$(MAKE) test
# We won't make documentation since that is in the Alan Documentation project now
#$(MAKE) documentation
$(MAKE) zip setup
$(MAKE) tags
$(MAKE) release-upload
.PHONY: snapshot-upload
snapshot-upload: buildnumbers
bin/alanupload alan$(VERSION)$(BUILDVERSION).$(PLATFORM).zip snapshots/$(BUILDNAME)
bin/alanupload alan$(VERSION)$(BUILDVERSION).$(PLATFORM).setup.exe snapshots/$(BUILDNAME)
bin/alanupload winarun$(VERSION)$(BUILDVERSION).$(PLATFORM).setup.exe snapshots/$(BUILDNAME)
#ssh alanif.se ls -td /www/downloads/snapshots/Build* | tail -1 | xargs ssh alanif.se rm -r
# Use lftp scripting instead? - lftp sftp:alanif.se
.PHONY: release-upload
release-upload:
bin/alanupload alan$(VERSION).$(PLATFORM).zip sdks/windows
bin/alanupload alan$(VERSION).$(PLATFORM).setup.exe sdks/windows
bin/alanupload winarun$(VERSION).$(PLATFORM).setup.exe interpreters/windows
bin/alanupload interpreter/gargoyle-updater-alan$(VERSION).$(PLATFORM).setup.exe interpreters/windows
bin/alanupload interpreter/gargoyle-updater-alan$(VERSION).$(PLATFORM).zip interpreters/windows
.PHONY: releasebuild
releasebuild:
touch alan.version.h */alan.version.c
$(MAKE) -C compiler release
$(MAKE) -C interpreter release
$(MAKE) -C converter release
.PHONY: tags
tags: last-release
git tag -f v$(VERSION)
git branch -f v$(VERSION)_$(OS)
@echo "If you are satisfied, do a 'venum alan correction' (at least), and commit"
.PHONY: last-release
last-release:
echo -n $(VERSION) > LASTRELEASE
.PHONY: newVersion
newVersion:
venum alan
cvs commit -m 'New Version' alan.version
#################################################################################
.PHONY: package
package: zip setup
# From Makefile.win32
# Gargoyle Arun
.PHONY: gararun
gararun:
$(MAKE) -C interpreter gararun