Logo AND Algorithmique Numérique Distribuée

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