-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile
146 lines (131 loc) · 5.83 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
.PHONY: doc api python-check libcxx-src
# Set personal or machine-local flags in a file named local.mk
ifneq ("$(wildcard local.mk)","")
include local.mk
endif
ROOT_DIR = $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
PACKAGE_NAME = software-evolution-library
PACKAGE_NICKNAME = sel
API_TITLE = "Software Evolution Library Index"
API_NEXT = "ChangeLog"
API_PREV = "Python Library"
DOC_PACKAGES = \
software-evolution-library \
software-evolution-library/command-line-rest \
software-evolution-library/components/clang-tokens \
software-evolution-library/components/configuration \
software-evolution-library/components/file \
software-evolution-library/components/fix-compilation \
software-evolution-library/components/fodder-database \
software-evolution-library/components/formatting \
software-evolution-library/components/in-memory-fodder-database \
software-evolution-library/components/json-fodder-database \
software-evolution-library/components/lexicase \
software-evolution-library/components/multi-objective \
software-evolution-library/components/pliny-fodder-database \
software-evolution-library/components/searchable \
software-evolution-library/components/serapi-io \
software-evolution-library/components/test-suite \
software-evolution-library/rest \
software-evolution-library/rest/async-jobs \
software-evolution-library/rest/define-command-endpoint \
software-evolution-library/rest/sessions \
software-evolution-library/rest/std-api \
software-evolution-library/rest/utility \
software-evolution-library/software/adaptive-mutation \
software-evolution-library/software/ancestral \
software-evolution-library/software/asm \
software-evolution-library/software/asm-heap \
software-evolution-library/software/asm-super-mutant \
software-evolution-library/software/cil \
software-evolution-library/software/clang \
software-evolution-library/software/clang-expression \
software-evolution-library/software/clang-project \
software-evolution-library/software/clang-w-fodder \
software-evolution-library/software/compilable \
software-evolution-library/software/coq \
software-evolution-library/software/coq-project \
software-evolution-library/software/diff \
software-evolution-library/software/expression \
software-evolution-library/software/forth \
software-evolution-library/software/ir \
software-evolution-library/software/lisp \
software-evolution-library/software/llvm \
software-evolution-library/software/parseable \
software-evolution-library/software/parseable-project \
software-evolution-library/software/project \
software-evolution-library/software/sexp \
software-evolution-library/software/simple \
software-evolution-library/software/styleable \
software-evolution-library/software/super-mutant \
software-evolution-library/software/super-mutant-clang \
software-evolution-library/software/super-mutant-project \
software-evolution-library/software/tree-sitter \
software-evolution-library/software/c \
software-evolution-library/software/cpp \
software-evolution-library/software/python \
software-evolution-library/software/javascript \
software-evolution-library/software/json \
software-evolution-library/software/with-exe \
software-evolution-library/utility/debug \
software-evolution-library/utility/git \
software-evolution-library/utility/json \
software-evolution-library/utility/range \
software-evolution-library/utility/task \
software-evolution-library/view
DOC_DEPS = doc/software-evolution-library/GrammaTech-CLA-SEL.pdf
doc/software-evolution-library/GrammaTech-CLA-SEL.pdf: doc/GrammaTech-CLA-SEL.pdf
mkdir -p doc/software-evolution-library/ && cp $< $@
LISP_DEPS = \
$(wildcard *.lisp) \
$(wildcard components/*.lisp) \
$(wildcard software/*.lisp) \
$(wildcard python/lisp/*.lisp)
# FIXME: move test binaries into test/bin or bin/test/
# Extend cl.mk to have a separate build target for test binaries
BINS = rest-server dump-store tree-sitter-interface tree-sitter-py-generator test-parse \
limit
BIN_TEST_DIR = test/bin
BIN_TESTS = \
example-001-mutate
LONG_BIN_TESTS = \
example-002-evaluation \
example-003-neutral \
example-004-evolve
include .cl-make/cl.mk
bin/limit: limit.c
$(CC) $< -o $@
bin/tree-sitter-interface: $(LISP_DEPS) $(MANIFEST)
@rm -f $@
CC=$(CC) $(LISP_HOME) LISP=$(LISP) $(LISP) $(LISP_FLAGS) \
--load $(QUICK_LISP)/setup.lisp \
--eval '(setf uiop/image::*lisp-interaction* nil)' \
--eval '(ql:quickload :$(PACKAGE_NAME)/run-tree-sitter-interface)' \
--eval '(quit)'
@rm -f $@
CC=$(CC) $(LISP_HOME) LISP=$(LISP) $(LISP) $(LISP_FLAGS) \
--load $(QUICK_LISP)/setup.lisp \
--eval '(setf uiop/image::*lisp-interaction* nil)' \
--eval '(asdf:make :$(PACKAGE_NAME)/run-tree-sitter-interface :type :program :monolithic t)' \
--eval '(quit)'
bin/tree-sitter-py-generator: $(LISP_DEPS) $(MANIFEST)
@rm -f $@
CC=$(CC) $(LISP_HOME) LISP=$(LISP) $(LISP) $(LISP_FLAGS) \
--load $(QUICK_LISP)/setup.lisp \
--eval '(setf uiop/image::*lisp-interaction* nil)' \
--eval '(ql:quickload :$(PACKAGE_NAME)/run-tree-sitter-interface)' \
--eval '(quit)'
@rm -f $@
CC=$(CC) $(LISP_HOME) LISP=$(LISP) $(LISP) $(LISP_FLAGS) \
--load $(QUICK_LISP)/setup.lisp \
--eval '(setf uiop/image::*lisp-interaction* nil)' \
--eval '(asdf:make :$(PACKAGE_NAME)/run-tree-sitter-py-generator :type :program :monolithic t)' \
--eval '(quit)'
python/asts/types.py: bin/tree-sitter-py-generator
$< > $@
python-check: bin/tree-sitter-interface python/asts/types.py
PATH=$(ROOT_DIR)/bin:$$PATH pytest python
libcxx-src: | utility/libcxx-src/LICENSE.TXT
utility/libcxx-src/LICENSE.TXT:
mkdir -p utility/libcxx-src
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/libcxx-13.0.0.src.tar.xz -O - | tar Jxf - -C utility/libcxx-src --strip-components=1