Browse Source

dts/Makefile: Check for empty $(LDSCRIPT)

Make sure that $(LDSCRIPT) is not empty before calling process_lds
with 'cat $(LDSCRIPT)' else cat will block waiting for input from
stdin.

Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
Horst Kronstorfer 12 năm trước cách đây
mục cha
commit
a4ff471970
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      dts/Makefile

+ 3 - 2
dts/Makefile

@@ -67,8 +67,9 @@ $(obj)dt.o: $(DT_BIN)
 	# We look in the LDSCRIPT first.
 	# Then try the linker which should give us the answer.
 	# Then check it worked.
-	oformat=`$(call process_lds,cat $(LDSCRIPT),FORMAT)` ;\
-	oarch=`$(call process_lds,cat $(LDSCRIPT),ARCH)` ;\
+	[ -n "$(LDSCRIPT)" ] && \
+		oformat=`$(call process_lds,cat $(LDSCRIPT),FORMAT)` && \
+		oarch=`$(call process_lds,cat $(LDSCRIPT),ARCH)` ;\
 	\
 	[ -z $${oformat} ] && \
 		oformat=`$(call process_lds,$(GET_LDS),FORMAT)` ;\