forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (41 loc) · 1.23 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
JULIAHOME = $(shell pwd)
include ./Make.inc
default: release
debug release: %: julia-% j/pcre_h.j sys.ji custom.j
julia-debug julia-release:
$(MAKE) -C src $@
ln -f src/$@ julia
sys.ji: ./j/sysimg.j ./j/start_image.j src/boot.j src/dump.c j/*.j
./julia -b sysimg.j
custom.j:
if [ ! -f ./custom.j ]; then touch ./custom.j; fi
PCRE_CONST = 0x[0-9a-fA-F]+|[-+]?\s*[0-9]+
j/pcre_h.j:
cpp -dM $(EXTROOT)/include/pcre.h | perl -nle '/^\s*#define\s+(PCRE\w*)\s*\(?($(PCRE_CONST))\)?\s*$$/ and print "$$1 = $$2"' | sort > $@
test: debug
./julia test/tests.j
test-utf8:
./julia test/test_utf8.j
perf: release
./julia test/perf.j
testall: test test-utf8 perf
SLOCCOUNT = sloccount \
--addlang makefile \
--personcost 100000 \
--effort 3.6 1.2 \
--schedule 2.5 0.32 \
--
J_FILES = $(shell git ls-files | grep '.j$$')
sloccount:
@for x in $(J_FILES); do cp $$x $${x%.j}.hs; done
git ls-files | sed 's/\.j$$/.hs/' | xargs $(SLOCCOUNT) | sed 's/haskell/*julia*/g'
@for x in $(J_FILES); do rm -f $${x%.j}.hs; done
clean:
rm -f julia
rm -f j/pcre_h.j
rm -f *.ji
rm -f *~ *#
$(MAKE) -C src clean
cleanall: clean
$(MAKE) -C src cleanother
.PHONY: default debug release julia-debug julia-release test test-* testall sloccount clean cleanall