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