-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.Darwin
73 lines (56 loc) · 2.13 KB
/
Makefile.Darwin
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
#
# Partial Makefile to be included from top level Makefile on Darwin
#
# Possible cross-compilation to Windows
include Makefile.win32
PLATFORM = macos
VERSION := $(shell cat NEXTRELEASE)
PACKAGE = $(PACKAGENAME).tgz
# There is no libxml-xpath-perl on Darwin so we need to use XML::XPath
# which does not allow switches (-q -e)
XPATH = xpath
######################################################################
# Packages
#
.PHONY: package
package: alan.readme.macosx $(PACKAGE)
$(PACKAGE): bin/alan bin/arun
mkdir -p $(PACKAGENAME)/bin
cp alan.readme.macosx alan.readme COPYING CHANGES $(PACKAGENAME)
cp bin/alan bin/arun $(PACKAGENAME)/bin
mkdir -p $(PACKAGENAME)/games
cp regression/saviour.alan regression/logo.png $(PACKAGENAME)/games
cp games/adventv3/adventV3.alan $(PACKAGENAME)/games
tar zcvf $(PACKAGE) $(PACKAGENAME)
-rm -r $(PACKAGENAME)
######################################################################
#
# Distribution
#
# TODO: Refactor out this to Makefile.common using EXTRA_PACKAGES
# strategy rewamped into EXTRA_TESTS?
#
distribution: VERSION := $(shell cat LASTRELEASE)
distribution: distribution-check distribution-build distribution-upload
distribution-check:
@if [[ -f BUILDNUMBER ]] ; then \
echo Should not upload a distribution with BUILDNUMBER, remove it first ; \
exit 1 ; \
fi
distribution-build:
$(MAKE) clean all package
$(MAKE) -C interpreter gararun MacArun
distribution-upload:
bin/alanupload $(PACKAGE) sdks/macosx
bin/alanupload interpreter/gargoyle-updater-alan3-$(VERSION)$(BUILDVERSION).$(PLATFORM).pkg interpreters/macosx
bin/alanupload interpreter/MacArun$(VERSION)$(BUILDVERSION).zip interpreters/macosx
######################################################################
# Snapshot
#
snapshot-build:
$(MAKE) BUILDNUMBER=$(BUILDNUMBER) clean all package
$(MAKE) -C interpreter BUILDNUMBER=$(BUILDNUMBER) gararun MacArun
snapshot-upload:
bin/alanupload $(PACKAGE) snapshots/$(BUILDNAME)
bin/alanupload interpreter/gargoyle-updater-alan3-$(VERSION)$(BUILDVERSION).$(PLATFORM).pkg snapshots/$(BUILDNAME)
bin/alanupload interpreter/MacArun$(VERSION)$(BUILDVERSION).zip snapshots/$(BUILDNAME)