-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (28 loc) · 976 Bytes
/
Makefile
File metadata and controls
40 lines (28 loc) · 976 Bytes
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
include Makefile.project
-include .config
EXECUTABLES=$(GENERATED_EXECUTABLES) $(SCRIPTS)
all: build metrics
build: fix-whitespace $(GENERATED_SOURCES)
gnatmake -p -P $(PROJECT)
test: build metrics
@./tests/build
@./tests/run
install: build test
install -t ${HOME}/bin/ $(EXECUTABLES)
clean:
gnatclean -P $(PROJECT) || true
find . -type f \( -name "*~" -o -name "*.o" -o -name "*.ali" \) -print0 | xargs -0 -r /bin/rm
if [ ! -z "$(GENERATED_SOURCES)" ]; then rm -rf $(GENERATED_SOURCES); fi
rmdir bin || true
rmdir obj || true
distclean: clean
rm -f $(GENERATED_EXECUTABLES)
rm -f obj/*.ad[sb].metrix
rmdir bin || true
rmdir obj || true
fix-whitespace:
@find src tests -name '*.ad?' | xargs --no-run-if-empty egrep -l ' | $$' | grep -v '^b[~]' | xargs --no-run-if-empty perl -i -lpe 's| | |g; s| +$$||g'
metrics:
@gnat metric -P $(PROJECT)
-include Makefile.project_rules
.PHONY: all build test install clean distclean fix-whitespace metrics