1#ident "@(#)mk-bsdmake.id	1.1 20/05/03 "
2###########################################################################
3# Written 1996-2020 by J. Schilling
4###########################################################################
5#
6# Name of make program (bsdmake from NetBSD)
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=	bsdmake		# BSD make
25WAIT=		.WAIT		# BSD make notation to wait for parallel targets
26
27SPACE=		$(_UNIQ:$(_UNIQ)%= )
28NUMBER_SIGN=	\#
29
30###########################################################################
31#
32# standard (automatic) machine identification
33#
34###########################################################################
35#
36# XP_ARCH = uname -p	= mach	  # Processor (sparc/mc68020)
37# XK_ARCH = uname -m	= arch -k # Kernel (sun3/sun4c/sun4m)
38# XM_ARCH = arch	~ arch -k # Machine (sun3/sun4)
39#
40###########################################################################
41#
42# Due to a bug in /usr/xpg*/bin/tr on Solaris, we cannot directly translit
43# many different chars to '-' using e.g. tr ', /\\()"' ',------'
44#
45# This is why we use sed 'y%ABC\\%abc-%'. Note that this will not work on *BSD
46#
47###########################################################################
48
49XP_ARCH:sh=	(mach || uname -p || true)2>/dev/null      | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
50XK_ARCH:sh=	uname -m                                   | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
51XM_ARCH:sh=	(arch || /usr/ucb/arch || true)2>/dev/null | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
52
53P_ARCH=		$(XP_ARCH)
54K_ARCH=		$(XK_ARCH)
55M_ARCH=		$(XM_ARCH)
56
57_XP_ARCH=	$(XP_ARCH:unknown=$(K_ARCH))
58
59_P_ARCH=	$(_UNIQ)$(_XP_ARCH)
60__P_ARCH=	$(_P_ARCH:$(_UNIQ)=$(K_ARCH))
61P_ARCH=		$(__P_ARCH:$(_UNIQ)%=%)
62
63_M_ARCH=	$(_UNIQ)$(XM_ARCH)
64__M_ARCH=	$(_M_ARCH:$(_UNIQ)=$(K_ARCH))
65M_ARCH=		$(__M_ARCH:$(_UNIQ)%=%)
66
67OSNAME:sh=	uname -s | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
68OSREL:sh=	uname -r | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
69OSVERSION:sh=	uname -v | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%'
70