Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / Makefile.in @ 5fccce23

History | View | Annotate | Download (3.63 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 lustrev @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
lustrev:
27
	@echo Compiling binary lustrev
28
	@make -C src lustrev
29

    
30
lustrei:
31
	@echo Compiling binary lustrei
32
	@make -C src lustrei
33

    
34
@lustresf@
35

    
36
configure: configure.ac
37
	@echo configure.ac has changed relaunching autoconf
38
	@autoconf
39

    
40
Makefile: Makefile.in config.status configure
41
	@echo Makefile.in has changed relaunching autoconf
42
	@./config.status --recheck
43

    
44
doc:
45
	@echo Generating doc
46
	@make -C src doc
47

    
48
dot: doc
49
	@make -C src dot
50

    
51
clean: clean-lusic
52
	@make -C src clean
53

    
54
dist-src-clean: clean
55
	@rm -f config.log config.status include/*.lusic include/lustrec_math.h include/simulink_math_fcn.h include/conv.h include/mpfr_lustre.h
56
	@rm -f Makefile ./src/Makefile ./src/pluginList.ml ./src/version.ml ./src/_tags ./src/ocaml_utils.ml
57

    
58
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
59

    
60
dist-gzip: $(LOCAL_BINDIR)/lustrec dist-src-clean
61
	@rm -f $(shell ls ../*lustrec*src*tar.gz)
62
	@tar zcvf ../$(DIST_ARCHIVE_NAME) -C .. --exclude-vcs --exclude=Makefile  --exclude=$(LOCAL_BINDIR) $(shell basename $(PWD))
63
	@echo "Source distribution built: ../$(DIST_ARCHIVE_NAME)"
64

    
65
dist-clean: dist-src-clean
66
	@rm -f configure Makefile opam share/FindLustre.cmake
67

    
68
%.lusic: %.lusi
69
	@echo Compiling $<
70
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -I include -d include $<
71

    
72
clean-lusic:
73
	@rm -f $(LUSI_LIBS:%.lusi=%.lusic)
74
	@rm -f $(LUSI_MPFR_LIB:%.lusi=%.lusic)
75

    
76
compile-lusi: $(LUSI_LIBS:%.lusi=%.lusic)
77

    
78
compile-mpfr-lusi: $(LUSI_MPFR_LIB)
79
	@echo Compiling $<
80
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -mpfr 1 -d include $<
81

    
82
install-include: compile-lusi compile-mpfr-lusi
83
	install -m 0655 include/* ${includedir}/lustrec
84

    
85
install-base: clean-lusic
86
	mkdir -p ${bindir}
87
	for x in $(BIN_TARGETS); do install -m 0755 $(LOCAL_BINDIR)/$$x ${bindir}; done
88
	mkdir -p ${datarootdir}
89
	install -m 0655 share/*.cmake ${datarootdir}
90
	mkdir -p ${includedir}/lustrec
91
	install -m 0655 include/* ${includedir}/lustrec
92

    
93
install: install-base install-include
94

    
95
uninstall:
96
	rm -Rf ${includedir}/lustrec
97
	rm -Rf ${datarootdir}/share/FindLustre.cmake
98
	for x in $(BIN_TARGETS); do rm -f ${bindir}/$$x; done
99

    
100
test-config: ${bindir}/lustrec
101
	if @PATH_TO_TESTS_DEFINED@; then \
102
	  mkdir -p test; \
103
	  cd test; \
104
	  cmake -DLUSTRE_PATH_HINT=${bindir} -DSUBPROJ=@CDASHSUBPROJ@ ../@PATH_TO_TESTS@; \
105
	fi
106

    
107
test-no-submit: test-config
108
	cd test; ctest -M Experimental -T Start -T Update -T Configure -T Build -T Test -R ${DEFAULT_TEST_TARGET} -E ${DEFAULT_EXCLUDE_TEST}
109

    
110
test-submit: test-config
111
	cd test; ctest -M Experimental -T Submit -R ${DEFAULT_TEST_TARGET} -E ${DEFAULT_EXCLUDE_TEST}
112

    
113

    
114
test: test-config
115
	cd test; ctest -D Experimental -R ${DEFAULT_TEST_TARGET} -E ${DEFAULT_EXCLUDE_TEST}
116

    
117

    
118
test-full-no-submit: test-config
119
	cd test; ctest -M Experimental -T Start -T Update -T Configure -T Build -T Test
120

    
121
test-full-submit: test-config
122
	cd test; ctest -M Experimental -T Submit
123

    
124
test-full: test-config
125
	cd test; ctest -D Experimental
126

    
127
tests:
128
	@echo Launching tests
129
	@make -C src tests
130

    
131
.PHONY: all compile-lusi doc dot lustrec lustrec.odocl clean install dist-clean tests