Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
2983dab2afb572230bc0fca2b5d563ace5c46e6e
[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         buildtools/Cmake/CMakeLists.txt buildtools/Cmake/chdir_run.sh \
18         buildtools/Cmake/build.sh buildtools/Cmake/test_java.sh \
19         buildtools/Cmake/CTestList.txt buildtools/Cmake/CTestConfig.txt \
20         buildtools/Cmake/CTestCustom.ctest
21 # GRAMINE_CUT_END
22
23 SUBDIRS= include src tools $(SG_SUBDIRS)
24 EXTRA_DIST=$(SG_EXTRA_DIST)
25
26 DISTCLEANFILES= stamp.configure stamp.build stamp.check *~  
27
28 ACLOCAL = aclocal -I acmacro
29 ACLOCAL_AMFLAGS=-I acmacro
30 AUTOMAKE_OPTIONS = gnu
31
32 check-local:
33         echo @build_id@ > stamp.check
34 all-local:
35         echo @build_id@ > stamp.build
36
37 gramine:
38         rm -rf gramine-@VERSION@ gramine-@VERSION@.tar*
39         @echo "# Setup sources..."
40         for n in `find include src tools/gras -name '*.[ch]' | grep -v -e gras_config.h -e ucontext_stack.h`; do \
41           mkdir -p gramine-@VERSION@/`dirname $$n`; \
42            perl -e '$$/ = undef; $$l=<>; while ($$l=~ m,(/\*.*?\*/),s) { $$rep=$$1; $$rep=~s/\S//sg; $$l=~s,/\*.*?\*/,$$rep,s; } print $$l;' < $$n > gramine-@VERSION@/$$n; \
43         done
44         @echo "# Copy sources to be generated by configury"
45         cp src/ucontext_stack.h.in src/gras_config.h.in gramine-@VERSION@/src
46         @echo "# Remove sources being part of the testsuite"
47         rm gramine-@VERSION@/src/*_unit.c
48         @echo "# Adapt the configury mechanism to the gramine context"
49         mkdir gramine-@VERSION@/acmacro
50         for n in configure Makefile.in src/Makefile.in include/Makefile.in \
51                  tools/Makefile.in tools/gras/Makefile.in; do \
52           sed  -e '/^# GRAMINE_CUT_BEGIN/,/^# GRAMINE_CUT_END/d' \
53                -e 's/gramine_mode=no/gramine_mode=yes/' $$n > gramine-@VERSION@/$$n; \
54         done
55         chmod +x gramine-@VERSION@/configure
56         cp install[-.]sh config.sub config.guess depcomp missing ltmain.sh gramine-@VERSION@/$$n
57         tar cf gramine-@VERSION@.tar gramine-@VERSION@ ; bzip2 -9 gramine-@VERSION@.tar
58         tar cf gramine-@VERSION@.tar gramine-@VERSION@ ; gzip -9 gramine-@VERSION@.tar
59
60 if MAINTAINER_MODE
61 ##
62 ## The following is only interesting for me, I guess. 
63 ## Some of the targets will only work on my machine ;)
64 ##
65
66 release: distcheck remote debian publish
67
68 debian: dist
69         $(MAKE) -C ~/CVSIMPORT/pkg-grid/gras maintainerclean
70         cp @PACKAGE@-@VERSION@.tar.gz ~/CVSIMPORT/pkg-grid/gras/
71         cp @PACKAGE@-@VERSION@.tar.gz ~/CVSIMPORT/pkg-grid/gras/@PACKAGE@_@VERSION@.orig.tar.gz
72         $(MAKE) -C ~/CVSIMPORT/pkg-grid/gras deb check
73         dput local *.changes
74
75 publish: dist
76          @echo "----[ Put the tarball @VERSION@ on gforge ]----"
77 #        scp @PACKAGE@-@VERSION@.tar.gz gcl.ucsd.edu:/home/www/simgrid/dl/
78 #        scp -r doc/html/* gcl.ucsd.edu:/home/www/simgrid/
79 #        scp -r doc/html/* scm.gforge.inria.fr:/var/lib/gforge/chroot/home/groups/simgrid/htdocs/
80          scp ChangeLog gcl.ucsd.edu:/home/www/simgrid/dl/ChangeLog
81          @echo "----[ Put the tarball @VERSION@ on the local filesystem ]----"
82          cp @PACKAGE@-@VERSION@.tar.gz ~/public_html/simgrid2
83          cp -r doc/html ~/public_html/simgrid2/doc/
84          cp ChangeLog ~/public_html/simgrid2/
85          $(MAKE) -C ~/public_html
86
87 indent:
88         indent -br -brs -ce -bbo -bap --dont-break-procedure-type \
89         --no-tabs --cuddle-do-while --cuddle-else --indent-level2 \
90         --leave-preprocessor-space --no-space-after-function-call-names \
91         `$(MAKE) dist-files | grep '\.[ch]$$'|grep -v '/_' |grep -v '_unit.c'\
92                             | grep -v src/xbt/graphxml.c | grep -v datadesc_structs.c \
93                             | grep -v simgrid_dtd.[ch]`
94
95 sync-gforge: 
96         chmod g+rw -R doc/
97         chmod a+rX -R doc/
98         rsync --verbose --cvs-exclude --compress --delete --delete-excluded --rsh=ssh --ignore-times \
99             --recursive --links --perms --times --omit-dir-times  \
100             doc/html/ scm.gforge.inria.fr:/home/groups/simgrid/htdocs/doc/ || true
101         scp doc/index.php doc/webcruft/robots.txt scm.gforge.inria.fr:/home/groups/simgrid/htdocs/
102         scp doc/simgrid_modules2.png doc/simgrid_modules.png doc/webcruft/simgrid_logo.png doc/webcruft/simgrid_logo_small.png scm.gforge.inria.fr:/home/groups/simgrid/htdocs/
103 #       ssh scm.gforge.inria.fr "chgrp -R simgrid /home/groups/simgrid/htdocs/"
104 #       ssh scm.gforge.inria.fr "chmod g+rw -R /home/groups/simgrid/htdocs/* || true"
105 #       ssh scm.gforge.inria.fr "chmod a+rX -R /home/groups/simgrid/htdocs/* || true"
106
107 mail:
108          @ver=`dpkg-parsechangelog -lChangeLog | egrep '^Version: ' | sed 's/Version: //'`;\
109           (echo "Hello," ; \
110            echo; \
111            echo "A new version of SimGrid is available. Here is the changelog:";\
112            echo;echo;\
113            dpkg-parsechangelog -lChangeLog ;\
114            echo;echo; \
115            echo "It is available from the official website:";\
116            echo "  http://simgrid.gforge.inria.fr";\
117            echo;echo "Cheers, the SimGrid team.") | \
118           mail -e \
119                -a "From: Arnaud.Legrand@imag.fr" \
120                -s "New version of SimGrid ($$ver)" \
121                simgrid-user@lists.gforge.inria.fr
122
123 TAGS:
124         etags -o ./TAGS `$(MAKE) dist-files | grep -v $(PWD) | egrep '\.[ch]$$' |sort -u` 
125
126 splint:
127         splint `$(MAKE) dist-files | grep -v $(PWD) | egrep '\.[ch]$$' |sort -u` \
128                +matchanyintegral -warnposix +boolint \
129                +show-summary +stats\
130                -Iinclude -Isrc/include -Isrc/base -Isrc
131 .PHONY: splint sync-gforge
132 ##
133 ## Cruft for remote compilation
134 ##
135
136 remote: 
137         @$(top_srcdir)/tools/graspe-master
138
139 endif
140
141 include $(top_srcdir)/acmacro/dist-files.mk