Logo AND Algorithmique Numérique Distribuée

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