head	2.17;
access;
symbols
	pre-winnt-version:2.8
	charm500:2.7
	charm499:2.7;
locks; strict;
comment	@# @;


2.17
date	2000.12.21.06.14.33;	author milind;	state dead;
branches;
next	2.16;

2.16
date	2000.12.20.23.15.05;	author gzheng;	state Exp;
branches;
next	2.15;

2.15
date	2000.12.20.22.36.49;	author gzheng;	state Exp;
branches;
next	2.14;

2.14
date	2000.08.31.22.02.37;	author milind;	state Exp;
branches;
next	2.13;

2.13
date	2000.07.17.15.00.20;	author milind;	state Exp;
branches;
next	2.12;

2.12
date	2000.07.17.14.36.08;	author milind;	state Exp;
branches;
next	2.11;

2.11
date	2000.07.12.21.26.49;	author milind;	state Exp;
branches;
next	2.10;

2.10
date	2000.07.12.20.22.29;	author milind;	state Exp;
branches;
next	2.9;

2.9
date	2000.07.11.17.38.41;	author milind;	state Exp;
branches;
next	2.8;

2.8
date	99.10.25.22.30.54;	author olawlor;	state Exp;
branches;
next	2.7;

2.7
date	97.07.30.21.04.33;	author rbrunner;	state Exp;
branches;
next	2.6;

2.6
date	96.08.01.21.11.53;	author jyelon;	state Exp;
branches;
next	2.5;

2.5
date	95.07.12.00.05.26;	author jyelon;	state Exp;
branches;
next	2.4;

2.4
date	95.06.15.18.15.09;	author jyelon;	state Exp;
branches;
next	2.3;

2.3
date	95.06.14.22.45.53;	author jyelon;	state Exp;
branches;
next	2.2;

2.2
date	95.06.13.16.20.26;	author jyelon;	state Exp;
branches;
next	2.1;

2.1
date	95.06.13.10.43.42;	author jyelon;	state Exp;
branches;
next	2.0;

2.0
date	95.05.30.18.57.54;	author brunner;	state Exp;
branches;
next	;


desc
@@


2.17
log
@Renamed super_install as build.
@
text
@#!/bin/sh

syntax() {
  echo ''
  echo 'Usage: SUPER-INSTALL <target> <version> [charmc-options ...]'
  echo ''
  echo '<targets>: converse, charm++ libs ampi IDL tsm sm pvm sdag'
  echo '<targets>: doc ps-doc pdf-doc html-doc'
  echo '<versions>: ' 
  ( cd src ; ls -1 | egrep -v '(^Common)|(^CVS)|(^QuickThreads)|(^ccs-client)' | pr -4t )
  echo ''
  echo 'example <charmc-options>: -g -save -verbose'
  echo 'Note: This script is trivial.  It'
  echo ' 1. Creates directories <version> and <version>/tmp';
  echo ' 2. Copies src/Common/scripts/Makefile into <version>/tmp';
  echo ' 3. Does a "make <target> <version> OPTS=<charmc-options>" in <version>/tmp.'
  echo "That's all SUPER_INSTALL does.  The rest is handled by the Makefile."
  exit 1
}

  [ $# -lt 2 ] && syntax

MAKEOPTS=""
OPTS=""

while [ ! $# -eq 0 ]
do
  case "$1" in
    -*) 
          MAKEOPTS="$MAKEOPTS $1"; shift
	  ;;
    *)
          PROGRAM=$1 ; shift
          VERSION=$1 ; shift
          while [ ! $# -eq 0 ]
          do
            OPTS="$OPTS $1"; shift
	  done
	  ;;
  esac
done

[ "x$VERSION" = "x" ] && syntax
	
( echo $VERSION | egrep -s '^Common' ) && syntax
[ -d src/$VERSION ] || goto syntax

[ -d $VERSION ] || echo "Creating dir: $VERSION" 
[ -d $VERSION ] || mkdir $VERSION
[ -d $VERSION/tmp ] || echo "Creating dir: $VERSION/tmp" 
[ -d $VERSION/tmp ] || mkdir $VERSION/tmp
echo "Copying src/Common/scripts/Makefile to $VERSION/tmp"
rm -f $VERSION/tmp/Makefile
ln -s "../../src/Common/scripts/Makefile" $VERSION/tmp/Makefile
echo "Performing 'make $MAKEOPTS $PROGRAM OPTS="$OPTS"' in $VERSION/tmp"
cd $VERSION/tmp ; make $MAKEOPTS $PROGRAM OPTS="$OPTS"
@


2.16
log
@make the help page fit into one page of xterm.
@
text
@@


2.15
log
@format the output of list of versions.
@
text
@d7 4
a10 8
  echo 'targets: converse, charm++ libs ampi IDL tsm sm pvm sdag'
  echo 'targets: doc ps-doc pdf-doc html-doc'
  echo ''
  echo 'versions: ' 
  ( cd src ; ls -1 | egrep -v '(^Common)|(^CVS)|(^QuickThreads)|(^ccs-client)' | sort | pr -4t )
  echo ''
  echo 'example charmc-options: -g -save -verbose'
  echo ''
d12 1
d14 2
a15 3
  echo ''
  echo ' 1. Creates directories <version> and <version>/tmp'
  echo ' 2. Copies src/Common/scripts/Makefile into <version>/tmp'
a16 1
  echo ''
a17 1
  echo ''
@


2.14
log
@Completed integration of documentation into charm cvs tree.
Added appropriate targets for super-install for making different types
(ps, pdf, html) of documentation.
@
text
@d11 1
a11 1
  echo `( cd src ; ls -1 | egrep -v '(^Common)|(^CVS)|(^QuickThreads)|(^ccs-client)' )`
@


2.13
log
@Fixed a stupid shell-script mistake.
@
text
@d8 1
@


2.12
log
@SUPER_INSTALL now takes "-*" arguments prior to the target, that will
be passed to make as "makeflags". This makes it easy to suppress
make's output of commands etc (with the -s flag). As a result of this,
several Makefiles have been massaged.
@
text
@d53 4
a56 2
[ -d $VERSION ] || echo "Creating dir: $VERSION" || mkdir $VERSION
[ -d $VERSION/tmp ] || echo "Creating dir: $VERSION/tmp" || mkdir $VERSION/tmp
@


2.11
log
@Fixed egrep which was showing CVS, and QuickThreads as versions that could be
super-installed.
@
text
@a26 2
  PROGRAM=$1 ; shift
  VERSION=$1 ; shift
d28 21
a48 1
  [ "x$VERSION" = "x" ] && syntax
d50 2
a51 2
  ( echo $2 | egrep -s '^Common' ) && syntax
  [ -d src/$VERSION ] || goto syntax
d53 7
a59 8
  echo "Creating directories: $VERSION and $VERSION/tmp"
  [ -d $VERSION ] || mkdir $VERSION
  [ -d $VERSION/tmp ] || mkdir $VERSION/tmp
  echo "Copying src/Common/scripts/Makefile to $VERSION/tmp"
  rm -f $VERSION/tmp/Makefile
  ln -s "../../src/Common/scripts/Makefile" $VERSION/tmp/Makefile
  echo "Performing 'make $PROGRAM OPTS="$*"' in $VERSION/tmp"
  cd $VERSION/tmp ; make $PROGRAM OPTS="$*"
@


2.10
log
@Fixed a stupid typo.
@
text
@d9 2
a10 1
  echo 'versions: ' `( cd src ; ls -1 | egrep -v '^Common' )`
@


2.9
log
@Modified targets list.
@
text
@d27 1
a27 1
  VERSION=$1 ; shif t
@


2.8
log
@Translated to /bin/sh.  No functionality changes.
@
text
@d7 1
a7 1
  echo 'targets: converse, charm, charm++'
d27 1
a27 1
  VERSION=$1 ; shift
@


2.7
log
@Fixed path for Makefile
@
text
@d1 3
a3 3
#!/bin/csh -f
goto begin
syntax:
d23 1
d25 3
a27 5
begin:

  if ($#argv < 2) goto syntax
  set PROGRAM=$1 ; shift
  set VERSION=$1 ; shift
d29 4
a32 3
  if ( x$VERSION == x ) goto syntax
  if { ( echo $2 | egrep -s '^Common' ) } goto syntax
  if ( ! -d src/$VERSION ) goto syntax
d35 2
a36 2
  if (! -d $VERSION     ) mkdir $VERSION
  if (! -d $VERSION/tmp ) mkdir $VERSION/tmp
d39 1
a39 1
  ln -s ../../src/Common/scripts/Makefile $VERSION/tmp/Makefile
a41 1

@


2.6
log
@*** empty log message ***
@
text
@d17 1
a17 1
  echo ' 2. Copies src/Common/Makefile into <version>/tmp'
d37 1
a37 1
  echo "Copying src/Common/Makefile to $VERSION/tmp"
d39 1
a39 1
  ln -s ../../src/Common/Makefile $VERSION/tmp/Makefile
@


2.5
log
@*** empty log message ***
@
text
@d25 1
@


2.4
log
@*** empty log message ***
@
text
@d5 1
a5 1
  echo 'Usage: SUPER-INSTALL <make-target> <version> [charmc-options ...]'
d7 1
a7 1
  echo 'example make-targets: converse, charm, charm++'
d9 1
a9 1
  echo 'example versions: net-sun, net-sol, cm5, paragon, etc...'
d16 3
a18 3
  echo '    1. Creates directories $VERSION and $VERSION/tmp'
  echo '    2. Copies src/Common/Makefile into $VERSION/tmp'
  echo '    3. Does a 'make $PROGRAM OPTS="$*"' in $VERSION/tmp.'
d20 1
a20 1
  echo ' That's all SUPER_INSTALL does.  The rest is handled by the Makefile.'
d25 1
@


2.3
log
@*** empty log message ***
@
text
@d2 1
a2 51
#
# The syntax of this script is:
#
#    SUPER-INSTALL program version <operation>
#
# Where program is: converse, charm, charm++
# Where version is: net-sun, net-sol, cm5, paragon, etc...
# Where operation can be: gather make install all (defaults to all)
#
# Some versions of charm are interrelated.  For example, net-sun, net-sol,
# and net-hp all belong to a group of versions called the "net" group.
# Likewise, uni-sun, uni-sol, and uni-hp belong to a group of versions
# called the "uni" group.  The group name can always be found by truncating
# the version name before the dash.
#
# Converse contains the following directories:
#
#    src/Common         - contains source common to all versions
#    src/Common.$GROUP  - contains source common to a group of versions
#    src/$VERSION       - contains source for a specific version
#
#    $VERSION/tmp       - used to build the specified version
#    $VERSION/lib       - used to hold object files once compiled.
#    $VERSION/bin       - used to hold binary files once compiled.
#    $VERSION/include   - used to hold include files
#
# To compile a version of Converse, SUPER_INSTALL performs the following
# actions:
#
#    * Create directory $VERSION and $VERSION/tmp.
#
#    * Copy all source files from src/Common          to $VERSION/tmp
#    * Copy all source files from src/Common.$GROUP   to $VERSION/tmp
#    * Copy all source files from src/$VERSION        to $VERSION/tmp
#
#    * Perform "make $PROGRAM" in $VERSION/tmp
#
# That's all SUPER_INSTALL does.  The rest is handled by the Makefile.
#

set PROGRAM=$1
set VERSION=$2
set OPERATION=$3

if ( x$OPERATION == x ) set OPERATION=all

if ( x$VERSION == x ) goto syntax
if { ( echo $2 | egrep -s '^Common' ) } goto syntax
if ( ! -d src/$VERSION ) goto syntax
goto install

d4 36
a39 47

    echo ''
    echo 'Usage: SUPER-INSTALL program version'
    echo ''
    echo 'Where program can be: converse charm charm++'
    echo 'Where the available versions are: '
    echo ''
    (cd src ; ls -1 | egrep -v '^Common')
    echo ''
    exit

install:

    #Compute what GROUP of versions we are using:
    set GROUP=Common.`echo $VERSION | sed -e 's@@-.*@@@@'`

    if (( $OPERATION == gather ) || ( $OPERATION == all )) then
       echo "Creating directories for $VERSION..."
       if (! -d $VERSION        ) mkdir $VERSION
       if (! -d $VERSION/bin    ) mkdir $VERSION/bin
       if (! -d $VERSION/lib    ) mkdir $VERSION/lib
       if (! -d $VERSION/include) mkdir $VERSION/include
       if (! -d $VERSION/tmp    ) mkdir $VERSION/tmp
       cd $VERSION/tmp
       echo "Copying all files in src/Common to $VERSION/tmp..."
       find ../../src/Common -type f \! -name "*,v" -exec ln -s {} . \;
       if (-d ../../src/$GROUP) then
          echo "Copying all files in src/$GROUP to $VERSION/tmp..."
          find ../../src/$GROUP -type f \! -name "*,v" -exec ln -s {} . \;
       endif
       echo "Copying all files in src/$VERSION to $VERSION/tmp..."
       find ../../src/$VERSION -type f \! -name "*,v" -exec ln -s {} . \;
       cd ../..
    endif

    if (( $OPERATION == make ) || ( $OPERATION == all )) then
       cd $VERSION/tmp
       echo "Performing 'make $PROGRAM' in $VERSION/tmp"
       make $PROGRAM
       cd ../..
    endif

    echo "Relinking central bin directory."
    rm -f bin 
    ln -s $VERSION/bin bin

    exit
@


2.2
log
@*** empty log message ***
@
text
@d31 1
a31 1
#    * Create directory $VERSION and its subdirectories.
d39 1
a39 3
#    * Copy the results to $VERSION/bin, $VERSION/lib, $VERSION/include.
#
#    * Rebuild central "bin" directory.
a40 2
# That's all SUPER_INSTALL does.  The rest is handled by the Makefile.
# 
d96 3
a98 28
    if (( $OPERATION == install ) || ( $OPERATION == all )) then
      echo "Copying libconv-*   from $VERSION/tmp to $VERSION/lib"
      find $VERSION/tmp -type f -name "libconv-*"   -exec cp {} $VERSION/lib \;
      echo "Copying libck?-*    from $VERSION/tmp to $VERSION/lib"
      find $VERSION/tmp -type f -name "libck?-*"    -exec cp {} $VERSION/lib \;
      echo "Copying libcharm.a  from $VERSION/tmp to $VERSION/lib"
      find $VERSION/tmp -type f -name "libcharm.a"  -exec cp {} $VERSION/lib \;
      echo "Copying *.h         from $VERSION/tmp to $VERSION/include"
      find $VERSION/tmp -name "*.h"       -exec cp {} $VERSION/include \;
      echo "Copying *.int       from $VERSION/tmp to $VERSION/include"
      find $VERSION/tmp -name "*.int"     -exec cp {} $VERSION/include \;
      echo "Copying conv-*.mk   from $VERSION/tmp to $VERSION/include"
      find $VERSION/tmp -name "conv-*.mk" -exec cp {} $VERSION/include \;
      echo "Copying conv-*.sh   from $VERSION/tmp to $VERSION/include"
      find $VERSION/tmp -name "conv-*.sh" -exec cp {} $VERSION/include \;
      echo "Copying conv-*.csh  from $VERSION/tmp to $VERSION/include"
      find $VERSION/tmp -name "conv-*.csh" -exec cp {} $VERSION/include \;
      echo "Copying conv*       from $VERSION/tmp to $VERSION/bin"
      find $VERSION/tmp -type f -name "conv*" -perm -500 -exec cp {} $VERSION/bin \;
      echo "Copying charm*      from $VERSION/tmp to $VERSION/bin"
      find $VERSION/tmp -type f -name "charm*" -perm -500 -exec cp {} $VERSION/bin \;
      echo "Copying charmc      from $VERSION/tmp to $VERSION/bin"
      cp $VERSION/tmp/charmc $VERSION/bin/charmc

      echo "Relinking central bin directory."
      rm -f bin 
      ln -s $VERSION/bin bin
    endif
@


2.1
log
@*** empty log message ***
@
text
@d101 4
a104 4
      echo "Copying libconv-*.a from $VERSION/tmp to $VERSION/lib"
      find $VERSION/tmp -type f -name "libconv-*.a" -exec cp {} $VERSION/lib \;
      echo "Copying libck?-*.a  from $VERSION/tmp to $VERSION/lib"
      find $VERSION/tmp -type f -name "libck?-*.a"  -exec cp {} $VERSION/lib \;
@


2.0
log
@Reorganized directory structure
@
text
@a25 1
#    $VERSION/make      - used to hold make-include files
a44 16
# Note: As SUPER_INSTALL copies files from the src directories to the
# tmp directory, two of the files that happen to get copied are Makefile
# and converse.mk.  Makefile comes from src/Common, and converse.mk comes
# from src/$VERSION.  Together, these form the makefile that gets used in
# the "make all".  The contents of converse.mk is fully specified: it
# must define exactly the following symbols:
#
#   <put symbols here>
#
# It must also contain rules for making cmk_extras, cmk_clean, and
# cmk_install.  Those three rules can be used to compile and install
# any machine-specific utilities (eg, a host program or something like
# that).  converse.mk must not define anything else (the intention is
# that the converse-user, eg charm, can include converse.mk in his own
# makefiles as well).
#
d105 2
d109 2
@
