[Skiboot] [PATCH] pflash: Fix makefile dependency issue

Stewart Smith stewart at linux.vnet.ibm.com
Mon Feb 12 14:10:32 AEDT 2018


Otherwise we could end up trying to build files before the links
are created.

Let's use a heavy handed approach and not build *anything* until
we have the links.

Reported-by: Brad Bishop <bradleyb at fuzziesquirrel.com>
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 external/pflash/rules.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/external/pflash/rules.mk b/external/pflash/rules.mk
index 9dff002670b3..3ee82b50e241 100644
--- a/external/pflash/rules.mk
+++ b/external/pflash/rules.mk
@@ -37,17 +37,17 @@ version.c: .version
 	echo "const char version[] = \"$(PFLASH_VERSION)\";" ;\
 	fi) > $@
 
-%.o : %.c
+%.o : %.c | links
 	$(Q_CC)$(CC) $(CFLAGS) -c $< -o $@
 
 $(LIBFLASH_SRC): | links
 
 $(CCAN_SRC): | links
 
-$(LIBFLASH_OBJS): libflash-%.o : libflash/%.c
+$(LIBFLASH_OBJS): libflash-%.o : libflash/%.c | links
 	$(Q_CC)$(CC) $(CFLAGS) -c $< -o $@
 
-$(CCAN_OBJS): ccan-list-%.o: ccan/list/%.c
+$(CCAN_OBJS): ccan-list-%.o: ccan/list/%.c | links
 	$(Q_CC)$(CC) $(CFLAGS) -c $< -o $@
 
 $(EXE): $(OBJS)
-- 
2.14.3



More information about the Skiboot mailing list