Logo AND Algorithmique Numérique Distribuée

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