summaryrefslogtreecommitdiff
path: root/java/eclipse/files/swt-motif-build.sh
blob: 7e6ed8a8592fbcabff6b29b9fd5cde6d28604fee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#*******************************************************************************
# Copyright (c) 2000, 2004 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Common Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/cpl-v10.html
# 
# Contributors:
#     IBM Corporation - initial API and implementation
#     Kevin Cornell (Rational Software Corporation)
#     Tom Tromey (Red Hat, Inc.)
#     Sridhar Bidigalu (ICS)
#*******************************************************************************

#!/bin/sh

# Determine the operating system being built
OS=`uname -s`

# build according to the operating system
case $OS in

    "AIX")
        if  [ "$1" = "clean" ]; then
            make -f make_aix.mak clean
        else
            echo "Building AIX version of SWT and CDE DLLs."
            make -f make_aix.mak make_swt
            make -f make_aix.mak make_cde
        fi
        ;;

    "FreeBSD")
        if  [ "$1" = "clean" ]; then
            gmake -f make_freebsd.mak clean
        else
            echo "Building FreeBSD version of SWT and GNOME DLLs."
            gmake -f make_freebsd.mak ${1} ${2} ${3} ${4}
            build_kde=`pkg_info -xc kdebase | grep "no packages match"`
            if [ "$build_kde" != "" ]; then
                echo "Building FreeBSD version of KDE DLL."
                gmake -f make_freebsd.mak make_kde
            fi
        fi
        ;;

    "Linux")
        if  [ "$1" = "clean" ]; then
            make -f make_linux.mak clean
        else
            echo "Building Linux version of SWT and GNOME DLLs."
            make -f make_linux.mak make_swt make_awt make_gnome make_gtk

            build_kde=`rpm -q kdebase | grep "not installed"`
            if [ "$build_kde" = "" ]; then
                echo "Building Linux version of KDE DLL."
                make -f make_linux.mak make_kde
            fi
        fi
        ;;

    "SunOS")
        if  [ "$1" = "clean" ]; then
            make -f make_solaris.mak clean
        else
            echo "Building Solaris version of SWT and CDE DLLs."
            make -f make_solaris.mak make_swt
            make -f make_solaris.mak make_cde
        fi
        ;;

        "HP-UX")
        # Determine the model number system being built
        MODEL=`uname -m`
       
        case $MODEL in

        "ia64")
           # ia64 based systems
           if  [ "$1" = "clean" ]; then
               make -f make_hpux_ia64.mak clean
           else
               echo "Building HP-UX ia64 version of SWT and CDE DLLs."
               make -f make_hpux_ia64.mak make_swt
               make -f make_hpux_ia64.mak make_cde
           fi
           ;;

        *)
          # PA_RISC based systems 
	      if  [ "$1" = "clean" ]; then
               make -f make_hpux_PA_RISC.mak clean
          else
               echo "Building HP-UX PA_RISC version of SWT and CDE DLLs."
               make -f make_hpux_PA_RISC.mak make_swt
               make -f make_hpux_PA_RISC.mak make_cde
           fi
           ;;
        esac
        ;;

    *)
        echo "Unknown OS -- build aborted"
        ;;
esac