Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Implement GRAMINE
[simgrid.git] / Makefile.am
1 # GRAMINE_CUT_BEGIN
2 SG_SUBDIRS= tools testsuite 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 $(SG_SUBDIRS)
12 EXTRA_DIST=$(SG_EXTRA_DIST)
13
14 DISTCLEANFILES =  *~  
15
16 ACLOCAL = aclocal-1.9 -I acmacro
17 AUTOMAKE_OPTIONS = gnu
18
19 SOURCE_FILES = $(shell find . -name "*.[ch]")
20 TAGS: $(SOURCE_FILES)
21         @etags $(SOURCE_FILES)
22
23 tags: TAGS
24
25 gramine:
26         rm -rf gramine-@VERSION@
27         @echo "# Setup sources..."
28         for n in `find include src -name '*.[chl]'`; do \
29           mkdir -p gramine-@VERSION@/`dirname $$n`; \
30           cp $$n gramine-@VERSION@/`dirname $$n`; \
31         done
32         @echo "# Copy sources to be generated by configury"
33         cp src/ucontext_stack.h.in src/gras_config.h.in gramine-@VERSION@/src
34         @echo "# Remove sources being part of the testsuite"
35         rm gramine-@VERSION@/src/*_unit.c
36         @echo "# Adapt the configury mechanism to the gramine context"
37         mkdir gramine-@VERSION@/acmacro
38         for n in configure Makefile.in src/Makefile.in include/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           
44
45 if MAINTAINER_MODE
46 ##
47 ## The following is only interesting for me, I guess. 
48 ## Some of the targets will only work on my machine ;)
49 ##
50
51 release: distcheck remote debian publish
52
53 debian: dist
54         make -C ~/CVSIMPORT/pkg-grid/gras maintainerclean
55         cp @PACKAGE@-@VERSION@.tar.gz ~/CVSIMPORT/pkg-grid/gras/
56         cp @PACKAGE@-@VERSION@.tar.gz ~/CVSIMPORT/pkg-grid/gras/@PACKAGE@_@VERSION@.orig.tar.gz
57         make -C ~/CVSIMPORT/pkg-grid/gras deb check
58         dput local *.changes
59
60 publish-old: dist
61          @echo "----[ Put the documentation on the local filesystem ]----"
62          rm -rf ~/public_html/gras/doc
63          mkdir ~/public_html/gras/doc
64          cp -r doc/html ~/public_html/gras/doc
65          @echo "----[ Put the tarball @VERSION@ on the local filesystem ]----"
66          cp @PACKAGE@-@VERSION@.tar.gz ~/public_html/gras/dl
67          @echo "----[ Sync remote host ]----"
68          make -C public_html publish
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 scm.gforge.inria.fr:/var/lib/gforge/chroot/home/groups/simgrid/htdocs/
87         scp doc/simgrid_modules.png doc/simgrid_logo.png doc/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
91 mail:
92          @ver=`dpkg-parsechangelog -lChangeLog | egrep '^Version: ' | sed 's/Version: //'`;\
93           (echo "Hello," ; \
94            echo; \
95            echo "A new version of SimGrid is available. Here is the changelog:";\
96            echo;echo;\
97            dpkg-parsechangelog -lChangeLog ;\
98            echo;echo; \
99            echo "It is available from the official website:";\
100            echo "  http://simgrid.gforge.inria.fr";\
101            echo;echo "Cheers, the SimGrid team.") | \
102           mail -e \
103                -a "From: Arnaud.Legrand@imag.fr" \
104                -s "New version of SimGrid ($$ver)" \
105                simgrid-user@lists.gforge.inria.fr
106
107 splint:
108         splint `make dist-files | grep -v $(PWD) | egrep '\.[ch]$$' |sort -u` \
109                +matchanyintegral -warnposix +boolint \
110                +show-summary +stats\
111                -Iinclude -Isrc/include -Isrc/base -Isrc
112 .PHONY: splint sync-gforge
113 ##
114 ## Cruft for remote compilation
115 ##
116
117 remote: 
118         @$(top_srcdir)/tools/graspe-master
119
120 endif
121
122 include $(top_srcdir)/acmacro/dist-files.mk