Logo AND Algorithmique Numérique Distribuée

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