This repository has been archived by the owner on May 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
67 lines (49 loc) · 1.66 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
UNAME := $(shell uname)
RUBY_PLATFORM := $(shell ruby -e "puts RUBY_PLATFORM")
BISON_VERSION := $(shell bison --version | grep ^bison | sed 's/^.* //')
# Keep in sync with c/Makefile
REQUIRED_BISON_VERSION = 2.7
PATH := $(shell pwd)/bison-$(REQUIRED_BISON_VERSION)/tests:$(PATH)
all: c javascript ruby winruby jruby
c: bison
cd c && make
java: bison
cd java && mvn package
javascript:
cd javascript && make
ruby: bison
cd ruby && rake
clangruby: bison
cd ruby && CC=clang rake clean compile
gccruby: bison
cd ruby && CC=gcc rake clean compile
jruby: bison
cd ruby && jruby -S rake
winruby: mingw bison
cd ruby && rake cross compile
clean:
cd c && make clean
cd java && mvn clean
cd javascript && make clean
cd ruby && rake clean
clobber: clean
rm -Rf mingw
ifeq ($(UNAME), Darwin)
mingw: mingw/bin/i686-w64-mingw32-gcc
mingw/bin/i686-w64-mingw32-gcc:
mkdir -p mingw
# Don't attempt any of the newer versions - they don't work (gcc 4.7.0)
cd mingw && curl --silent --location http://downloads.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Automated%20Builds/mingw-w32-1.0-bin_i686-darwin_20110819.tar.bz2 | tar xvj
endif
ifneq ($(BISON_VERSION), $(REQUIRED_BISON_VERSION))
bison: bison-$(REQUIRED_BISON_VERSION)/src/bison
bison-$(REQUIRED_BISON_VERSION)/src/bison:
curl --silent --location http://ftp.gnu.org/gnu/bison/bison-$(REQUIRED_BISON_VERSION).tar.gz | tar xvz
cd bison-$(REQUIRED_BISON_VERSION) && ./configure && make
endif
ifeq ($(RUBY_PLATFORM), java)
travis: ruby
else
travis: c javascript clangruby gccruby winruby
endif
.PHONY: all c java javascript ruby clangruby gccruby jruby winruby mingw travis bison clean