Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / Makefile.in @ dbe19cd9

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  
12
#lustret lustrev lustresf_target
13

    
14
DEFAULT_TEST_TARGET=COMPIL_LUS\|MAKE\|BIN\|DIFF
15
DEFAULT_EXCLUDE_TEST=LUSTRET
16

    
17
all: $(BIN_TARGETS)
18

    
19
lustrec:
20
	@echo Compiling binary lustrec
21
	@make -C src lustrec
22

    
23
lustret:
24
	@echo Compiling binary lustret
25
	@make -C src lustret
26

    
27
lustrev:
28
	@echo Compiling binary lustrev
29
	@make -C src lustrev
30

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

    
35
@lustresf@
36

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
94
install: install-base install-include
95

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

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

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

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

    
114

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

    
118

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

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

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

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

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