Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add some tests about cbps
[simgrid.git] / Makefile.am
1 SUBDIRS= src doc
2 DISTCLEANFILES =  *~  
3
4 ACLOCAL = aclocal -I acmacro -I /usr/share/aclocal/gnome2-macros
5 AUTOMAKE_OPTIONS = gnu
6
7 EXTRA_DIST = bootstrap COPYING INSTALL NEWS README README.IEEE TODO AUTHORS ChangeLog\
8         acmacro/aci.m4 \
9         tools/gras-check-arch   tools/compile-remote-worker.in
10
11 TAGS: 
12         etags `find . -name "*.[ch]"`
13
14 tags: TAGS
15
16
17
18 if MAINTAINER_MODE
19 ##
20 ## The following is only interesting for me, I guess. 
21 ## Some of the targets will only work on my machine ;)
22 ##
23
24 release: distcheck remote debian publish
25
26 debian: dist
27         make -C ~/CVSIMPORT/pkg-grid/gras maintainerclean
28         cp @PACKAGE@-@VERSION@.tar.gz ~/CVSIMPORT/pkg-grid/gras
29         make -C ~/CVSIMPORT/pkg-grid/gras deb check
30         dput local *.changes
31
32 publish: dist
33          @echo "----[ Put the documentation on the local filesystem ]----"
34          rm -rf ~/public_html/gras/doc
35          mkdir ~/public_html/gras/doc
36          cp -r doc/html ~/public_html/gras/doc
37          @echo "----[ Put the tarball @VERSION@ on the local filesystem ]----"
38          cp @PACKAGE@-@VERSION@.tar.gz ~/public_html/gras/dl
39          @echo "----[ Sync remote host ]----"
40          make -C public_html publish
41
42 mail:
43          @ver=`dpkg-parsechangelog -lChangeLog| egrep '^Version: ' | sed 's/Version: //'`;\
44           (echo "Hello," ; \
45            echo; \
46            echo "A new version of GRAS is available. Here is the changelog:";\
47            echo;echo;\
48            dpkg-parsechangelog -lChangeLog ;\
49            echo;echo; \
50            echo "It is available from the official website:";\
51            echo "  http://grail.sdsc.edu/simgrid/";\
52            echo;echo "Cheers, Mt.") | \
53           mail -e \
54                -a "From: Martin.Quinson@ens-lyon.fr" \
55                -s "New version of GRAS ($$ver)" \
56                martin.quinson@ens-lyon.fr,arnaud.legrand@ens-lyon.fr
57
58
59 splint:
60         splint `find src -name '*.c' | grep -v RL | grep -v SG` +matchanyintegral -warnposix +boolint -Inws_portability/Include/ -Isrc/include -Isrc/base -Isrc
61
62 ##
63 ## Cruft for remote compilation
64 ##
65
66 MACHINES ?= valnure.cs.ucsb.edu sperm.cs.ucsb.edu     basalt.cs.ucsb.edu \
67             graal.ens-lyon.fr   allo-psmn.ens-lyon.fr \
68             nala.cs.utk.edu
69
70 # ACTION: What to do there
71 # possible values:
72 #  - clean:   erase any previously existing source tree and 
73 #             open the new open
74 #  - touch:   touch every file of the source tree to deal with 
75 #             clock brokenness. May help, may harm.
76 #  - config:  launch configure
77 #  - compile: run 'make'
78 #  - install: run 'make install'
79 #  - check:   run 'make check'
80 #
81 # default value:
82 ACTION ?= clean untar config compile check
83
84 REMOTE_PREFIX ?='${HOME}/gras'
85
86 remote: @PACKAGE@-@VERSION@.tar.gz tools/compile-remote-worker
87         @echo;echo "----[ Recompile the package on remote hosts ]----"
88         @test -e buildlogs/@PACKAGE@-@VERSION@ || mkdir -p buildlogs/@PACKAGE@-@VERSION@
89         @failed=0;\
90          for site in $(MACHINES) ; do \
91            machine=`echo $$site |sed 's/^\([^%]*\)%.*$$/\1/'`;\
92            machine2=`echo $$site |sed 's/^\([^%]*\)%\(.*\)$$/\2/'`;\
93            cmd="\"sh -c 'env REMOTE_PREFIX=$(REMOTE_PREFIX) $(REMOTE_PREFIX)/src/compile-remote-worker $(ACTION) 2>&1'\"";\
94            if echo $$site | grep  '%' >/dev/null ; then \
95              echo "----[ Compile on $$machine2 (behide $$machine) ]----";\
96            else \
97              machine=$$site;\
98              echo "----[ Compile on $$machine ]----";\
99            fi;\
100            \
101            echo "-- Copy the data over"; \
102            scp @PACKAGE@-@VERSION@.tar.gz tools/compile-remote-worker \
103                $$machine:$(REMOTE_PREFIX)/src;\
104            \
105            echo "-- Compiling... (the output gets into buildlogs/@PACKAGE@-@VERSION@/$$site.log)"; \
106            if echo $$site | grep  '%' >/dev/null ; then \
107              if ssh -CA $$machine "env REMOTE_PREFIX=$(REMOTE_PREFIX) ssh -A $$machine2 $$cmd" 2>&1 > buildlogs/@PACKAGE@-@VERSION@/$$site.log;\
108              then echo "Sucessful"; else failed=1;echo "Failed (check buildlogs/@PACKAGE@-@VERSION@/$$site.log)"; fi;echo; \
109            else \
110              if ssh -CA $$machine "eval $$cmd" 2>&1 > buildlogs/@PACKAGE@-@VERSION@/$$site.log ;\
111              then echo "Sucessful"; else failed=1;echo "Failed (check buildlogs/@PACKAGE@-@VERSION@/$$site.log)"; fi;echo; \
112            fi;\
113         done;\
114         tools/compile-stats;\
115         exit $$failed
116
117 endif