summaryrefslogtreecommitdiffstats
path: root/src/Makefile.housekeeping
diff options
context:
space:
mode:
authorMichael Brown2009-03-31 12:06:35 +0200
committerMichael Brown2009-03-31 12:06:35 +0200
commitdc387547a3cc37a2c5b5a3568405c961cf1edf84 (patch)
treeabcb28f84cd64a48d141f91a258dfb052adc10a1 /src/Makefile.housekeeping
parent[efi] Allow building with non-system libbfd (diff)
downloadipxe-dc387547a3cc37a2c5b5a3568405c961cf1edf84.tar.gz
ipxe-dc387547a3cc37a2c5b5a3568405c961cf1edf84.tar.xz
ipxe-dc387547a3cc37a2c5b5a3568405c961cf1edf84.zip
[build] Don't assume the existence of "seq"
The "seq" command is GNU-specific; a BSD userland will not have it. Use POSIX-conforming "awk" instead. Reported-by: Joshua Oreman <oremanj@rwcr.net> Suggested-by: Stefan Hajnoczi <stefanha@gmail.com>
Diffstat (limited to 'src/Makefile.housekeeping')
-rw-r--r--src/Makefile.housekeeping10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
index 4f0a8bb3..8edb0127 100644
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -54,6 +54,14 @@ echo :
###############################################################################
#
+# Generate a usable "seq" substitute
+#
+define seq
+ $(shell awk 'BEGIN { for ( i = $(1) ; i <= $(2) ; i++ ) print i }')
+endef
+
+###############################################################################
+#
# Determine host OS
#
HOST_OS := $(shell uname -s)
@@ -495,7 +503,7 @@ $(EMBEDDED_LIST) :
VERYCLEANUP += $(EMBEDDED_LIST)
EMBEDDED_FILES := $(subst $(COMMA), ,$(EMBEDDED_IMAGE))
-EMBED_ALL := $(foreach i,$(shell seq 1 $(words $(EMBEDDED_FILES))),\
+EMBED_ALL := $(foreach i,$(call seq,1,$(words $(EMBEDDED_FILES))),\
EMBED ( $(i), \"$(word $(i), $(EMBEDDED_FILES))\",\
\"$(notdir $(word $(i),$(EMBEDDED_FILES)))\" ))