Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add the test runner to the archive
[simgrid.git] / Makefile.am
1 # Copyright (c) 2004-2007. The SimGrid team. All right reserved.
2
3 # This file is part of the SimGrid project. This is free software:
4 # You can redistribute and/or modify it under the terms of the
5 # GNU LGPL (v2.1) licence.
6
7
8 # GRAMINE_CUT_BEGIN
9 SG_SUBDIRS= testsuite teshsuite examples doc
10
11 SG_EXTRA_DIST = bootstrap COPYING INSTALL NEWS README README.IEEE TODO AUTHORS ChangeLog \
12         acmacro/aci.m4 \
13         tools/graspe-slave.in \
14         tools/MSG_visualization \
15         tools/MSG_visualization/colorize.pl \
16         checkall
17 # GRAMINE_CUT_END
18
19 SUBDIRS= include src tools $(SG_SUBDIRS)
20 EXTRA_DIST=$(SG_EXTRA_DIST)
21
22 DISTCLEANFILES= stamp.configure stamp.build stamp.check *~  
23
24 ACLOCAL = aclocal -I acmacro
25 AUTOMAKE_OPTIONS = gnu
26
27 check-local:
28         echo @build_id@ > stamp.check
29 all-local:
30         echo @build_id@ > stamp.build
31
32 gramine:
33         rm -rf gramine-@VERSION@ gramine-@VERSION@.tar*
34         @echo "# Setup sources..."
35         for n in `find include src tools/gras -name '*.[ch]' | grep -v -e gras_config.h -e ucontext_stack.h`; do \
36           mkdir -p gramine-@VERSION@/`dirname $$n`; \
37            perl -e '$$/ = undef; $$l=<>; while ($$l=~ m,(/\*.*?\*/),s) { $$rep=$$1; $$rep=~s/\S//sg; $$l=~s,/\*.*?\*/,$$rep,s; } print $$l;' < $$n > gramine-@VERSION@/$$n; \
38         done
39         @echo "# Copy sources to be generated by configury"
40         cp src/ucontext_stack.h.in src/gras_config.h.in gramine-@VERSION@/src
41         @echo "# Remove sources being part of the testsuite"
42         rm gramine-@VERSION@/src/*_unit.c
43         @echo "# Adapt the configury mechanism to the gramine context"
44         mkdir gramine-@VERSION@/acmacro
45         for n in configure Makefile.in src/Makefile.in include/Makefile.in \
46                  tools/Makefile.in tools/gras/Makefile.in; do \
47           sed  -e '/^# GRAMINE_CUT_BEGIN/,/^# GRAMINE_CUT_END/d' \
48                -e 's/gramine_mode=no/gramine_mode=yes/' $$n > gramine-@VERSION@/$$n; \
49         done
50         chmod +x gramine-@VERSION@/configure
51         cp install[-.]sh config.sub config.guess depcomp missing ltmain.sh gramine-@VERSION@/$$n
52         tar cf gramine-@VERSION@.tar gramine-@VERSION@ ; bzip2 -9 gramine-@VERSION@.tar
53         tar cf gramine-@VERSION@.tar gramine-@VERSION@ ; gzip -9 gramine-@VERSION@.tar
54
55 if MAINTAINER_MODE
56 ##
57 ## The following is only interesting for me, I guess. 
58 ## Some of the targets will only work on my machine ;)
59 ##
60
61 release: distcheck remote debian publish
62
63 debian: dist
64         $(MAKE) -C ~/CVSIMPORT/pkg-grid/gras maintainerclean
65         cp @PACKAGE@-@VERSION@.tar.gz ~/CVSIMPORT/pkg-grid/gras/
66         cp @PACKAGE@-@VERSION@.tar.gz ~/CVSIMPORT/pkg-grid/gras/@PACKAGE@_@VERSION@.orig.tar.gz
67         $(MAKE) -C ~/CVSIMPORT/pkg-grid/gras deb check
68         dput local *.changes
69
70 publish: dist
71          @echo "----[ Put the tarball @VERSION@ on gforge ]----"
72 #        scp @PACKAGE@-@VERSION@.tar.gz gcl.ucsd.edu:/home/www/simgrid/dl/
73 #        scp -r doc/html/* gcl.ucsd.edu:/home/www/simgrid/
74 #        scp -r doc/html/* scm.gforge.inria.fr:/var/lib/gforge/chroot/home/groups/simgrid/htdocs/
75          scp ChangeLog gcl.ucsd.edu:/home/www/simgrid/dl/ChangeLog
76          @echo "----[ Put the tarball @VERSION@ on the local filesystem ]----"
77          cp @PACKAGE@-@VERSION@.tar.gz ~/public_html/simgrid2
78          cp -r doc/html ~/public_html/simgrid2/doc/
79          cp ChangeLog ~/public_html/simgrid2/
80          $(MAKE) -C ~/public_html
81
82 sync-gforge: 
83         rsync --verbose --cvs-exclude --compress --delete --delete-excluded --rsh=ssh --ignore-times \
84             --recursive --links --perms --times --omit-dir-times  \
85             doc/html/ scm.gforge.inria.fr:/var/lib/gforge/chroot/home/groups/simgrid/htdocs/doc/ || true
86         scp doc/index.php doc/webcruft/robots.txt scm.gforge.inria.fr:/var/lib/gforge/chroot/home/groups/simgrid/htdocs/
87         scp doc/webcruft/simgrid_modules2.png doc/webcruft/simgrid_modules.png doc/webcruft/simgrid_logo.png doc/webcruft/simgrid_logo_small.png scm.gforge.inria.fr:/var/lib/gforge/chroot/home/groups/simgrid/htdocs/
88         ssh scm.gforge.inria.fr "chgrp -R simgrid /var/lib/gforge/chroot/home/groups/simgrid/htdocs/"
89         ssh scm.gforge.inria.fr "chmod g+rw -R /var/lib/gforge/chroot/home/groups/simgrid/htdocs/* || true"
90         ssh scm.gforge.inria.fr "chmod a+rX -R /var/lib/gforge/chroot/home/groups/simgrid/htdocs/* || true"
91
92 mail:
93          @ver=`dpkg-parsechangelog -lChangeLog | egrep '^Version: ' | sed 's/Version: //'`;\
94           (echo "Hello," ; \
95            echo; \
96            echo "A new version of SimGrid is available. Here is the changelog:";\
97            echo;echo;\
98            dpkg-parsechangelog -lChangeLog ;\
99            echo;echo; \
100            echo "It is available from the official website:";\
101            echo "  http://simgrid.gforge.inria.fr";\
102            echo;echo "Cheers, the SimGrid team.") | \
103           mail -e \
104                -a "From: Arnaud.Legrand@imag.fr" \
105                -s "New version of SimGrid ($$ver)" \
106                simgrid-user@lists.gforge.inria.fr
107
108 TAGS:
109         etags -o ./TAGS `$(MAKE) dist-files | grep -v $(PWD) | egrep '\.[ch]$$' |sort -u` 
110
111 splint:
112         splint `$(MAKE) dist-files | grep -v $(PWD) | egrep '\.[ch]$$' |sort -u` \
113                +matchanyintegral -warnposix +boolint \
114                +show-summary +stats\
115                -Iinclude -Isrc/include -Isrc/base -Isrc
116 .PHONY: splint sync-gforge
117 ##
118 ## Cruft for remote compilation
119 ##
120
121 remote: 
122         @$(top_srcdir)/tools/graspe-master
123
124 endif
125
126 include $(top_srcdir)/acmacro/dist-files.mk