Logo AND Algorithmique Numérique Distribuée

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