1#! /bin/sh
2# Version: CMPL 1.1
3#
4# The contents of this file are subject to the Cisco-style Mozilla Public
5# License Version 1.1 (the "License"); you may not use this file except
6# in compliance with the License.  You may obtain a copy of the License
7# at www.eclipse-clp.org/license.
8# 
9# Software distributed under the License is distributed on an "AS IS"
10# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See
11# the License for the specific language governing rights and limitations
12# under the License. 
13# 
14# The Original Code is  The ECLiPSe Constraint Logic Programming System. 
15# The Initial Developer of the Original Code is  Cisco Systems, Inc. 
16# Portions created by the Initial Developer are
17# Copyright (C) 2006 Cisco Systems, Inc.  All Rights Reserved.
18# 
19# Contributor(s): 
20# 
21# END LICENSE BLOCK
22
23if test -z "$ECLIPSEARCH"; then
24        echo Please set environment variable ECLIPSEARCH and try again
25        exit -1
26fi
27
28make_directory ()       # <perm> <name>
29{
30    # explicit checking for symlink is for linux, where test is broken
31    if test ! -d $2 && (test "$ECLIPSEARCH" != "i386_linux" || test ! -h $2); then
32        mkdir $2
33        chmod $1 $2
34    fi
35}
36
37install_file ()		# <perm> <file> <dir>
38{
39    echo installing $3/$2
40    cp $2 $3/$2
41    chmod $1 $3/$2
42}
43
44make_directory 2755 $ECLIPSEARCH
45
46if test "$ECLIPSEARCH" = "sun4"; then
47    OBJ_SUFFIX=o make install
48else
49if test "$ECLIPSEARCH" = "i386_nt"; then
50    OBJ_SUFFIX=dll make install_obj
51else
52    OBJ_SUFFIX=so make install
53fi
54fi
55
56