Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Let's find portable.h during VPATH builds
[simgrid.git] / Makefile.am
1 # GRAMINE_CUT_BEGIN
2 SG_SUBDIRS= 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 tools $(SG_SUBDIRS)
12 EXTRA_DIST=$(SG_EXTRA_DIST)
13
14 DISTCLEANFILES= stamp.configure stamp.build stamp.check *~  
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 tools/gras -name '*.[ch]' | grep -v -e gras_config.h -e ucontext_stack.h`; 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 \
38                  tools/Makefile.in tools/gras/Makefile.in; do \
39           sed  -e '/^# GRAMINE_CUT_BEGIN/,/^# GRAMINE_CUT_END/d' \
40                -e 's/gramine_mode=no/gramine_mode=yes/' $$n > gramine-@VERSION@/$$n; \
41         done
42         chmod +x gramine-@VERSION@/configure
43         cp install[-.]sh config.sub config.guess depcomp missing ltmain.sh gramine-@VERSION@/$$n
44         tar cf gramine-@VERSION@.tar gramine-@VERSION@ ; bzip2 -9 gramine-@VERSION@.tar
45         tar cf gramine-@VERSION@.tar gramine-@VERSION@ ; gzip -9 gramine-@VERSION@.tar
46
47 if MAINTAINER_MODE
48 ##
49 ## The following is only interesting for me, I guess. 
50 ## Some of the targets will only work on my machine ;)
51 ##
52
53 release: distcheck remote debian publish
54
55 debian: dist
56         make -C ~/CVSIMPORT/pkg-grid/gras maintainerclean
57         cp @PACKAGE@-@VERSION@.tar.gz ~/CVSIMPORT/pkg-grid/gras/
58         cp @PACKAGE@-@VERSION@.tar.gz ~/CVSIMPORT/pkg-grid/gras/@PACKAGE@_@VERSION@.orig.tar.gz
59         make -C ~/CVSIMPORT/pkg-grid/gras deb check
60         dput local *.changes
61
62 publish-old: dist
63          @echo "----[ Put the documentation on the local filesystem ]----"
64          rm -rf ~/public_html/gras/doc
65          mkdir ~/public_html/gras/doc
66          cp -r doc/html ~/public_html/gras/doc
67          @echo "----[ Put the tarball @VERSION@ on the local filesystem ]----"
68          cp @PACKAGE@-@VERSION@.tar.gz ~/public_html/gras/dl
69          @echo "----[ Sync remote host ]----"
70          make -C public_html publish
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 sync-gforge: 
85         rsync --verbose --cvs-exclude --compress --delete --delete-excluded --rsh=ssh --ignore-times \
86             --recursive --links --perms --times --omit-dir-times  \
87             doc/html/ scm.gforge.inria.fr:/var/lib/gforge/chroot/home/groups/simgrid/htdocs/doc/ || true
88         scp doc/index.php doc/webcruft/robots.txt scm.gforge.inria.fr:/var/lib/gforge/chroot/home/groups/simgrid/htdocs/
89         scp doc/webcruft/simgrid_modules2.png doc/webcruft/simgrid_modules.png doc/webcruft/simgrid_logo.png doc/webcruft/simgrid_logo_small.png scm.gforge.inria.fr:/var/lib/gforge/chroot/home/groups/simgrid/htdocs/
90         ssh scm.gforge.inria.fr "chgrp -R simgrid /var/lib/gforge/chroot/home/groups/simgrid/htdocs/"
91         ssh scm.gforge.inria.fr "chmod g+rw -R /var/lib/gforge/chroot/home/groups/simgrid/htdocs/* || true"
92
93 mail:
94          @ver=`dpkg-parsechangelog -lChangeLog | egrep '^Version: ' | sed 's/Version: //'`;\
95           (echo "Hello," ; \
96            echo; \
97            echo "A new version of SimGrid is available. Here is the changelog:";\
98            echo;echo;\
99            dpkg-parsechangelog -lChangeLog ;\
100            echo;echo; \
101            echo "It is available from the official website:";\
102            echo "  http://simgrid.gforge.inria.fr";\
103            echo;echo "Cheers, the SimGrid team.") | \
104           mail -e \
105                -a "From: Arnaud.Legrand@imag.fr" \
106                -s "New version of SimGrid ($$ver)" \
107                simgrid-user@lists.gforge.inria.fr
108
109 splint:
110         splint `make dist-files | grep -v $(PWD) | egrep '\.[ch]$$' |sort -u` \
111                +matchanyintegral -warnposix +boolint \
112                +show-summary +stats\
113                -Iinclude -Isrc/include -Isrc/base -Isrc
114 .PHONY: splint sync-gforge
115 ##
116 ## Cruft for remote compilation
117 ##
118
119 remote: 
120         @$(top_srcdir)/tools/graspe-master
121
122 endif
123
124 include $(top_srcdir)/acmacro/dist-files.mk