Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / Makefile.in @ 1bff14ac

History | View | Annotate | Download (2.83 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/math.lusi include/conv.lusi
8
LUSI_MPFR_LIB=include/mpfr_lustre.lusi
9
LOCAL_BINDIR=bin
10
LOCAL_DOCDIR=doc/manual
11

    
12
all: lustrec lustret
13

    
14
lustrec:
15
	@echo Compiling binary lustrec
16
	@make -C src lustrec
17

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

    
22
configure: configure.ac
23
	@echo configure.ac has changed relaunching autoconf
24
	@autoconf
25

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

    
30
doc:
31
	@echo Generating doc
32
	@make -C src doc
33

    
34
dot: doc
35
	@make -C src dot
36

    
37
clean: clean-lusic
38
	@make -C src clean
39

    
40
dist-src-clean: clean
41
	@rm -f config.log config.status include/*.lusic include/math.h include/conv.h include/mpfr_lustre.h
42
	@rm -f Makefile ./src/Makefile ./src/pluginList.ml ./src/version.ml ./src/_tags
43

    
44
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
45

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

    
51
dist-clean: dist-src-clean
52
	@rm -f configure Makefile
53

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

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

    
62
compile-lusi: $(LUSI_LIBS:%.lusi=%.lusic)
63

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

    
68
install-base: clean-lusic
69
	mkdir -p ${bindir}
70
	install -m 0755 $(LOCAL_BINDIR)/* ${bindir}
71
	mkdir -p ${includedir}/lustrec
72
	cp include/* ${includedir}/lustrec
73
	mkdir -p ${datarootdir}
74
	install -m 0655 share/FindLustre.cmake ${datarootdir}
75

    
76
install: install-base compile-lusi compile-mpfr-lusi
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=@GITBRANCH@ ../@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 COMPIL_LUSTRE
87

    
88
test-submit: test-config
89
	cd test; ctest -M Experimental -T Submit -R COMPIL_LUSTRE
90

    
91
test: test-config
92
	cd test; ctest -D Experimental -R COMPIL_LUSTRE\|MAKE\|BIN\|DIFF
93

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

    
97
test-full-submit: test-config
98
	cd test; ctest -M Experimental -T Submit 
99

    
100
test-full: test-config
101
	cd test; ctest -D Experimental 
102

    
103

    
104
.PHONY: all compile-lusi doc dot lustrec lustrec.odocl clean install dist-clean 
105