Logo AND Algorithmique Numérique Distribuée

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