Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / Makefile.in @ 30f46c0c

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

    
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
configure: configure.ac
25
	@echo configure.ac has changed relaunching autoconf
26
	@autoconf
27

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

    
32
doc:
33
	@echo Generating doc
34
	@make -C src doc
35

    
36
dot: doc
37
	@make -C src dot
38

    
39
clean: clean-lusic
40
	@make -C src clean
41

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

    
46
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
47

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

    
53
dist-clean: dist-src-clean
54
	@rm -f configure Makefile
55

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

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

    
64
compile-lusi: $(LUSI_LIBS:%.lusi=%.lusic)
65

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

    
70
install-include: compile-lusi compile-mpfr-lusi
71
	mkdir -p ${includedir}/lustrec
72
	cp include/* ${includedir}/lustrec
73

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

    
80
install: install-base install-include 
81

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

    
89
test-no-submit: test-config
90
	cd test; ctest -M Experimental -T Start -T Update -T Configure -T Build -T Test -R ${DEFAULT_TEST_TARGET}
91

    
92
test-submit: test-config
93
	cd test; ctest -M Experimental -T Submit -R ${DEFAULT_TEST_TARGET}
94

    
95
test: test-config
96
	cd test; ctest -D Experimental -R ${DEFAULT_TEST_TARGET}
97

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

    
101
test-full-submit: test-config
102
	cd test; ctest -M Experimental -T Submit 
103

    
104
test-full: test-config
105
	cd test; ctest -D Experimental 
106

    
107

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