lustrec / Makefile.in @ 090baab6
History | View | Annotate | Download (3.52 KB)
1 |
prefix=@prefix@ |
---|---|
2 |
exec_prefix=@exec_prefix@ |
3 |
bindir=@bindir@ |
4 |
datarootdir = ${prefix}/share |
5 |
includedir = ${prefix}/include |
6 |
|
7 |
LUSI_LIBS=include/lustrec_math.lusi include/simulink_math_fcn.lusi include/conv.lusi |
8 |
LUSI_MPFR_LIB=include/mpfr_lustre.lusi |
9 |
LOCAL_BINDIR=bin |
10 |
LOCAL_DOCDIR=doc/manual |
11 |
BIN_TARGETS = lustrec lustret @lustresf_target@ |
12 |
|
13 |
DEFAULT_TEST_TARGET=COMPIL_LUS\|MAKE\|BIN\|DIFF |
14 |
DEFAULT_EXCLUDE_TEST=LUSTRET |
15 |
|
16 |
all: $(BIN_TARGETS) |
17 |
|
18 |
lustrec: |
19 |
@echo Compiling binary lustrec |
20 |
@make -C src lustrec |
21 |
|
22 |
lustret: |
23 |
@echo Compiling binary lustret |
24 |
@make -C src lustret |
25 |
|
26 |
lustrei: |
27 |
@echo Compiling binary lustrei |
28 |
@make -C src lustrei |
29 |
|
30 |
@lustresf@ |
31 |
|
32 |
configure: configure.ac |
33 |
@echo configure.ac has changed relaunching autoconf |
34 |
@autoconf |
35 |
|
36 |
Makefile: Makefile.in config.status configure |
37 |
@echo Makefile.in has changed relaunching autoconf |
38 |
@./config.status --recheck |
39 |
|
40 |
doc: |
41 |
@echo Generating doc |
42 |
@make -C src doc |
43 |
|
44 |
dot: doc |
45 |
@make -C src dot |
46 |
|
47 |
clean: clean-lusic |
48 |
@make -C src clean |
49 |
|
50 |
dist-src-clean: clean |
51 |
@rm -f config.log config.status include/*.lusic include/lustrec_math.h include/simulink_math_fcn.h include/conv.h include/mpfr_lustre.h |
52 |
@rm -f Makefile ./src/Makefile ./src/pluginList.ml ./src/version.ml ./src/_tags ./src/ocaml_utils.ml |
53 |
|
54 |
DIST_ARCHIVE_NAME=lustrec-$(shell $(LOCAL_BINDIR)/lustrec -version | grep version | cut -d, -f 2 | sed -e "s/ version //" -e "s/ (/-/" -e "s/ /-/" -e "s/\//-/" -e "s/)//")-src.tar.gz |
55 |
|
56 |
dist-gzip: $(LOCAL_BINDIR)/lustrec dist-src-clean |
57 |
@rm -f $(shell ls ../*lustrec*src*tar.gz) |
58 |
@tar zcvf ../$(DIST_ARCHIVE_NAME) -C .. --exclude-vcs --exclude=Makefile --exclude=$(LOCAL_BINDIR) $(shell basename $(PWD)) |
59 |
@echo "Source distribution built: ../$(DIST_ARCHIVE_NAME)" |
60 |
|
61 |
dist-clean: dist-src-clean |
62 |
@rm -f configure Makefile |
63 |
|
64 |
%.lusic: %.lusi |
65 |
@echo Compiling $< |
66 |
@$(LOCAL_BINDIR)/lustrec -verbose 0 -I include -d include $< |
67 |
|
68 |
clean-lusic: |
69 |
@rm -f $(LUSI_LIBS:%.lusi=%.lusic) |
70 |
@rm -f $(LUSI_MPFR_LIB:%.lusi=%.lusic) |
71 |
|
72 |
compile-lusi: $(LUSI_LIBS:%.lusi=%.lusic) |
73 |
|
74 |
compile-mpfr-lusi: $(LUSI_MPFR_LIB) |
75 |
@echo Compiling $< |
76 |
@$(LOCAL_BINDIR)/lustrec -verbose 0 -mpfr 1 -d include $< |
77 |
|
78 |
install-include: compile-lusi compile-mpfr-lusi |
79 |
install -m 0655 include/* ${includedir}/lustrec |
80 |
|
81 |
install-base: clean-lusic |
82 |
mkdir -p ${bindir} |
83 |
for x in $(BIN_TARGETS); do install -m 0755 $(LOCAL_BINDIR)/$$x ${bindir}; done |
84 |
mkdir -p ${datarootdir} |
85 |
install -m 0655 share/* ${datarootdir} |
86 |
mkdir -p ${includedir}/lustrec |
87 |
install -m 0655 include/* ${includedir}/lustrec |
88 |
|
89 |
install: install-base install-include |
90 |
|
91 |
uninstall: |
92 |
rm -Rf ${includedir}/lustrec |
93 |
rm -Rf ${datarootdir}/share/FindLustre.cmake |
94 |
for x in $(BIN_TARGETS); do rm -f ${bindir}/$$x; done |
95 |
|
96 |
test-config: ${bindir}/lustrec |
97 |
if @PATH_TO_TESTS_DEFINED@; then \ |
98 |
mkdir -p test; \ |
99 |
cd test; \ |
100 |
cmake -DLUSTRE_PATH_HINT=${bindir} -DSUBPROJ=@GITBRANCH@ ../@PATH_TO_TESTS@; \ |
101 |
fi |
102 |
|
103 |
test-no-submit: test-config |
104 |
cd test; ctest -M Experimental -T Start -T Update -T Configure -T Build -T Test -R ${DEFAULT_TEST_TARGET} -E ${DEFAULT_EXCLUDE_TEST} |
105 |
|
106 |
test-submit: test-config |
107 |
cd test; ctest -M Experimental -T Submit -R ${DEFAULT_TEST_TARGET} -E ${DEFAULT_EXCLUDE_TEST} |
108 |
|
109 |
|
110 |
test: test-config |
111 |
cd test; ctest -D Experimental -R ${DEFAULT_TEST_TARGET} -E ${DEFAULT_EXCLUDE_TEST} |
112 |
|
113 |
|
114 |
test-full-no-submit: test-config |
115 |
cd test; ctest -M Experimental -T Start -T Update -T Configure -T Build -T Test |
116 |
|
117 |
test-full-submit: test-config |
118 |
cd test; ctest -M Experimental -T Submit |
119 |
|
120 |
test-full: test-config |
121 |
cd test; ctest -D Experimental |
122 |
|
123 |
tests: |
124 |
@echo Launching tests |
125 |
@make -C src tests |
126 |
|
127 |
.PHONY: all compile-lusi doc dot lustrec lustrec.odocl clean install dist-clean tests |