From: markls Date: Wed, 8 Aug 2007 12:01:44 +0000 (+0000) Subject: smpicc/smpirun no longer require special envirnment variables. also they're now X-Git-Tag: v3.3~1305 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/65439f04e0b79d6730d8c4d28b62880630b90601 smpicc/smpirun no longer require special envirnment variables. also they're now installed with scripts in the bin directory. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4055 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/Makefile.in b/Makefile.in index 40c81fc145..34bf4bf89c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -39,7 +39,8 @@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/acmacro/dist-files.mk \ - $(top_srcdir)/configure \ + $(top_srcdir)/configure $(top_srcdir)/src/smpi/smpicc.in \ + $(top_srcdir)/src/smpi/smpirun.in \ $(top_srcdir)/testsuite/gras/trp_file_usage.in \ $(top_srcdir)/testsuite/gras/trp_tcp_usage.in AUTHORS COPYING \ ChangeLog INSTALL NEWS TODO config.guess config.sub depcomp \ @@ -61,7 +62,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/gras_config.h CONFIG_CLEAN_FILES = testsuite/gras/trp_tcp_usage \ - testsuite/gras/trp_file_usage + testsuite/gras/trp_file_usage src/smpi/smpicc src/smpi/smpirun SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -276,6 +277,10 @@ testsuite/gras/trp_tcp_usage: $(top_builddir)/config.status $(top_srcdir)/testsu cd $(top_builddir) && $(SHELL) ./config.status $@ testsuite/gras/trp_file_usage: $(top_builddir)/config.status $(top_srcdir)/testsuite/gras/trp_file_usage.in cd $(top_builddir) && $(SHELL) ./config.status $@ +src/smpi/smpicc: $(top_builddir)/config.status $(top_srcdir)/src/smpi/smpicc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +src/smpi/smpirun: $(top_builddir)/config.status $(top_srcdir)/src/smpi/smpirun.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo diff --git a/configure b/configure index 6987aa3631..5c607f87ec 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 1.180 . +# From configure.ac Revision: 1.181 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for simgrid 3.3-cvs. # @@ -26189,24 +26189,22 @@ else fi - if test "x$cflags_set" != "xyes" ; then - # if user didn't specify CFLAGS explicitely - # AC PROG CC tests whether -g is accepted. - # Cool, but it also tries to set -O2. I don't want it with gcc - saveCFLAGS="$CFLAGS" - CFLAGS= - case " $saveCFLAGS " in - *-g*) CFLAGS="-g" ;; - esac - case " $saveCFLAGS " in - *-O2*) test "x$CC" = xgcc || CFLAGS="$CFLAGS -O2" ;; + # Cool, but it also tries to set -O2 and -g. + # I don't want it with gcc, but -O3 and -g2, and optimization only when asked by user + case $CC in + *gcc) + if test "$CFLAGS" = "-g -O2" ; then + CFLAGS="-g3" + fi + if test "$CXXFLAGS" = "-g -O2" ; then + CXXFLAGS="-g3" + fi + if test "$GCJFLAGS" = "-g -O2" ; then + CXXFLAGS="-g3" + fi;; esac - # damn AC PROG CC, why did you set -O?? - CFLAGS="-g" - fi - if test "x$enable_compile_warnings" = "xyes" ; then { echo "$as_me:$LINENO: checking the warning flags for this compiler" >&5 echo $ECHO_N "checking the warning flags for this compiler... $ECHO_C" >&6; } @@ -26225,7 +26223,7 @@ echo $ECHO_N "checking the warning flags for this compiler... $ECHO_C" >&6; } if test "x$enable_compile_warnings" = "xyes"; then warnCFLAGS=`echo $warnCFLAGS -Wmissing-prototypes -Wmissing-declarations \ -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings \ - -Wno-unused-function \ + -Wno-unused-function -Wno-strict-aliasing \ -Werror \ | sed 's/ +/ /g'` # -Wno-unused-variable -Wno-unused-label @@ -27149,6 +27147,8 @@ fi ac_config_files="$ac_config_files examples/Makefile examples/msg/Makefile examples/simdag/Makefile examples/simdag/test_simdag examples/gras/Makefile examples/gras/ping/Makefile examples/gras/rpc/Makefile examples/gras/spawn/Makefile examples/gras/synchro/Makefile examples/gras/timer/Makefile examples/gras/chrono/Makefile examples/gras/mutual_exclusion/simple_token/Makefile examples/gras/mmrpc/Makefile examples/gras/pmm/Makefile examples/gras/all2all/Makefile examples/amok/Makefile examples/amok/bandwidth/Makefile examples/amok/bandwidth/test_sg examples/amok/bandwidth/test_rl examples/amok/saturate/Makefile examples/amok/saturate/test_sg examples/amok/saturate/test_rl" +ac_config_files="$ac_config_files src/smpi/smpicc src/smpi/smpirun" + # GRAMINE_CUT_END @@ -27849,6 +27849,8 @@ do "examples/amok/saturate/Makefile") CONFIG_FILES="$CONFIG_FILES examples/amok/saturate/Makefile" ;; "examples/amok/saturate/test_sg") CONFIG_FILES="$CONFIG_FILES examples/amok/saturate/test_sg" ;; "examples/amok/saturate/test_rl") CONFIG_FILES="$CONFIG_FILES examples/amok/saturate/test_rl" ;; + "src/smpi/smpicc") CONFIG_FILES="$CONFIG_FILES src/smpi/smpicc" ;; + "src/smpi/smpirun") CONFIG_FILES="$CONFIG_FILES src/smpi/smpirun" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} diff --git a/configure.ac b/configure.ac index 3625b3d6ef..08fab5ddd2 100644 --- a/configure.ac +++ b/configure.ac @@ -517,6 +517,10 @@ AC_CONFIG_FILES([ done ]) +AC_CONFIG_FILES([ + src/smpi/smpicc + src/smpi/smpirun +]) # GRAMINE_CUT_END diff --git a/src/Makefile.am b/src/Makefile.am index 712816dd96..99d5edba52 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,6 +7,9 @@ MAINTAINERCLEANFILES=Makefile.in INCLUDES= -I$(top_srcdir)/include -I$(top_srcdir)/src/include + +bin_SCRIPTS= smpi/smpicc smpi/smpirun + EXTRA_DIST= \ \ portable.h \ diff --git a/src/Makefile.in b/src/Makefile.in index bd0d6b4f28..e84979eae9 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -26,6 +26,7 @@ + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -78,7 +79,8 @@ am__vpath_adj = case $$p in \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(jardir)" +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(jardir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libgras_la_LIBADD = @@ -256,6 +258,8 @@ am__testall_SOURCES_DIST = @builddir@/cunit_unit.c \ @GRAMINE_MODE_FALSE@ simgrid_units_main.$(OBJEXT) testall_OBJECTS = $(am_testall_OBJECTS) @GRAMINE_MODE_FALSE@testall_DEPENDENCIES = libgras.la +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -425,6 +429,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ MAINTAINERCLEANFILES = Makefile.in INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src/include +bin_SCRIPTS = smpi/smpicc smpi/smpirun EXTRA_DIST = portable.h xbt/mallocator_private.h xbt/dynar_private.h \ xbt/dict_private.h xbt/heap_private.h xbt/fifo_private.h \ xbt/graph_private.h xbt/graphxml_parse.c xbt/graphxml.l \ @@ -768,6 +773,25 @@ clean-noinstPROGRAMS: testall$(EXEEXT): $(testall_OBJECTS) $(testall_DEPENDENCIES) @rm -f testall$(EXEEXT) $(LINK) $(testall_OBJECTS) $(testall_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ + else :; fi; \ + done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -2055,9 +2079,10 @@ check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) gras_config.h +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \ + gras_config.h installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(jardir)"; do \ + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(jardir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -2114,7 +2139,7 @@ install-data-am: install-jarDATA install-dvi: install-dvi-am -install-exec-am: install-libLTLIBRARIES +install-exec-am: install-binSCRIPTS install-libLTLIBRARIES install-html: install-html-am @@ -2146,7 +2171,8 @@ ps: ps-am ps-am: -uninstall-am: uninstall-jarDATA uninstall-libLTLIBRARIES +uninstall-am: uninstall-binSCRIPTS uninstall-jarDATA \ + uninstall-libLTLIBRARIES .MAKE: install-am install-strip @@ -2155,15 +2181,16 @@ uninstall-am: uninstall-jarDATA uninstall-libLTLIBRARIES clean-noinstPROGRAMS ctags distclean distclean-compile \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-jarDATA \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-jarDATA \ + install install-am install-binSCRIPTS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-jarDATA install-libLTLIBRARIES \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binSCRIPTS uninstall-jarDATA \ uninstall-libLTLIBRARIES \ diff --git a/src/smpi/smpi.h b/src/smpi/smpi.h index 9973f5460b..f19628cf97 100644 --- a/src/smpi/smpi.h +++ b/src/smpi/smpi.h @@ -1,3 +1,5 @@ +#include + #include #include diff --git a/src/smpi/smpicc b/src/smpi/smpicc index 2a4899d22b..1251e8c334 100755 --- a/src/smpi/smpicc +++ b/src/smpi/smpicc @@ -1,11 +1,10 @@ #!/bin/sh #FIXME: .. paths... -SIMGRID_INCLUDE="${SIMGRID_HOME}/include" -SIMGRID_LIB="${SIMGRID_HOME}/lib" +prefix="/home/marklee/progs/pkgs/simgrid-nifty" +exec_prefix="${prefix}" + CC="gcc" -SMPI_INCLUDE="${SMPI_HOME}/include" -SMPI_LIB="${SMPI_HOME}/lib" SEED="221238" TMPDIR="$(mktemp -d tmpXXXXXXX)" @@ -21,7 +20,6 @@ function modsource { cat > ${TMPSOURCE} <