File: build-utils.sh

package info (click to toggle)
cmucl 21d-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 45,328 kB
  • sloc: lisp: 378,758; ansic: 30,673; asm: 2,977; sh: 1,417; makefile: 357; csh: 31
file content (78 lines) | stat: -rwxr-xr-x 1,502 bytes parent folder | download | duplicates (4)
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
#!/bin/sh

if [ "$1" = "" ]
then
	echo "Usage: $0 target-directory"
	exit 1
fi

if [ ! -d "$1" ]
then
	echo "$1 isn't a directory"
	exit 2
fi

TARGET="`echo $1 | sed 's:/*$::'`"
shift

$TARGET/lisp/lisp \
	-noinit -nositeinit -batch "$@" <<EOF || exit 3
(in-package :cl-user)

(setf lisp::*enable-package-locked-errors* nil)
(setf (ext:search-list "target:")
      '("$TARGET/" "src/"))

(setf *default-pathname-defaults* (ext:default-directory))
(intl:install)
(intl::translation-enable)
(load "target:setenv")

(pushnew :no-clx *features*)
(pushnew :no-clm *features*)
(pushnew :no-hemlock *features*)

(compile-file "target:tools/setup" :load t)
(setq *gc-verbose* nil *interactive* nil)
(load "target:tools/clxcom")
(load "target:clx/clx-library")
#-ppc
(load "target:tools/clmcom")
(load "target:tools/hemcom")

EOF

# Find GNU make:

if [ "$MAKE" = "" ]
then    
    MAKE="`which gmake`"

    # Some versions of which set an error code if it fails.  Others
    # say "no foo in <path>".  In either of these cases, just assume
    # make is GNU make.

    if [ $? -ne 0 ]; then
	MAKE="make"
    fi
    if echo "X$MAKE" | grep '^Xno' > /dev/null; then
	MAKE="make"
    fi
fi

export MAKE

# Don't bother building motifd on ppc; we'll probably never support that again.

SKIPMOTIF=no
case `uname -s` in
  Darwin)
      case `uname -p` in
	powerpc) SKIPMOTIF=yes ;;
      esac ;;
esac

if [ "$SKIPMOTIF" = "no" ]; then
    ${MAKE} -C $TARGET/motif/server clean && ${MAKE} -C $TARGET/motif/server
fi