From: mquinson Date: Tue, 26 Sep 2006 08:21:29 +0000 (+0000) Subject: Implement GRAMINE X-Git-Tag: v3.3~2545 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ea5f54682849bf0a59ebe0ff8a0c000b21803742?hp=8c66de3552065e9a3cb2c258cdf5158dab99de9d Implement GRAMINE git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2814 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/Makefile.am b/Makefile.am index fd58ba8a06..2f656abe39 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,14 +1,20 @@ -SUBDIRS= include src tools testsuite examples doc -DISTCLEANFILES = *~ - -ACLOCAL = aclocal-1.9 -I acmacro -AUTOMAKE_OPTIONS = gnu +# GRAMINE_CUT_BEGIN +SG_SUBDIRS= tools testsuite examples doc -EXTRA_DIST = bootstrap COPYING INSTALL NEWS README README.IEEE TODO AUTHORS ChangeLog \ +SG_EXTRA_DIST = bootstrap COPYING INSTALL NEWS README README.IEEE TODO AUTHORS ChangeLog \ acmacro/aci.m4 \ tools/graspe-slave.in \ tools/MSG_visualization \ tools/MSG_visualization/colorize.pl +# GRAMINE_CUT_END + +SUBDIRS= include src $(SG_SUBDIRS) +EXTRA_DIST=$(SG_EXTRA_DIST) + +DISTCLEANFILES = *~ + +ACLOCAL = aclocal-1.9 -I acmacro +AUTOMAKE_OPTIONS = gnu SOURCE_FILES = $(shell find . -name "*.[ch]") TAGS: $(SOURCE_FILES) @@ -16,7 +22,25 @@ TAGS: $(SOURCE_FILES) tags: TAGS - +gramine: + rm -rf gramine-@VERSION@ + @echo "# Setup sources..." + for n in `find include src -name '*.[chl]'`; do \ + mkdir -p gramine-@VERSION@/`dirname $$n`; \ + cp $$n gramine-@VERSION@/`dirname $$n`; \ + done + @echo "# Copy sources to be generated by configury" + cp src/ucontext_stack.h.in src/gras_config.h.in gramine-@VERSION@/src + @echo "# Remove sources being part of the testsuite" + rm gramine-@VERSION@/src/*_unit.c + @echo "# Adapt the configury mechanism to the gramine context" + mkdir gramine-@VERSION@/acmacro + for n in configure Makefile.in src/Makefile.in include/Makefile.in ; do \ + sed -e '/^# GRAMINE_CUT_BEGIN/,/^# GRAMINE_CUT_END/d' \ + -e 's/gramine_mode=no/gramine_mode=yes/' $$n > gramine-@VERSION@/$$n; \ + done + chmod +x gramine-@VERSION@/configure + if MAINTAINER_MODE ## diff --git a/configure.ac b/configure.ac index d05da40c66..14c91b4c19 100644 --- a/configure.ac +++ b/configure.ac @@ -198,6 +198,16 @@ AC_SUBST([GRAS_DEP]) ## (must be placed after any compilation tests since our overprotective flags ## let some tests fail) +# Check whether we are doing a regular build or a GRAMINE (minimal) one +# Next line is modified by sed when building gramine source tree +gramine_mode=no +if test x$gramine_mode = xyes +then + USE_MAINTAINER_MODE=no +fi +AM_CONDITIONAL(GRAMINE_MODE,test x$gramine_mode != xno) + + AM_MAINTAINER_MODE if test x$USE_MAINTAINER_MODE = xyes then @@ -223,6 +233,7 @@ AC_CHECK_PROG(BASH, bash, `which bash`, /bin/sh) WARNING="This file is generated, do not edit" AC_SUBST(WARNING) + # Can we rebuild the parsers? # We really want flex and refuse other lex. So, the parser is portable and # does not induce extra lib dependency @@ -270,6 +281,8 @@ AC_CONFIG_FILES([ src/ucontext_stack.h ]) +# GRAMINE_CUT_BEGIN + # Testsuite AC_CONFIG_FILES([ @@ -346,6 +359,7 @@ AC_CONFIG_FILES([ # examples/gras/alnem/Makefile examples/gras/alnem/test_sg +# GRAMINE_CUT_END AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index 68941cc190..707aeee0ae 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -104,7 +104,6 @@ VERSION_INFO= -version-info 0:0:0 # using this trick is ready for a "stable" release (say, in Debian). lib_LTLIBRARIES= libsimgrid.la libgras.la -noinst_PROGRAMS=testall COMMON_SRC=\ \ @@ -189,6 +188,8 @@ AMOK_SRC= \ amok/Bandwidth/bandwidth.c amok/Bandwidth/saturate.c \ amok/PeerManagement/peermanagement.c +if GRAMINE_MODE +else ### ### Testing infrastructure ### @@ -202,6 +203,7 @@ AMOK_SRC= \ # Suites and tests run in the given order. +noinst_PROGRAMS=testall TEST_CFILES=xbt/cunit.c xbt/ex.c \ xbt/dynar.c xbt/dict.c xbt/set.c xbt/swag.c \ xbt/config.c @@ -218,7 +220,7 @@ testall_SOURCES= $(TEST_UNITS) simgrid_units_main.c testall_LDADD=libgras.la TESTS=testall -EXTRA_DIST+=$(testall_SOURCES) +EXTRA_DIST+=$t(estall_SOURCES) if MAINTAINER_MODE cunit_unit.c: xbt/cunit.c @@ -290,6 +292,7 @@ $(top_srcdir)/include/xbt/graphxml.h xbt/graphxml.l: $(top_srcdir)/src/xbt/graph @exit 1 endif endif +endif ### ### Declare the library content