aboutsummaryrefslogtreecommitdiffstats
path: root/roms/u-boot/scripts/show-gnu-make
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/u-boot/scripts/show-gnu-make
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/u-boot/scripts/show-gnu-make')
-rwxr-xr-xroms/u-boot/scripts/show-gnu-make23
1 files changed, 23 insertions, 0 deletions
diff --git a/roms/u-boot/scripts/show-gnu-make b/roms/u-boot/scripts/show-gnu-make
new file mode 100755
index 000000000..90a5f3862
--- /dev/null
+++ b/roms/u-boot/scripts/show-gnu-make
@@ -0,0 +1,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