Changeset 1055


Ignore:
Timestamp:
Jun 23, 2008, 1:15:25 PM (16 years ago)
Author:
gah
Message:
 
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r1049 r1055  
    739739PYTHON_DISTUTILS
    740740RUBY
    741 SVN_VERSION
    742741RP_BASE
    743742SHLIB_LDFLAGS
     
    18871886
    18881887
     1888
     1889set -e
    18891890
    18901891#------------------------------------------------------------------------
     
    88388839PYTHON_LIB=""
    88398840PYTHON_LIBDIR=""
     8841PYTHON_SITE_DIR=""
    88408842PYTHON_SITE_PACKAGES=""
    8841 PYTHON_SITE_DIR=""
    88428843PYTHON_VERSION=""
    88438844pythondir=""
     
    89378938  { $as_echo "$as_me:$LINENO: checking for python distutils" >&5
    89388939$as_echo_n "checking for python distutils... " >&6; }
    8939   python_result="`${PYTHON} -c 'import distutils;' 2>&1`"
    8940   if test "x${python_result}" = "x" ; then
     8940  ${PYTHON} -c "from distutils.core import setup; setup(name='test')" \
     8941        build build_ext 2>&1 > /dev/null
     8942  if test $? = 0 ; then
    89418943    PYTHON_DISTUTILS="yes"
    89428944  else
     
    89538955$as_echo_n "checking for Python include path... " >&6; }
    89548956    if test "x${PYTHON_CPPFLAGS}" = "x"; then
    8955       python_path=`${PYTHON} -c "import distutils.sysconfig; \
     8957      incdir_path=`${PYTHON} -c "import distutils.sysconfig; \
    89568958       print distutils.sysconfig.get_python_inc();"`
    8957       if test -n "${python_path}"; then
    8958         python_path="-I$python_path"
     8959      if test -n "${incdir}"; then
     8960        python_path="-I${incdir}"
    89598961      fi
    89608962      PYTHON_CPPFLAGS=$python_path
     
    89798981
    89808982echo "PYTHON=${PYTHON}"
     8983echo "PYTHON_CPPFLAGS=${PYTHON_CPPFLAGS}"
     8984echo "PYTHON_DISTUTILS=${PYTHON_DISTUTILS}"
    89818985echo "PYTHON_INCLUDES=${PYTHON_INCLUDES}"
    8982 echo "PYTHON_DISTUTILS=${PYTHON_DISTUTILS}"
    8983 echo "PYTHON_CPPFLAGS=${PYTHON_CPPFLAGS}"
     8986echo "PYTHON_LDFLAGS=${PYTHON_LDFLAGS}"
     8987echo "PYTHON_LIB=${PYTHON_LIB}"
     8988echo "PYTHON_LIBDIR=${PYTHON_LIBDIR}"
     8989echo "PYTHON_SITE_DIR=${PYTHON_SITE_DIR}"
    89848990echo "PYTHON_SITE_PACKAGES=${PYTHON_SITE_PACKAGES}"
    8985 echo "PYTHON_SUBDIR=${PYTHON_SUBDIR}"
    8986 echo "PYTHON_SITE_DIR=${PYTHON_SITE_DIR}"
    89878991echo "PYTHON_VERSION=${PYTHON_VERSION}"
    89888992echo "pythondir=${pythondir}"
     
    90619065fi
    90629066
    9063 SVN_VERSION=`svnversion $srcdir`
    9064 
    90659067{ $as_echo "$as_me:$LINENO: result: ${RUBY}" >&5
    90669068$as_echo "${RUBY}" >&6; }
     
    91869188fi
    91879189
     9190ac_configure_args="--disable-threads --enable-shared"
    91889191
    91899192
  • trunk/configure.in

    r1050 r1055  
    11AC_INIT([Rappture], [1.1], [rappture@nanohub.org])
     2
     3set -e
    24
    35#------------------------------------------------------------------------
     
    312314PYTHON_LIB=""
    313315PYTHON_LIBDIR=""
     316PYTHON_SITE_DIR=""
    314317PYTHON_SITE_PACKAGES=""
    315 PYTHON_SITE_DIR=""
    316318PYTHON_VERSION=""
    317319pythondir=""
     
    366368
    367369  AC_MSG_CHECKING([for python distutils])
    368   python_result="`${PYTHON} -c 'import distutils;' 2>&1`"
    369   if test "x${python_result}" = "x" ; then
     370  ${PYTHON} -c "from distutils.core import setup; setup(name='test')" \
     371        build build_ext 2>&1 > /dev/null
     372  if test $? = 0 ; then
    370373    PYTHON_DISTUTILS="yes"
    371374  else
     
    380383    AC_MSG_CHECKING([for Python include path])
    381384    if test "x${PYTHON_CPPFLAGS}" = "x"; then
    382       python_path=`${PYTHON} -c "import distutils.sysconfig; \
     385      incdir_path=`${PYTHON} -c "import distutils.sysconfig; \
    383386       print distutils.sysconfig.get_python_inc();"`
    384       if test -n "${python_path}"; then
    385         python_path="-I$python_path"
     387      if test -n "${incdir}"; then
     388        python_path="-I${incdir}"
    386389      fi
    387390      PYTHON_CPPFLAGS=$python_path
     
    405408
    406409echo "PYTHON=${PYTHON}"
     410echo "PYTHON_CPPFLAGS=${PYTHON_CPPFLAGS}"
     411echo "PYTHON_DISTUTILS=${PYTHON_DISTUTILS}"
    407412echo "PYTHON_INCLUDES=${PYTHON_INCLUDES}"
    408 echo "PYTHON_DISTUTILS=${PYTHON_DISTUTILS}"
    409 echo "PYTHON_CPPFLAGS=${PYTHON_CPPFLAGS}"
     413echo "PYTHON_LDFLAGS=${PYTHON_LDFLAGS}"
     414echo "PYTHON_LIB=${PYTHON_LIB}"
     415echo "PYTHON_LIBDIR=${PYTHON_LIBDIR}"
     416echo "PYTHON_SITE_DIR=${PYTHON_SITE_DIR}"
    410417echo "PYTHON_SITE_PACKAGES=${PYTHON_SITE_PACKAGES}"
    411 echo "PYTHON_SITE_DIR=${PYTHON_SITE_DIR}"
    412418echo "PYTHON_VERSION=${PYTHON_VERSION}"
    413419echo "pythondir=${pythondir}"
     
    478484fi
    479485
     486ac_configure_args="--disable-threads --enable-shared"
    480487AC_CONFIG_SUBDIRS( [packages/optimizer/src] )
    481488
  • trunk/examples/Makefile.in

    r1044 r1055  
    2626                zoo
    2727
     28
     29.PHONY:         $(SUBDIRS)
     30
    2831all:  build
    2932
     
    3841          $(INSTALL) -m 555 $$i $(destdir) ; \
    3942        done
    40         for i in $(SUBDIRS); do \
     43        for i in $(SUBDIRS) ; do \
    4144            $(MAKE) -C $$i install || exit 1 ; \
    4245        done
    4346
    4447clean:
    45         for i in $(SUBDIRS); do \
     48        for i in $(SUBDIRS) ; do \
    4649            $(MAKE) -C $$i clean || exit 1 ; \
    4750        done
    4851
    4952distclean: clean
    50         for i in $(SUBDIRS); do \
     53        for i in $(SUBDIRS) ; do \
    5154            $(MAKE) -C $$i distclean || exit 1 ; \
    5255        done
  • trunk/examples/demo.bash.in

    r1018 r1055  
    1616
    1717echo "7 examples will be shown-->"
    18 for i in $dirs
    19 do
    20         echo $exdir/$i
    21         cd $exdir/$i
    22         $rpdir/bin/rappture
     18for i in $dirs ; do
     19    echo $exdir/$i
     20    cd $exdir/$i
     21    $rpdir/bin/rappture
    2322done
    2423
  • trunk/lang/Makefile.in

    r1049 r1055  
    2323
    2424# Rappture requires we always build a Tcl language API.
    25 LANGS = target_tcl
     25LANGS = tcl
    2626
    2727ifneq ($(MKOCTFILE),)
    28   LANGS += target_octave
     28  LANGS += octave
    2929endif
    3030ifneq ($(MEX),)
    31   LANGS += target_matlab
     31  LANGS += matlab
    3232endif
    3333ifneq ($(PERL),)
    34   LANGS += target_perl
     34  LANGS += perl
    3535endif
    3636ifeq ($(PYTHON_DISTUTILS),yes)
    37   LANGS += target_python
     37  LANGS += python
    3838endif
    3939ifneq ($(RUBY),)
    40 #  LANGS += target_ruby
     40#  LANGS += ruby
    4141endif
    4242
    43 BUILD_TARGETS = $(patsubst target_%,build_%,$(LANGS))
    44 INSTALL_TARGETS = $(patsubst target_%,install_%,$(LANGS))
     43.PHONY: tcl octave matlab perl python ruby
    4544
    46 all:    $(BUILD_TARGETS)
     45all:   
     46        for i in $(LANGS) ; do \
     47          $(MAKE) -C $$i all || exit 1 ;\
     48        done
    4749
    48 install: $(INSTALL_TARGETS)
     50install:
     51        for i in $(LANGS) ; do \
     52          $(MAKE) -C $$i install || exit 1 ;\
     53        done
    4954
    50 build_python:
    51         $(MAKE) -C python all
    52 build_perl:
    53         $(MAKE) -C perl all
    54 build_tcl:
    55         $(MAKE) -C tcl all
    56 build_matlab:
    57         $(MAKE) -C matlab all
    58 build_octave:
    59         $(MAKE) -C octave all
    60 build_ruby:
    61         $(MAKE) -C ruby all
     55test:
     56        for i in $(LANGS) ; do \
     57          $(MAKE) -C $$i test || exit 1 ;\
     58        done
    6259
    63 install_python:
    64         $(MAKE) -C python install
    65 install_perl:
    66         $(MAKE) -C perl install
    67 install_tcl:
    68         $(MAKE) -C tcl install
    69 install_matlab:
    70         $(MAKE) -C matlab install
    71 install_octave:
    72         $(MAKE) -C octave install
    73 install_ruby:
    74         $(MAKE) -C ruby install
    75 
    76 clean:
    77         $(MAKE) -C matlab clean
    78         $(MAKE) -C octave clean
    79         $(MAKE) -C perl clean
    80         $(MAKE) -C python clean
    81         $(MAKE) -C ruby clean
    82         $(MAKE) -C tcl clean
     60clean:
     61        for i in $(LANGS) ; do \
     62          $(MAKE) -C $$i clean ;\
     63        done
    8364
    8465distclean:
    85         $(MAKE) -C matlab distclean
    86         $(MAKE) -C octave distclean
    87         $(MAKE) -C perl distclean
    88         $(MAKE) -C python distclean
    89         $(MAKE) -C ruby distclean
    90         $(MAKE) -C tcl distclean
     66        for i in $(LANGS) ; do \
     67          $(MAKE) -C $$i distclean ;\
     68        done
    9169        $(RM) Makefile *~
  • trunk/src/core/Makefile.in

    r1051 r1055  
    9090                xerror.h
    9191
    92 # Build the scew library directly into Rappture for now. 
     92# Build the scew and b64 libraries directly into Rappture for now. 
    9393# Note: This works because of viewpath-ing. See the VPATH variable.
    9494B64_OBJS        = \
  • trunk/src/core/RpDXWriter.cc

    r1051 r1055  
    3030    _origin(NULL)
    3131{
    32     _delta  = (float*) malloc(_rank*_rank*sizeof(float));
     32    _delta  = (float*) malloc(_rank * _rank* sizeof(float));
    3333    if (_delta == NULL) {
    3434        fprintf(stderr,
    35             "Error allocating %d bytes, for _delta, inside DXWriter Constructor\n",
    36             _rank*_rank*sizeof(float));
     35            "Error allocating %lu bytes, for _delta, inside DXWriter Constructor\n",
     36                (unsigned long)(_rank *_rank * sizeof(float)));
    3737            return;
    3838    }
     
    5252    if (_origin == NULL) {
    5353        fprintf(stderr,
    54             "Error allocating %d bytes, for _origin, inside DXWriter Constructor\n",
    55             _rank*sizeof(float));
     54            "Error allocating %lu bytes, for _origin, inside DXWriter Constructor\n",
     55                (unsigned long)(_rank * sizeof(float)));
    5656            return;
    5757    }
     
    7373    if (_delta == NULL) {
    7474        fprintf(stderr,
    75             "Error allocating %d bytes, for _delta, inside DXWriter Constructor\n",
    76             _rank*_rank*sizeof(float));
     75            "Error allocating %lu bytes, for _delta, inside DXWriter Constructor\n",
     76                (unsigned long)(_rank * _rank * sizeof(float)));
    7777            return;
    7878    }
     
    9292    if (_origin == NULL) {
    9393        fprintf(stderr,
    94             "Error allocating %d bytes, for _origin, inside DXWriter Constructor\n",
    95             _rank*sizeof(float));
     94            "Error allocating %lu bytes, for _origin, inside DXWriter Constructor\n",
     95                (unsigned long)(_rank*sizeof(float)));
    9696            return;
    9797    }
     
    119119DXWriter::origin(float* o)
    120120{
    121     float *tmp = NULL;
    122     size_t nbytes = 0;
    123 
    124121    if (o == NULL) {
    125122        return *this;
    126123    }
    127 
    128     nbytes = _rank*sizeof(float);
    129     tmp = (float*) malloc(nbytes);
     124    size_t nbytes = _rank * sizeof(float);
     125    float *tmp = (float*) malloc(nbytes);
    130126    if (tmp == NULL) {
    131         fprintf(stderr,"Unable to malloc %d bytes inside DXWriter::origin\n",
    132             nbytes);
     127        fprintf(stderr,"Unable to malloc %lu bytes inside DXWriter::origin\n",
     128                (unsigned long)nbytes);
    133129        return *this;
    134130    }
     
    147143DXWriter::delta(float* d)
    148144{
    149     float *tmp = NULL;
    150     size_t nbytes = 0;
    151 
    152145    if (d == NULL) {
    153146        return *this;
    154147    }
    155148
    156     nbytes = pow(_rank,2)*sizeof(float);
    157     tmp = (float*) malloc(nbytes);
     149    size_t nbytes = _rank * _rank * sizeof(float);
     150    float *tmp = (float*)malloc(nbytes);
    158151    if (tmp == NULL) {
    159         fprintf(stderr,"Unable to malloc %d bytes inside DXWriter::delta\n",
    160             nbytes);
     152        fprintf(stderr,"Unable to malloc %lu bytes inside DXWriter::delta\n",
     153                (unsigned long)nbytes);
    161154        return *this;
    162155    }
     
    175168DXWriter::counts(size_t *p)
    176169{
    177     size_t *tmp = NULL;
    178     size_t nbytes = 0;
    179 
    180170    if (p == NULL) {
    181171        return *this;
    182172    }
    183 
    184     nbytes = _rank*sizeof(size_t);
    185     tmp = (size_t*) malloc(nbytes);
     173    size_t nbytes = _rank * sizeof(size_t);
     174    size_t *tmp = (size_t*) malloc(nbytes);
    186175    if (tmp == NULL) {
    187         fprintf(stderr,"Unable to malloc %d bytes inside DXWriter::pos\n",
    188             nbytes);
     176        fprintf(stderr,"Unable to malloc %lu bytes inside DXWriter::pos\n",
     177                (unsigned long)nbytes);
    189178        return *this;
    190179    }
     
    196185
    197186    _positions = tmp;
    198 
    199187    return *this;
    200188}
     
    241229    dxfile.append("object 1 class gridpositions counts",35);
    242230    for (size_t i=0; i < _rank; i++) {
    243         sprintf(b, " %10d",_positions[i]);
     231        sprintf(b, " %10lu", (unsigned long)_positions[i]);
    244232        dxfile.append(b,11);
    245233    }
     
    261249    dxfile.append("\nobject 2 class gridconnections counts", 38);
    262250    for (size_t i=0; i < _rank; i++) {
    263         sprintf(b, " %10d",_positions[i]);
     251        sprintf(b, " %10lu",(unsigned long)_positions[i]);
    264252        dxfile.append(b,11);
    265253    }
  • trunk/src/core/RpSimpleBuffer.h

    r1051 r1055  
    412412
    413413    if (buf == NULL) {
    414         fprintf(stderr,"Can't allocate %i bytes of memory\n",nbytes);
     414        fprintf(stderr,"Can't allocate %lu bytes of memory\n",
     415                (long unsigned int)nbytes);
    415416        _fileState = false;
    416417        return 0;
  • trunk/src/core2/Makefile.in

    r1054 r1055  
     1
    12# Makefile for Rappture2
    23# Copyright (C) 2004-2007 Derrick S. Kearney.
Note: See TracChangeset for help on using the changeset viewer.