Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / Makefile.in @ 3769b712

History | View | Annotate | Download (3.31 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
configure: configure.ac
17
	@echo configure.ac has changed relaunching autoconf
18
	@autoconf
19

    
20
Makefile: Makefile.in config.status configure
21
	@echo Makefile.in has changed relaunching autoconf
22
	@./config.status --recheck
23

    
24
doc:
25
	@echo Generating doc
26
	@make -C src doc
27

    
28
dot: doc
29
	@make -C src dot
30

    
31

    
32
dist-src-clean: clean
33
	@rm -f config.log config.status include/*.lusic include/lustrec_math.h include/simulink_math_fcn.h include/conv.h include/mpfr_lustre.h
34
	@rm -f Makefile ./src/Makefile ./src/pluginList.ml ./src/version.ml ./src/_tags ./src/ocaml_utils.ml
35

    
36
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
37

    
38
dist-gzip: $(LOCAL_BINDIR)/lustrec dist-src-clean
39
	@rm -f $(shell ls ../*lustrec*src*tar.gz)
40
	@tar zcvf ../$(DIST_ARCHIVE_NAME) -C .. --exclude-vcs --exclude=Makefile  --exclude=$(LOCAL_BINDIR) $(shell basename $(PWD))
41
	@echo "Source distribution built: ../$(DIST_ARCHIVE_NAME)"
42

    
43
dist-clean: dist-src-clean
44
	@rm -f configure Makefile opam share/FindLustre.cmake
45

    
46
%.lusic: %.lusi
47
	@echo Compiling $<
48
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -I include -d include $<
49

    
50
clean-lusic:
51
	@rm -f $(LUSI_LIBS:%.lusi=%.lusic)
52
	@rm -f $(LUSI_MPFR_LIB:%.lusi=%.lusic)
53

    
54
compile-lusi: $(LUSI_LIBS:%.lusi=%.lusic)
55

    
56
compile-mpfr-lusi: $(LUSI_MPFR_LIB)
57
	@echo Compiling $<
58
	@$(LOCAL_BINDIR)/lustrec -verbose 0 -mpfr 1 -d include $<
59

    
60
install-include: compile-lusi compile-mpfr-lusi
61
	install -m 0655 include/* ${includedir}/lustrec
62

    
63
install-base: clean-lusic
64
	mkdir -p ${bindir}
65
	for x in $(BIN_TARGETS); do install -m 0755 $(LOCAL_BINDIR)/$$x ${bindir}; done
66
	mkdir -p ${datarootdir}
67
	install -m 0655 share/*.cmake ${datarootdir}
68
	mkdir -p ${includedir}/lustrec
69
	install -m 0655 include/* ${includedir}/lustrec
70

    
71
install: install-base install-include
72

    
73
uninstall:
74
	rm -Rf ${includedir}/lustrec
75
	rm -Rf ${datarootdir}/share/FindLustre.cmake
76
	for x in $(BIN_TARGETS); do rm -f ${bindir}/$$x; done
77

    
78
test-config: ${bindir}/lustrec
79
	if @PATH_TO_TESTS_DEFINED@; then \
80
	  mkdir -p test; \
81
	  cd test; \
82
	  cmake -DLUSTRE_PATH_HINT=${bindir} -DSUBPROJ=@CDASHSUBPROJ@ ../@PATH_TO_TESTS@; \
83
	fi
84

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

    
88
test-submit: test-config
89
	cd test; ctest -M Experimental -T Submit -R ${DEFAULT_TEST_TARGET} -E ${DEFAULT_EXCLUDE_TEST}
90

    
91

    
92
test: test-config
93
	cd test; ctest -D Experimental -R ${DEFAULT_TEST_TARGET} -E ${DEFAULT_EXCLUDE_TEST}
94

    
95

    
96
test-full-no-submit: test-config
97
	cd test; ctest -M Experimental -T Start -T Update -T Configure -T Build -T Test
98

    
99
test-full-submit: test-config
100
	cd test; ctest -M Experimental -T Submit
101

    
102
test-full: test-config
103
	cd test; ctest -D Experimental
104

    
105
tests:
106
	@echo Launching tests
107
	@make -C src tests
108

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