Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / Makefile.in @ 76bed200

History | View | Annotate | Download (3.33 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
12

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

    
15
all: lustrec lustret
16

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

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

    
25
@lustresf@
26

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
76
install-base: clean-lusic
77
	mkdir -p ${bindir}
78
	for x in $(BIN_TARGETS); do install -m 0755 $(LOCAL_BINDIR)/$$x ${bindir}; done
79
	mkdir -p ${datarootdir}
80
	install -m 0655 share/* ${datarootdir}
81
	mkdir -p ${includedir}/lustrec
82
	install -m 0655 include/* ${includedir}/lustrec
83

    
84
install: install-base install-include
85

    
86
uninstall:
87
	rm -Rf ${includedir}/lustrec
88
	rm -Rf ${datarootdir}/share/FindLustre.cmake
89
	for x in $(BIN_TARGETS); do rm -f ${bindir}/$$x; done
90

    
91
test-config: ${bindir}/lustrec
92
	if @PATH_TO_TESTS_DEFINED@; then \
93
	  mkdir -p test; \
94
	  cd test; \
95
	  cmake -DLUSTRE_PATH_HINT=${bindir} -DSUBPROJ=@GITBRANCH@ ../@PATH_TO_TESTS@; \
96
	fi
97

    
98
test-no-submit: test-config
99
	cd test; ctest -M Experimental -T Start -T Update -T Configure -T Build -T Test -R ${DEFAULT_TEST_TARGET}
100

    
101
test-submit: test-config
102
	cd test; ctest -M Experimental -T Submit -R ${DEFAULT_TEST_TARGET}
103

    
104
test: test-config
105
	cd test; ctest -D Experimental -R ${DEFAULT_TEST_TARGET}
106

    
107
test-full-no-submit: test-config
108
	cd test; ctest -M Experimental -T Start -T Update -T Configure -T Build -T Test
109

    
110
test-full-submit: test-config
111
	cd test; ctest -M Experimental -T Submit
112

    
113
test-full: test-config
114
	cd test; ctest -D Experimental
115

    
116
tests:
117
	@echo Launching tests
118
	@make -C src tests
119

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