Skip to content

Commit

Permalink
dts/Makefile: Check for empty $(LDSCRIPT)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Horst Kronstorfer authored and wdenx committed Aug 10, 2012
1 parent 8b5a026 commit a4ff471
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)` ;\
Expand Down

0 comments on commit a4ff471

Please sign in to comment.