Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
A commit before a design modification. I'm gonna try the weird
[simgrid.git] / Makefile.am
1 SUBDIRS= include src examples doc testsuite
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         cp @PACKAGE@-@VERSION@.tar.gz ~/CVSIMPORT/pkg-grid/gras/@PACKAGE@_@VERSION@.orig.tar.gz
31         make -C ~/CVSIMPORT/pkg-grid/gras deb check
32         dput local *.changes
33
34 publish: dist
35          @echo "----[ Put the documentation on the local filesystem ]----"
36          rm -rf ~/public_html/gras/doc
37          mkdir ~/public_html/gras/doc
38          cp -r doc/html ~/public_html/gras/doc
39          @echo "----[ Put the tarball @VERSION@ on the local filesystem ]----"
40          cp @PACKAGE@-@VERSION@.tar.gz ~/public_html/gras/dl
41          @echo "----[ Sync remote host ]----"
42          make -C public_html publish
43
44 mail:
45          @ver=`dpkg-parsechangelog -lChangeLog| egrep '^Version: ' | sed 's/Version: //'`;\
46           (echo "Hello," ; \
47            echo; \
48            echo "A new version of GRAS is available. Here is the changelog:";\
49            echo;echo;\
50            dpkg-parsechangelog -lChangeLog ;\
51            echo;echo; \
52            echo "It is available from the official website:";\
53            echo "  http://grail.sdsc.edu/simgrid/";\
54            echo;echo "Cheers, Mt.") | \
55           mail -e \
56                -a "From: Martin.Quinson@ens-lyon.fr" \
57                -s "New version of GRAS ($$ver)" \
58                martin.quinson@ens-lyon.fr,arnaud.legrand@ens-lyon.fr
59
60
61 splint:
62         splint `find src -name '*.c' | grep -v RL | grep -v SG` +matchanyintegral -warnposix +boolint -Inws_portability/Include/ -Isrc/include -Isrc/base -Isrc
63
64 ##
65 ## Cruft for remote compilation
66 ##
67
68 MACHINES ?= valnure.cs.ucsb.edu sperm.cs.ucsb.edu     basalt.cs.ucsb.edu \
69             graal.ens-lyon.fr   allo-psmn.ens-lyon.fr \
70             nala.cs.utk.edu
71
72 # ACTION: What to do there
73 # possible values:
74 #  - clean:   erase any previously existing source tree and 
75 #             open the new open
76 #  - touch:   touch every file of the source tree to deal with 
77 #             clock brokenness. May help, may harm.
78 #  - config:  launch configure
79 #  - compile: run 'make'
80 #  - install: run 'make install'
81 #  - check:   run 'make check'
82 #
83 # default value:
84 ACTION ?= clean untar config compile check
85
86 REMOTE_PREFIX ?='${HOME}/gras'
87
88 remote: @PACKAGE@-@VERSION@.tar.gz tools/compile-remote-worker
89         @echo;echo "----[ Recompile the package on remote hosts ]----"
90         @test -e buildlogs/@PACKAGE@-@VERSION@ || mkdir -p buildlogs/@PACKAGE@-@VERSION@
91         @failed=0;\
92          for site in $(MACHINES) ; do \
93            machine=`echo $$site |sed 's/^\([^%]*\)%.*$$/\1/'`;\
94            machine2=`echo $$site |sed 's/^\([^%]*\)%\(.*\)$$/\2/'`;\
95            cmd="\"sh -c 'env REMOTE_PREFIX=$(REMOTE_PREFIX) $(REMOTE_PREFIX)/src/compile-remote-worker $(ACTION) 2>&1'\"";\
96            if echo $$site | grep  '%' >/dev/null ; then \
97              echo "----[ Compile on $$machine2 (behide $$machine) ]----";\
98            else \
99              machine=$$site;\
100              echo "----[ Compile on $$machine ]----";\
101            fi;\
102            \
103            echo "-- Copy the data over"; \
104            scp @PACKAGE@-@VERSION@.tar.gz tools/compile-remote-worker \
105                $$machine:$(REMOTE_PREFIX)/src;\
106            \
107            echo "-- Compiling... (the output gets into buildlogs/@PACKAGE@-@VERSION@/$$site.log)"; \
108            if echo $$site | grep  '%' >/dev/null ; then \
109              if ssh $$machine "env REMOTE_PREFIX=$(REMOTE_PREFIX) ssh -A $$machine2 $$cmd" 2>&1 > buildlogs/@PACKAGE@-@VERSION@/$$site.log;\
110              then echo "Sucessful"; else failed=1;echo "Failed (check buildlogs/@PACKAGE@-@VERSION@/$$site.log)"; fi;echo; \
111            else \
112              if ssh $$machine "eval $$cmd" 2>&1 > buildlogs/@PACKAGE@-@VERSION@/$$site.log ;\
113              then echo "Sucessful"; else failed=1;echo "Failed (check buildlogs/@PACKAGE@-@VERSION@/$$site.log)"; fi;echo; \
114            fi;\
115         done;\
116         tools/compile-stats;\
117         exit $$failed
118
119 endif