File: mk-gmake.id

package info (click to toggle)
sformat 3.4-1
  • links: PTS
  • area: main
  • in suites: potato, slink
  • size: 2,056 kB
  • ctags: 3,432
  • sloc: ansic: 20,874; makefile: 98; sh: 95
file content (73 lines) | stat: -rw-r--r-- 2,460 bytes parent folder | download | duplicates (2)
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
#ident "@(#)mk-gmake.id	1.5 97/06/22 "
###########################################################################
# Written 1996 by J. Schilling
###########################################################################
#
# Name of make program (make/gmake/smake)
#
###########################################################################
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
###########################################################################

MAKEPROG=	gmake

###########################################################################
#
# standard (automatic) machine identification
#
###########################################################################
#
# XP_ARCH = uname -p	= mach	  # Processor (sparc/mc68020)
# XK_ARCH = uname -m	= arch -k # Kernel (sun3/sun4c/sun4m)
# XM_ARCH = arch	~ arch -k # Machine (sun3/sun4)
#
###########################################################################

ifndef		ARCH_DONE

_MACHCMD=	(mach || uname -m || true) 2> /dev/null
_ARCHCMD=	(arch || true)             2> /dev/null

XP_ARCH:=	$(shell $(_MACHCMD) | tr '[A-Z]' '[a-z]' | tr ', /\\' ',---')
XK_ARCH:=	$(shell uname -m    | tr '[A-Z]' '[a-z]' | tr ', /\\' ',---')
XM_ARCH:=	$(shell $(_ARCHCMD) | tr '[A-Z]' '[a-z]' | tr ', /\\' ',---')

P_ARCH=		$(XP_ARCH)
K_ARCH=		$(XK_ARCH)
M_ARCH=		$(XM_ARCH)

_P_ARCH=	$(_UNIQ)$(XP_ARCH)
__P_ARCH=	$(_P_ARCH:$(_UNIQ)=$(K_ARCH))
P_ARCH=		$(__P_ARCH:$(_UNIQ)%=%)

_M_ARCH=	$(_UNIQ)$(XM_ARCH)
__M_ARCH=	$(_M_ARCH:$(_UNIQ)=$(K_ARCH))
M_ARCH=		$(__M_ARCH:$(_UNIQ)%=%)

OSNAME:=	$(shell uname -s | tr '[A-Z]' '[a-z]' | tr ', /\\' ',---')
OSREL:=		$(shell uname -r | tr '[A-Z]' '[a-z]' | tr ', /\\' ',---')

ARCH_DONE=	TRUE

export		XP_ARCH
export		K_ARCH
export		XM_ARCH
export		P_ARCH
export		M_ARCH
export		OSNAME
export		OSREL
export		ARCH_DONE

endif