Project

General

Profile

« Previous | Next » 

Revision 9c4cc944

Added by Corentin Lauverjat over 1 year ago

Transition to dune build system
Improvement of opam integration
Dockerfile based on Alpine
Dockerfile based on Ubuntu
Update the README.md

View differences:

Makefile.in
1
# @configure_input@
2

  
1 3
prefix=@prefix@
2 4
exec_prefix=@exec_prefix@
3 5
bindir=@bindir@
4 6
datarootdir = ${prefix}/share
5 7
includedir = ${prefix}/include
6 8

  
9
configure: configure.ac
10
	@echo configure.ac has changed relaunching autoconf
11
	@autoconf
12

  
13
Makefile: Makefile.in config.status configure
14
	@echo Makefile.in has changed relaunching autoconf
15
	@./config.status --recheck
16

  
17
default: build
18

  
19
build: Makefile
20
	dune build
21

  
22
test: test-config
23
	cd test; ctest -D Experimental -R ${DEFAULT_TEST_TARGET} -E ${DEFAULT_EXCLUDE_TEST}
24

  
25
test-config: ${bindir}/lustrec ${bindir}/lustrev ${bindir}/lustret
26
	mkdir -p test; \
27
	cd test; \
28
	cmake -DLUSTRE_PATH_HINT=${bindir} -DSUBPROJ=@CDASHSUBPROJ@ ../@PATH_TO_TESTS@; \
29
	
30
install: Makefile
31
	dune install
32

  
33
uninstall: Makefile
34
	dune uninstall
35

  
36
clean:
37
	dune clean
38
	# Optionally, remove all files/folders ignored by git as defined
39
	# in .gitignore (-X).
40
	# git clean -dfXq
41

  
42

  
43

  
7 44
LUSI_LIBS=include/lustrec_math.lusi include/simulink_math_fcn.lusi include/conv.lusi
8 45
LUSI_MPFR_LIB=include/mpfr_lustre.lusi
9 46
LOCAL_BINDIR=bin
......
13 50
DEFAULT_TEST_TARGET=COMPIL_LUS\|MAKE\|BIN\|DIFF
14 51
DEFAULT_EXCLUDE_TEST=LUSTRET
15 52

  
16
all: $(BIN_TARGETS)
17

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

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

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

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

  
34
@lustresf@
35

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

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

  
44 55
doc:
45 56
	@echo Generating doc
......
48 59
dot: doc
49 60
	@make -C src dot
50 61

  
51
clean: clean-lusic
52
	@make -C src clean
53 62

  
54 63
dist-src-clean: clean
55 64
	@rm -f config.log config.status include/*.lusic include/lustrec_math.h include/simulink_math_fcn.h include/conv.h include/mpfr_lustre.h
......
65 74
dist-clean: dist-src-clean
66 75
	@rm -f configure Makefile opam share/FindLustre.cmake
67 76

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

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

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

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

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

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

  
93
install: install-base install-include
94

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

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

  
107 79
test-no-submit: test-config
108 80
	cd test; ctest -M Experimental -T Start -T Update -T Configure -T Build -T Test -R ${DEFAULT_TEST_TARGET} -E ${DEFAULT_EXCLUDE_TEST}
......
111 83
	cd test; ctest -M Experimental -T Submit -R ${DEFAULT_TEST_TARGET} -E ${DEFAULT_EXCLUDE_TEST}
112 84

  
113 85

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

  
117 87

  
118 88
test-full-no-submit: test-config

Also available in: Unified diff