Logo AND Algorithmique Numérique Distribuée

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