Project

General

Profile

Download (3.14 KB) Statistics
| Branch: | Tag: | Revision:
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

    
12
DEFAULT_TEST_TARGET=COMPIL_LUS\|MAKE\|BIN\|DIFF
13

    
14
all: lustrec lustret
15

    
16
lustrec:
17
	@echo Compiling binary lustrec
18
	@make -C src lustrec
19

    
20
lustret:
21
	@echo Compiling binary lustret
22
	@make -C src lustret
23

    
24
@lustresf@
25

    
26
configure: configure.ac
27
	@echo configure.ac has changed relaunching autoconf
28
	@autoconf
29

    
30
Makefile: Makefile.in config.status configure
31
	@echo Makefile.in has changed relaunching autoconf
32
	@./config.status --recheck
33

    
34
doc:
35
	@echo Generating doc
36
	@make -C src doc
37

    
38
dot: doc
39
	@make -C src dot
40

    
41
clean: clean-lusic
42
	@make -C src clean
43

    
44
dist-src-clean: clean
45
	@rm -f config.log config.status include/*.lusic include/lustrec_math.h include/simulink_math_fcn.h include/conv.h include/mpfr_lustre.h
46
	@rm -f Makefile ./src/Makefile ./src/pluginList.ml ./src/version.ml ./src/_tags ./src/ocaml_utils.ml
47

    
48
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
49

    
50
dist-gzip: $(LOCAL_BINDIR)/lustrec dist-src-clean
51
	@rm -f $(shell ls ../*lustrec*src*tar.gz)
52
	@tar zcvf ../$(DIST_ARCHIVE_NAME) -C .. --exclude-vcs --exclude=Makefile  --exclude=$(LOCAL_BINDIR) $(shell basename $(PWD))
53
	@echo "Source distribution built: ../$(DIST_ARCHIVE_NAME)"
54

    
55
dist-clean: dist-src-clean
56
	@rm -f configure Makefile
57

    
58
%.lusic: %.lusi
59
	@echo Compiling $<
60
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -d include $<
61

    
62
clean-lusic:
63
	@rm -f $(LUSI_LIBS:%.lusi=%.lusic)
64
	@rm -f $(LUSI_MPFR_LIB:%.lusi=%.lusic)
65

    
66
compile-lusi: $(LUSI_LIBS:%.lusi=%.lusic)
67

    
68
compile-mpfr-lusi: $(LUSI_MPFR_LIB)
69
	@echo Compiling $<
70
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -mpfr 1 -d include $<
71

    
72
install-include: compile-lusi compile-mpfr-lusi
73
	install -m 0655 include/* ${includedir}/lustrec
74

    
75
install-base: clean-lusic
76
	mkdir -p ${bindir}
77
	install -m 0755 $(LOCAL_BINDIR)/* ${bindir}
78
	mkdir -p ${datarootdir}
79
	install -m 0655 share/FindLustre.cmake ${datarootdir}
80
	mkdir -p ${includedir}/lustrec
81
	install -m 0655 include/* ${includedir}/lustrec
82

    
83
install: install-base install-include
84

    
85
test-config: ${bindir}/lustrec
86
	if @PATH_TO_TESTS_DEFINED@; then \
87
	  mkdir -p test; \
88
	  cd test; \
89
	  cmake -DLUSTRE_PATH_HINT=${bindir} -DSUBPROJ=@GITBRANCH@ ../@PATH_TO_TESTS@; \
90
	fi
91

    
92
test-no-submit: test-config
93
	cd test; ctest -M Experimental -T Start -T Update -T Configure -T Build -T Test -R ${DEFAULT_TEST_TARGET}
94

    
95
test-submit: test-config
96
	cd test; ctest -M Experimental -T Submit -R ${DEFAULT_TEST_TARGET}
97

    
98
test: test-config
99
	cd test; ctest -D Experimental -R ${DEFAULT_TEST_TARGET}
100

    
101
test-full-no-submit: test-config
102
	cd test; ctest -M Experimental -T Start -T Update -T Configure -T Build -T Test
103

    
104
test-full-submit: test-config
105
	cd test; ctest -M Experimental -T Submit
106

    
107
test-full: test-config
108
	cd test; ctest -D Experimental
109

    
110
tests:
111
	@echo Launching tests
112
	@make -C src tests
113

    
114
.PHONY: all compile-lusi doc dot lustrec lustrec.odocl clean install dist-clean tests
(7-7/13)