[C-MPI-commits] SF.net SVN: c-mpi:[170]
Status: Pre-Alpha
Brought to you by:
jmwozniak
|
From: <jmw...@us...> - 2011-04-15 19:15:49
|
Revision: 170
http://c-mpi.svn.sourceforge.net/c-mpi/?rev=170&view=rev
Author: jmwozniak
Date: 2011-04-15 19:15:42 +0000 (Fri, 15 Apr 2011)
Log Message:
-----------
Major improvement to build system
Modified Paths:
--------------
Makefile.in
configure.ac
depend.sh
src/cmpi/node.c
test/driver/module.mk.in
Modified: Makefile.in
===================================================================
--- Makefile.in 2011-04-15 19:15:23 UTC (rev 169)
+++ Makefile.in 2011-04-15 19:15:42 UTC (rev 170)
@@ -44,11 +44,9 @@
mandir = $(DESTDIR)@mandir@
exec_prefix = $(DESTDIR)@exec_prefix@
-VPATH = $(srcdir)
SHELL = @SHELL@
INSTALL = @INSTALL@
GNUC = @GNUC@
-INTELC = @INTELC@
# OpenSSL
ifneq (@OPENSSL_LOCATION@,)
@@ -56,10 +54,7 @@
OPENSSL_LIB = @OPENSSL_LOCATION@/lib
endif
-ifneq (@DMALLOC_LOCATION@,)
- DMALLOC_INCLUDE = @DMALLOC_LOCATION@/include
- DMALLOC_LIB = @DMALLOC_LOCATION@/lib
-endif
+ENABLE_TESTS = @ENABLE_TESTS@
# MPI location
MPI = @USE_MPI@
@@ -68,8 +63,6 @@
MPIEXEC = @USE_MPI@/bin/@MPIEXEC@
# MPIARGS = -recvtimeout 10
MPIARGS = @MPIARGS@
-# MPIARGS = -f hosts
-MPDCHECK = tools/mpd-available.zsh @USE_MPI@/bin/mpdlistjobs
# Job launch selection (mpiexec or srun)
ifeq (@HAVE_SRUN@,no)
@@ -262,14 +255,6 @@
# run ./configure --help for information on how to do this cleanly.
LIBCFLAGS = # @LIBCFLAGS@
-# Add gcc-specific flags if we know it is a gnu compiler.
-ifdef GNUC
-CFLAGS += $(GCC_CFLAGS)
-endif
-ifdef INTELC
-CFLAGS += $(INTEL_CFLAGS)
-endif
-
# LIBSRC is source code for libcmpi
LIBSRC :=
# Source code for Kademlia
@@ -338,27 +323,6 @@
include src/cmpi-cp/module.mk
################################################################
-# Derived file lists
-
-# NOTES: At this point, the subdirectory makefile includes have informed
-# us what the source files are. Now we want to generate some
-# other lists (such as objects, executables, and dependency files)
-# by manipulating the lists of source files
-
-# LIBOBJS is a list of objects to put in the client lib
-#LIBOBJS := $(patsubst %.c,%.o, $(filter %.c,$(LIBSRC)))
-
-#DISKSIM_OBJS := $(patsubst %.c,%.o, $(filter %.c,$(DISKSIM_SRC)))
-
-CMPI_OBJS := $(TABLE_OBJS) $(MPIRPC_OBJS) $(CMPI_OBJS)
-# $(DISKSIM_OBJS)
-
-MPIRPC_DEPS := $(patsubst %.o,%.d,$(MPIRPC_OBJS))
-CMPI_DEPS := $(patsubst %.o,%.d,$(CMPI_OBJS))
-
-deps: $(CMPI_DEPS)
-
-################################################################
# Test cases
# Test rules are heavily based on the definitions above
@@ -380,6 +344,30 @@
TEST_DEPS += $(patsubst %.c, %.d, $(TEST_SRC))
TEST_DEPS += $(patsubst %.c, %.d, $(TEST_HELPER_SRC))
+################################################################
+# Derived file lists
+
+# NOTES: At this point, the subdirectory makefile includes have informed
+# us what the source files are. Now we want to generate some
+# other lists (such as objects, executables, and dependency files)
+# by manipulating the lists of source files
+
+# LIBOBJS is a list of objects to put in the client lib
+#LIBOBJS := $(patsubst %.c,%.o, $(filter %.c,$(LIBSRC)))
+
+#DISKSIM_OBJS := $(patsubst %.c,%.o, $(filter %.c,$(DISKSIM_SRC)))
+
+CMPI_OBJS := $(TABLE_OBJS) $(MPIRPC_OBJS) $(CMPI_OBJS)
+# $(DISKSIM_OBJS)
+
+MPIRPC_DEPS := $(patsubst %.o,%.d,$(MPIRPC_OBJS))
+CMPI_DEPS := $(patsubst %.o,%.d,$(CMPI_OBJS))
+ifeq ($(ENABLE_TESTS),yes)
+ CMPI_DEPS += $(TEST_DEPS)
+endif
+
+deps: $(CMPI_DEPS)
+
####################################################################
# Rules and dependencies
@@ -393,20 +381,12 @@
#cmpi-io: $(CMPI_IO)
# Just like dir, but strip the slash off the end, to be pretty.
-# dirname = $(patsubst %/,%,$(dir $(1)))
+dirname = $(patsubst %/,%,$(dir $(1)))
# Generate the canonical in-tree location of a file, given a possibly
# out-of-tree reference.
# canonname = $(patsubst $(srcdir)/%,%,$(call dirname,$(1)))
-# Grab any CFLAGS defined by the make stub for a particular file, and
-# for the directory in which the source resides.
-# modcflags = $(MODCFLAGS_$(call canonname,$(1))) \
-# $(MODCFLAGS_$(patsubst $(srcdir)/%,%,$(1)))
-# -I$(srcdir)/$(call dirname,$(1))
-# modldflags = $(MODLDFLAGS_$(call canonname,$(1))) \
-# $(MODLDFLAGS_$(patsubst $(srcdir)/%,%,$(1)))
-
# CMPI-IO must be enabled in configure --enable-cmpi-io
#$(CMPI_IO): $(CMPI) src/cmpi/cmpi-io.po
# $(Q) " MPICC [PIC] $@"
@@ -467,16 +447,6 @@
.SECONDARY : %.o %.x
-# rule for building shared objects from objects
-#%.po: %.o
-# $(Q) " CC [PIC] $@"
-# $(E)$(CC) $(LIBCFLAGS) $(PICFLAGS) $(call modcflags,$<) $< -c -o $@
-
-# rule for building shared objects
-# %.po: %.c
-# $(Q) " CC [PIC] $@"
-# $(E)$(CC) $(LIBCFLAGS) $(CFLAGS) $(PICFLAGS) $(call modcflags,$<) $< -c -o $@
-
# handy rule to generate cpp-output file, for debugging
.PHONY: FORCE
%.i: %.c FORCE
@@ -554,9 +524,9 @@
# NOTE: we wrap this in ifneq's in order to prevent the
# dependencies from being generated for special targets that don't
# require them
-#ifeq (,$(filter clean distclean dist docs cscope tags nodep,$(MAKECMDGOALS)))
- include $(CMPI_DEPS)
-#endif
+ifeq (,$(filter clean distclean dist docs cscope tags nodep deps,$(MAKECMDGOALS)))
+ -include $(CMPI_DEPS)
+endif
# add this as a make goal to disable rebuilding dependencies
.PHONY: nodep clean
@@ -564,11 +534,12 @@
.PRECIOUS: $(TEST_OUTPUT) %.o
nodep:; @:
-# default rule for generating dependency files
+# default rule for generating dependency files (deps)
%.d: %.c
$(Q) " DEP $@"
# $(E) $(MPICC) -M $(CFLAGS) $(<) | sed -e 's@.*\.o:@@;s@\\@@' > $(@)
- $(E) CC="$(MPICC)" $(srcdir)/depend.sh $(call dirname,$*) $(CFLAGS) $(call modcflags,$<) $< > $@
+ $(E) CC="$(MPICC)" $(srcdir)/depend.sh \
+ $(call dirname, $*) $(CFLAGS) $< > $@
SPLINTOPTS = +posixlib +gnuextensions # -preproc
SPLINT_GS_S := $(shell find . -name "*.gs.s")
@@ -577,17 +548,4 @@
$(Q) " SPLINT splint.out"
$(E) splint $(SPLINTOPTS) $(IFLAGS) -I $(MPI)/include $(CMPI_SRC) > splint.out
-#%.p: %.c
-# $(Q) " CPP $@"
-# $(E) cpp $(IFLAGS) -I $(MPI)/include $(<) > $(@) # || rm -v $(@)
-
-install:: all install_doc
- install -d $(prefix)/include
- install -d $(prefix)/lib
- install -d $(prefix)/bin
-ifdef TARGET_OS_DARWIN
-# TOC needs to be regenerated in libs after they get moved
- ranlib $(patsubst %,$(prefix)/%,$(LIBRARIES))
-endif
-
null:
Modified: configure.ac
===================================================================
--- configure.ac 2011-04-15 19:15:23 UTC (rev 169)
+++ configure.ac 2011-04-15 19:15:42 UTC (rev 170)
@@ -139,6 +139,7 @@
fi
)
+dnl Stop using dmalloc - use valgrind
AC_ARG_WITH(dmalloc,
[ --with-dmalloc Use dmalloc],
if test "x$withval" = "xyes" ; then
@@ -382,6 +383,7 @@
[enable test modules]),
[AC_MSG_RESULT([enabling test modules...])
ENABLE_TESTS="yes"], [])
+AC_SUBST(ENABLE_TESTS)
dnl Disable -rdynamic if we don't have it.
dnl Use it if we can for backtraces.
Modified: depend.sh
===================================================================
--- depend.sh 2011-04-15 19:15:23 UTC (rev 169)
+++ depend.sh 2011-04-15 19:15:42 UTC (rev 170)
@@ -3,6 +3,7 @@
DIR="$1"
shift
if [ -n "$DIR" ] ; then
- DIR="$DIR"/
+ DIR="$DIR"
fi
-exec $CC -M -MG "$@" | sed -e "s@^\(.*\)\.o:@$DIR\1.d $DIR\1.o $DIR\1.po:@"
+
+exec $CC -M -MG "$@" | sed -e "s@^\(.*\)\.o:@$DIR/\1.d $DIR/\1.o:@"
Modified: src/cmpi/node.c
===================================================================
--- src/cmpi/node.c 2011-04-15 19:15:23 UTC (rev 169)
+++ src/cmpi/node.c 2011-04-15 19:15:42 UTC (rev 170)
@@ -23,7 +23,6 @@
void
options(int argc, char* argv[])
{
-
struct option options[] =
{
{"cache", required_argument, NULL, 'c'},
Modified: test/driver/module.mk.in
===================================================================
--- test/driver/module.mk.in 2011-04-15 19:15:23 UTC (rev 169)
+++ test/driver/module.mk.in 2011-04-15 19:15:42 UTC (rev 170)
@@ -1,10 +1,10 @@
DIR := test/driver
-TEST_DRIVER_SRC += test-cmd-quit.c \
- test-cmd-sleep.c \
- test-cmd-put.c \
- test-cmd-get.c
+TEST_DRIVER_SRC += $(DIR)/test-cmd-quit.c \
+ $(DIR)/test-cmd-sleep.c \
+ $(DIR)/test-cmd-put.c \
+ $(DIR)/test-cmd-get.c
TEST_DRIVER_OBJS = $(patsubst %.c, %.o, $(TEST_DRIVER_SRC))
TEST_DRIVER_OUTPUT = test/driver/test-quit.out \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|