File: makemined

package info (click to toggle)
mined 2000.10-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 10,904 kB
  • ctags: 2,258
  • sloc: ansic: 130,722; sh: 1,725; makefile: 260; perl: 169; sed: 152; cpp: 28
file content (48 lines) | stat: -rwxr-xr-x 1,175 bytes parent folder | download | duplicates (3)
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
#! /bin/sh

# go into source directory to make ...
cd src

# try to find gmake for use with gcc
# (on some systems, Mac, I think, cc was gcc but make was not gmake
#  which is a problem)
if type gmake > /dev/null 2> /dev/null
then	GMAKE=gmake
else	GMAKE=make
fi

# if make target is install, prevent using makefile.gcc as installation 
# target directories would be wrong
case "$1" in
*install*)	CC=true;;
esac

# if CC is explicitly set to gcc, shortcut to use it
case "$CC" in
gcc)	$GMAKE -f makefile.gcc $1
	exit;;
"")	CC=cc;;
esac

case `uname` in
Linux*)	make -f makefile.linux $1;;
Sun*)	if type $CC > /dev/null 2> /dev/null
	then	if $CC | grep "software package not installed"
		then	make -f makefile.gcc $1
		else	make -f makefile.sun $1
		fi
	else	make -f makefile.gcc $1
	fi;;
HP*)	make -f makefile.hp $1;;
*BSD*)	gmake -f makefile.bsd $1;;
CYG*)	INSTALLTARGET=installcygwin make -f makefile.cygwin $1;;
Darwin*)
	if type gcc > /dev/null 2> /dev/null
	then	make -f makefile.osx $1
	else	echo Mac compilation should have gcc available -
		echo keyboard mappings do not compile with cc
		false
	fi;;
*)	echo trying to make in GNU mode
	make -f makefile.gcc $1;;
esac