Logo AND Algorithmique Numérique Distribuée

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