diff options
author | Michael Brown <mcb30@etherboot.org> | 2009-03-31 11:06:35 +0100 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2009-03-31 11:06:35 +0100 |
commit | dc387547a3cc37a2c5b5a3568405c961cf1edf84 (patch) | |
tree | abcb28f84cd64a48d141f91a258dfb052adc10a1 /src/Makefile.housekeeping | |
parent | 3dd7ce1c26cac856039e1151720481c6ab1b43d1 (diff) | |
download | ipxe-dc387547a3cc37a2c5b5a3568405c961cf1edf84.tar.gz |
[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.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)))\" )) |