Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/contrib/bmake/machine.sh
39475 views
1
:
2
# This is mostly redundant.
3
# These days I use the pseudo machine "host" when building for host
4
# and $TARGET_HOST for its objdir
5
6
# RCSid:
7
# $Id: machine.sh,v 1.19 2023/01/17 18:30:21 sjg Exp $
8
#
9
# @(#) Copyright (c) 1994-2023 Simon J. Gerraty
10
#
11
# This file is provided in the hope that it will
12
# be of use. There is absolutely NO WARRANTY.
13
# Permission to copy, redistribute or otherwise
14
# use this file is hereby granted provided that
15
# the above copyright notice and this notice are
16
# left intact.
17
#
18
# Please send copies of changes and bug-fixes to:
19
# [email protected]
20
#
21
22
# leverage os.sh
23
Mydir=`dirname $0`
24
. $Mydir/os.sh
25
26
# some further overrides - mostly for MACHINE_ACH
27
case $OS in
28
AIX) # from http://gnats.netbsd.org/29386
29
MACHINE_ARCH=`bootinfo -T`
30
;;
31
Bitrig)
32
MACHINE_ARCH=$MACHINE;
33
;;
34
HP-UX)
35
MACHINE_ARCH=`IFS="/-."; set $MACHINE; echo $1`
36
;;
37
esac
38
39
(
40
case "$0" in
41
arch*) echo $MACHINE_ARCH;;
42
*)
43
case "$1" in
44
"") echo $MACHINE;;
45
*) echo $MACHINE_ARCH;;
46
esac
47
;;
48
esac
49
) | toLower
50
51