Logo AND Algorithmique Numérique Distribuée

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