File: show-gnu-make

package info (click to toggle)
u-boot 2025.01-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie, trixie-proposed-updates, trixie-updates
  • size: 330,740 kB
  • sloc: ansic: 2,627,855; python: 60,773; sh: 41,641; asm: 21,854; makefile: 15,048; perl: 12,447; cs: 6,763; cpp: 1,868; yacc: 1,100; lex: 747; awk: 57; tcl: 32; sed: 24
file content (23 lines) | stat: -rwxr-xr-x 565 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0+
#
# Show the command name for GNU Make
#
# U-Boot is supposed to be built on various platforms.
# One problem is that the command 'make' is not always GNU Make.
# (For ex. the command name for GNU Make on FreeBSD is usually 'gmake'.)
# It is not a good idea to hard-code the command name in scripts
# where where GNU Make is expected.
# Call this helper script to get the command name for GNU Make.

gnu_make=

for m in make gmake
do
	if $m --version 2>/dev/null | grep -q GNU; then
		echo $m
		exit 0
	fi
done

exit 1