Kaynağa Gözat

[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>
tags/v0.9.8
Michael Brown 15 yıl önce
ebeveyn
işleme
dc387547a3
1 değiştirilmiş dosya ile 9 ekleme ve 1 silme
  1. 9
    1
      src/Makefile.housekeeping

+ 9
- 1
src/Makefile.housekeeping Dosyayı Görüntüle

@@ -52,6 +52,14 @@ VERYCLEANUP	+= .echocheck
52 52
 echo :
53 53
 	@$(ECHO) "Using \"$(ECHO_E)\" for \"echo -e\""
54 54
 
55
+###############################################################################
56
+#
57
+# Generate a usable "seq" substitute
58
+#
59
+define seq
60
+	$(shell awk 'BEGIN { for ( i = $(1) ; i <= $(2) ; i++ ) print i }')
61
+endef
62
+
55 63
 ###############################################################################
56 64
 #
57 65
 # Determine host OS
@@ -495,7 +503,7 @@ $(EMBEDDED_LIST) :
495 503
 VERYCLEANUP	+= $(EMBEDDED_LIST)
496 504
 
497 505
 EMBEDDED_FILES	:= $(subst $(COMMA), ,$(EMBEDDED_IMAGE))
498
-EMBED_ALL	:= $(foreach i,$(shell seq 1 $(words $(EMBEDDED_FILES))),\
506
+EMBED_ALL	:= $(foreach i,$(call seq,1,$(words $(EMBEDDED_FILES))),\
499 507
 		     EMBED ( $(i), \"$(word $(i), $(EMBEDDED_FILES))\",\
500 508
 			     \"$(notdir $(word $(i),$(EMBEDDED_FILES)))\" ))
501 509
 

Loading…
İptal
Kaydet