1#ident "@(#)rules.ars	1.1 18/01/16 "
2###########################################################################
3# Written 1996-2018 by J. Schilling
4###########################################################################
5#
6# Name of make program Schily SunPro Make
7#
8# This code does not work for the Sun/Oracle original program as there
9# is no support for the "export" directive.
10#
11###########################################################################
12# Copyright (c) J. Schilling
13###########################################################################
14# The contents of this file are subject to the terms of the
15# Common Development and Distribution License, Version 1.0 only
16# (the "License").  You may not use this file except in compliance
17# with the License.
18#
19# See the file CDDL.Schily.txt in this distribution for details.
20# A copy of the CDDL is also available via the Internet at
21# http://www.opensource.org/licenses/cddl1.txt
22#
23# When distributing Covered Code, include this CDDL HEADER in each
24# file and include the License file CDDL.Schily.txt from this distribution.
25###########################################################################
26
27###########################################################################
28#
29# standard (automatic) machine identification
30#
31###########################################################################
32#
33# XP_ARCH = uname -p	= mach	  # Processor (sparc/mc68020)
34# XK_ARCH = uname -m	= arch -k # Kernel (sun3/sun4c/sun4m)
35# XM_ARCH = arch	~ arch -k # Machine (sun3/sun4)
36#
37###########################################################################
38#
39# Due to a bug in /usr/xpg*/bin/tr on Solaris, we cannot directly translit
40# many different chars to '-' using e.g. tr ', /\\()"' ',------'
41#
42# This is why we use sed 'y%ABC\\%abc-%'. Note that this will not work on *BSD
43#
44###########################################################################
45
46XP_ARCH:sh=	(mach || uname -p || true)2>/dev/null      | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
47XK_ARCH:sh=	uname -m                                   | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
48XM_ARCH:sh=	(arch || /usr/ucb/arch || true)2>/dev/null | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
49
50OSNAME:sh=	uname -s | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
51OSREL:sh=	uname -r | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
52OSVERSION:sh=	uname -v | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
53
54ARCH_DONE=	TRUE
55
56export		XP_ARCH
57export		XK_ARCH
58export		XM_ARCH
59export		OSNAME
60export		OSREL
61export		OSVERSION
62
63export		ARCH_DONE
64