head	1.5;
access;
symbols
	charm6_1:1.5
	charm_6_0_1:1.5
	charm6_0_1:1.5
	charm6_0:1.3
	ChaNGa_1-0:1.2
	charm5_9:1.1
	charm_5-4-2:1.1
	charm_5-4-1:1.1;
locks; strict;
comment	@# @;


1.5
date	2009.01.21.20.21.19;	author gzheng;	state Exp;
branches;
next	1.4;
commitid	nFVXLFrBLGzbemzt;

1.4
date	2008.06.25.07.45.43;	author gzheng;	state Exp;
branches;
next	1.3;
commitid	POw5SB0FUbJgNi8t;

1.3
date	2007.06.08.21.15.41;	author gzheng;	state Exp;
branches;
next	1.2;
commitid	5a814669c6f34567;

1.2
date	2005.11.14.04.27.53;	author gzheng;	state Exp;
branches;
next	1.1;

1.1
date	2001.01.29.21.23.12;	author olawlor;	state Exp;
branches;
next	;


desc
@@


1.5
log
@updated environment vars to the latest VC++ 9
@
text
@#!/bin/sh
##############################################################################
# unix2nt_ar: Maps UNIX ar command options to 
# Microsoft Visual C++ 6.0 LIB command line options.
#
# Known bugs: pathnames with spaces may cause quoting problems.
#
# Orion Sky Lawlor, olawlor@@acm.org, 1/24/2001
##############################################################################

# Configurable option: Location of MSDEV
#VCC_DIR="C:/Program Files/Microsoft Visual Studio/Vc98"
if test -z "$VCINSTALLDIR"
then
  VCC_DIR="C:/Program Files/Microsoft Visual Studio 9.0/VC"
else
  VCC_DIR=$VCINSTALLDIR
fi

LIB_CMD="$VCC_DIR/BIN/LIB.EXE"
LIB_OPTS='/nologo'

if [ "x$LIB" = "x" ]
then
	export INCLUDE="$VCC_DIR/include"
	export LIB="$VCC_DIR/lib"
fi

###################################################################
#
#  Utility routines used below
#
###################################################################

# PrintUsage: prints a helpful command-line usage message and quits
# Args: any additional messages
printUsage() {
    echo "Usage: unix2nt_ar <output file> <input files>"
    echo
	echo "Version 1.0, Parallel Programming Lab, UIUC, 2001"
    echo $*
    exit 1
}

# End blows away the temporary files (unless SAVE is true) and exits
# Args: <exit code>
End() {
    exit $1
}

# This procedure prints an error message and exits.
# ("1>&2" redirects the echo output to stderr).
# Args: written to stderr
Abort() {
	echo "unix2nt_ar Fatal Error in directory "`pwd` 1>&2
	echo "   $*" 1>&2
	echo "unix2nt_ar exiting..." 1>&2
	End 1
}

##############################################################################
#
# Parse & convert the arguments
#
##############################################################################

[ $# -lt 2 ] && printUsage "Error: Not enough arguments given."

out=$1
shift
args="/out:$out $@@"

"$LIB_CMD" $LIB_OPTS $args

if [ $? != 0 ]
then
	Abort "Error executing" "$LIB_CMD" $LIB_OPTS $args
fi

exit 0
@


1.4
log
@get VC studio and SDK from environment variables instead of hardcoding default paths.
@
text
@d15 1
a15 1
  VCC_DIR="C:/Program Files/Microsoft Visual Studio 8/VC"
@


1.3
log
@ran dos2unix upon it.
@
text
@d13 6
a18 1
VCC_DIR="C:/Program Files/Microsoft Visual Studio 8/VC"
@


1.2
log
@updated for VC++ 8
@
text
@d3 4
a6 4
# unix2nt_ar: Maps UNIX ar command options to 
# Microsoft Visual C++ 6.0 LIB command line options.
#
# Known bugs: pathnames with spaces may cause quoting problems.
d10 3
a12 3

# Configurable option: Location of MSDEV
#VCC_DIR="C:/Program Files/Microsoft Visual Studio/Vc98"
d14 10
a23 10

LIB_CMD="$VCC_DIR/BIN/LIB.EXE"
LIB_OPTS='/nologo'

if [ "x$LIB" = "x" ]
then
	export INCLUDE="$VCC_DIR/include"
	export LIB="$VCC_DIR/lib"
fi

d34 1
a34 1
    echo
d60 1
a60 1
##############################################################################
d64 12
a75 12
out=$1
shift
args="/out:$out $@@"

"$LIB_CMD" $LIB_OPTS $args

if [ $? != 0 ]
then
	Abort "Error executing" "$LIB_CMD" $LIB_OPTS $args
fi

exit 0
@


1.1
log
@These translate UNIX calls to NT calls--
system_ln maps "ln" to "cp"
unix2nt_ar is a wrapper around Visual C++ "LIB.EXE"
unix2nt_cc is a wrapper around Visual C++ "CL.EXE" and "LINK.EXE"
@
text
@d12 2
a13 1
VCC_DIR="C:/Program Files/Microsoft Visual Studio/Vc98"
@

