blob: d48f75bde1152147370307137d98d178f66b11d3 (
plain)
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
106
107
108
|
#!/bin/csh -f
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# @(#)build_bin_img 1.18 06/12/18
#
# This script creates a "tarball" distribution image of the "make" executable.
#
# See also "./README" for a description of its use.
#
#
# Optional environment variables:
#
# name typical use description
#
# DESTDIR $DESTDIR/usr/ccs root of installation tree
# BINIMGFILE $BINIMGFILE''.bz2 bzipped tarball image
if ( $#argv > 0 ) then
echo 'usage: build_bin_img'
exit 0
endif
# Set up environment variables. User-supplied values are respected.
# If the variable is not set by the user, a default is supplied.
if ( ! $?DESTDIR ) then
setenv DESTDIR ../../destdir/root_`uname -p`
endif
if ( ! $?BINIMGFILE ) then
setenv BINIMGFILE ../../imgdir/devpro-make-open-bins-`/usr/bin/date -u +'%'Y'%'m'%'d`.`uname -p`.tar
endif
# Compile the sources to produce the "make" binaries. See "./README"
# for details.
./build
# Ensure that the path to $BINIMGFILE exists, and is absolute.
set t = $BINIMGFILE
if ( Z$BINIMGFILE =~ Z*/* ) then
set bifd = $t:h
set bifn = $t:t
else
set bifd = .
set bifn = $t
endif
mkdir -p $bifd
set p = `pwd`
cd $bifd
setenv BINIMGFILE `pwd`/$bifn
cd $p
# Ensure that $DESTDIR is absolute.
set p = `pwd`
cd $DESTDIR
setenv DESTDIR `pwd`
cd $p
echo
echo === starting build of binary image ===
echo
echo Using variables:
echo
echo ' 'DESTDIR = $DESTDIR
echo ' 'BINIMGFILE = $BINIMGFILE
# Create and compress the "tarball".
rm -f $BINIMGFILE $BINIMGFILE''.bz2
tar cf $BINIMGFILE -C $DESTDIR .
bzip2 $BINIMGFILE
echo
echo === build of binary image complete ===
echo
ls -l $BINIMGFILE''*
|