diff options
author | Michael Brown | 2009-03-31 12:06:35 +0200 |
---|---|---|
committer | Michael Brown | 2009-03-31 12:06:35 +0200 |
commit | dc387547a3cc37a2c5b5a3568405c961cf1edf84 (patch) | |
tree | abcb28f84cd64a48d141f91a258dfb052adc10a1 | |
parent | [efi] Allow building with non-system libbfd (diff) | |
download | ipxe-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>
-rw-r--r-- | src/Makefile.housekeeping | 10 |
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)))\" )) |