Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do connect all log channel manually to parent using XBT_LOG_CONNECT() too, so that...
[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 # GRAMINE_CUT_END
17
18 SUBDIRS= include src tools $(SG_SUBDIRS)
19 EXTRA_DIST=$(SG_EXTRA_DIST)
20
21 DISTCLEANFILES= stamp.configure stamp.build stamp.check *~  
22
23 ACLOCAL = aclocal -I acmacro
24 AUTOMAKE_OPTIONS = gnu
25
26 check-local:
27         echo @build_id@ > stamp.check
28 all-local:
29         echo @build_id@ > stamp.build
30
31 gramine:
32         rm -rf gramine-@VERSION@ gramine-@VERSION@.tar*
33         @echo "# Setup sources..."
34         for n in `find include src tools/gras -name '*.[ch]' | grep -v -e gras_config.h -e ucontext_stack.h`; do \
35           mkdir -p gramine-@VERSION@/`dirname $$n`; \
36            perl -e '$$/ = undef; $$l=<>; while ($$l=~ m,(/\*.*?\*/),s) { $$rep=$$1; $$rep=~s/\S//sg; $$l=~s,/\*.*?\*/,$$rep,s; } print $$l;' < $$n > gramine-@VERSION@/$$n; \
37         done
38         @echo "# Copy sources to be generated by configury"
39         cp src/ucontext_stack.h.in src/gras_config.h.in gramine-@VERSION@/src
40         @echo "# Remove sources being part of the testsuite"
41         rm gramine-@VERSION@/src/*_unit.c
42         @echo "# Adapt the configury mechanism to the gramine context"
43         mkdir gramine-@VERSION@/acmacro
44         for n in configure Makefile.in src/Makefile.in include/Makefile.in \
45                  tools/Makefile.in tools/gras/Makefile.in; do \
46           sed  -e '/^# GRAMINE_CUT_BEGIN/,/^# GRAMINE_CUT_END/d' \
47                -e 's/gramine_mode=no/gramine_mode=yes/' $$n > gramine-@VERSION@/$$n; \
48         done
49         chmod +x gramine-@VERSION@/configure
50         cp install[-.]sh config.sub config.guess depcomp missing ltmain.sh gramine-@VERSION@/$$n
51         tar cf gramine-@VERSION@.tar gramine-@VERSION@ ; bzip2 -9 gramine-@VERSION@.tar
52         tar cf gramine-@VERSION@.tar gramine-@VERSION@ ; gzip -9 gramine-@VERSION@.tar
53
54 if MAINTAINER_MODE
55 ##
56 ## The following is only interesting for me, I guess. 
57 ## Some of the targets will only work on my machine ;)
58 ##
59
60 release: distcheck remote debian publish
61
62 debian: dist
63         $(MAKE) -C ~/CVSIMPORT/pkg-grid/gras maintainerclean
64         cp @PACKAGE@-@VERSION@.tar.gz ~/CVSIMPORT/pkg-grid/gras/
65         cp @PACKAGE@-@VERSION@.tar.gz ~/CVSIMPORT/pkg-grid/gras/@PACKAGE@_@VERSION@.orig.tar.gz
66         $(MAKE) -C ~/CVSIMPORT/pkg-grid/gras deb check
67         dput local *.changes
68
69 publish: dist
70          @echo "----[ Put the tarball @VERSION@ on gforge ]----"
71 #        scp @PACKAGE@-@VERSION@.tar.gz gcl.ucsd.edu:/home/www/simgrid/dl/
72 #        scp -r doc/html/* gcl.ucsd.edu:/home/www/simgrid/
73 #        scp -r doc/html/* scm.gforge.inria.fr:/var/lib/gforge/chroot/home/groups/simgrid/htdocs/
74          scp ChangeLog gcl.ucsd.edu:/home/www/simgrid/dl/ChangeLog
75          @echo "----[ Put the tarball @VERSION@ on the local filesystem ]----"
76          cp @PACKAGE@-@VERSION@.tar.gz ~/public_html/simgrid2
77          cp -r doc/html ~/public_html/simgrid2/doc/
78          cp ChangeLog ~/public_html/simgrid2/
79          $(MAKE) -C ~/public_html
80
81 sync-gforge: 
82         rsync --verbose --cvs-exclude --compress --delete --delete-excluded --rsh=ssh --ignore-times \
83             --recursive --links --perms --times --omit-dir-times  \
84             doc/html/ scm.gforge.inria.fr:/var/lib/gforge/chroot/home/groups/simgrid/htdocs/doc/ || true
85         scp doc/index.php doc/webcruft/robots.txt scm.gforge.inria.fr:/var/lib/gforge/chroot/home/groups/simgrid/htdocs/
86         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/
87         ssh scm.gforge.inria.fr "chgrp -R simgrid /var/lib/gforge/chroot/home/groups/simgrid/htdocs/"
88         ssh scm.gforge.inria.fr "chmod g+rw -R /var/lib/gforge/chroot/home/groups/simgrid/htdocs/* || true"
89         ssh scm.gforge.inria.fr "chmod a+rX -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 TAGS:
108         etags -o ./TAGS `$(MAKE) dist-files | grep -v $(PWD) | egrep '\.[ch]$$' |sort -u` 
109
110 splint:
111         splint `$(MAKE) dist-files | grep -v $(PWD) | egrep '\.[ch]$$' |sort -u` \
112                +matchanyintegral -warnposix +boolint \
113                +show-summary +stats\
114                -Iinclude -Isrc/include -Isrc/base -Isrc
115 .PHONY: splint sync-gforge
116 ##
117 ## Cruft for remote compilation
118 ##
119
120 remote: 
121         @$(top_srcdir)/tools/graspe-master
122
123 endif
124
125 include $(top_srcdir)/acmacro/dist-files.mk