Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
construct a build identifier string, and use it to populate stamp files. It should...
[simgrid.git] / Makefile.am
1 # GRAMINE_CUT_BEGIN
2 SG_SUBDIRS= tools testsuite examples doc
3
4 SG_EXTRA_DIST = bootstrap COPYING INSTALL NEWS README README.IEEE TODO AUTHORS ChangeLog \
5         acmacro/aci.m4 \
6         tools/graspe-slave.in \
7         tools/MSG_visualization \
8            tools/MSG_visualization/colorize.pl
9 # GRAMINE_CUT_END
10
11 SUBDIRS= include src $(SG_SUBDIRS)
12 EXTRA_DIST=$(SG_EXTRA_DIST)
13
14 DISTCLEANFILES =  *~  
15
16 ACLOCAL = aclocal-1.9 -I acmacro
17 AUTOMAKE_OPTIONS = gnu
18
19 check-local:
20         echo @build_id@ > stamp.check
21 all-local:
22         echo @build_id@ > stamp.build
23
24 gramine:
25         rm -rf gramine-@VERSION@ gramine-@VERSION@.tar*
26         @echo "# Setup sources..."
27         for n in `find include src -name '*.[ch]'`; do \
28           mkdir -p gramine-@VERSION@/`dirname $$n`; \
29            perl -e '$$/ = undef; $$l=<>; while ($$l=~ m,(/\*.*?\*/),s) { $$rep=$$1; $$rep=~s/\S//sg; $$l=~s,/\*.*?\*/,$$rep,s; } print $$l;' < $$n > gramine-@VERSION@/$$n; \
30         done
31         @echo "# Copy sources to be generated by configury"
32         cp src/ucontext_stack.h.in src/gras_config.h.in gramine-@VERSION@/src
33         @echo "# Remove sources being part of the testsuite"
34         rm gramine-@VERSION@/src/*_unit.c
35         @echo "# Adapt the configury mechanism to the gramine context"
36         mkdir gramine-@VERSION@/acmacro
37         for n in configure Makefile.in src/Makefile.in include/Makefile.in ; do \
38           sed  -e '/^# GRAMINE_CUT_BEGIN/,/^# GRAMINE_CUT_END/d' \
39                -e 's/gramine_mode=no/gramine_mode=yes/' $$n > gramine-@VERSION@/$$n; \
40         done
41         chmod +x gramine-@VERSION@/configure
42         cp install[-.]sh config.sub config.guess depcomp missing ltmain.sh gramine-@VERSION@/$$n
43         tar cf gramine-@VERSION@.tar gramine-@VERSION@ ; bzip2 -9 gramine-@VERSION@.tar
44         tar cf gramine-@VERSION@.tar gramine-@VERSION@ ; gzip -9 gramine-@VERSION@.tar
45
46 if MAINTAINER_MODE
47 ##
48 ## The following is only interesting for me, I guess. 
49 ## Some of the targets will only work on my machine ;)
50 ##
51
52 release: distcheck remote debian publish
53
54 debian: dist
55         make -C ~/CVSIMPORT/pkg-grid/gras maintainerclean
56         cp @PACKAGE@-@VERSION@.tar.gz ~/CVSIMPORT/pkg-grid/gras/
57         cp @PACKAGE@-@VERSION@.tar.gz ~/CVSIMPORT/pkg-grid/gras/@PACKAGE@_@VERSION@.orig.tar.gz
58         make -C ~/CVSIMPORT/pkg-grid/gras deb check
59         dput local *.changes
60
61 publish-old: dist
62          @echo "----[ Put the documentation on the local filesystem ]----"
63          rm -rf ~/public_html/gras/doc
64          mkdir ~/public_html/gras/doc
65          cp -r doc/html ~/public_html/gras/doc
66          @echo "----[ Put the tarball @VERSION@ on the local filesystem ]----"
67          cp @PACKAGE@-@VERSION@.tar.gz ~/public_html/gras/dl
68          @echo "----[ Sync remote host ]----"
69          make -C public_html publish
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 sync-gforge: 
84         rsync --verbose --cvs-exclude --compress --delete --delete-excluded --rsh=ssh --ignore-times \
85             --recursive --links --perms --times --omit-dir-times  \
86             doc/html/ scm.gforge.inria.fr:/var/lib/gforge/chroot/home/groups/simgrid/htdocs/doc/ || true
87         scp doc/index.php scm.gforge.inria.fr:/var/lib/gforge/chroot/home/groups/simgrid/htdocs/
88         scp doc/simgrid_modules.png doc/simgrid_logo.png doc/simgrid_logo_small.png scm.gforge.inria.fr:/var/lib/gforge/chroot/home/groups/simgrid/htdocs/
89         ssh scm.gforge.inria.fr "chgrp -R simgrid /var/lib/gforge/chroot/home/groups/simgrid/htdocs/"
90         ssh scm.gforge.inria.fr "chmod g+rw -R /var/lib/gforge/chroot/home/groups/simgrid/htdocs/* || true"
91
92 mail:
93          @ver=`dpkg-parsechangelog -lChangeLog | egrep '^Version: ' | sed 's/Version: //'`;\
94           (echo "Hello," ; \
95            echo; \
96            echo "A new version of SimGrid is available. Here is the changelog:";\
97            echo;echo;\
98            dpkg-parsechangelog -lChangeLog ;\
99            echo;echo; \
100            echo "It is available from the official website:";\
101            echo "  http://simgrid.gforge.inria.fr";\
102            echo;echo "Cheers, the SimGrid team.") | \
103           mail -e \
104                -a "From: Arnaud.Legrand@imag.fr" \
105                -s "New version of SimGrid ($$ver)" \
106                simgrid-user@lists.gforge.inria.fr
107
108 splint:
109         splint `make dist-files | grep -v $(PWD) | egrep '\.[ch]$$' |sort -u` \
110                +matchanyintegral -warnposix +boolint \
111                +show-summary +stats\
112                -Iinclude -Isrc/include -Isrc/base -Isrc
113 .PHONY: splint sync-gforge
114 ##
115 ## Cruft for remote compilation
116 ##
117
118 remote: 
119         @$(top_srcdir)/tools/graspe-master
120
121 endif
122
123 include $(top_srcdir)/acmacro/dist-files.mk