From 0bf7bc5d2e0e3447568a18312733949ebbbbf8a6 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 1 Dec 2008 13:21:47 -0800 Subject: core/Makefile: fix dependency generation with old versions of NASM Fix dependency generation with certain old versions of NASM, which omitted the '\n' between dependency lines. Signed-off-by: H. Peter Anvin --- core/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/Makefile b/core/Makefile index 638004cd..1106b4cf 100644 --- a/core/Makefile +++ b/core/Makefile @@ -119,10 +119,15 @@ clean: tidy spotless: clean rm -f $(BTARGET) *_bin.c .depend +# Note: the extra echo '' is to deal with old versions of NASM which +# did not properly terminate the dependency list. .depend: rm -f .depend for csrc in $(CSRC) ; do $(CC) $(INCLUDE) -MM $$csrc >> .depend ; done - for nsrc in $(NASMSRC) ; do $(NASM) -DDEPEND $(NINCLUDE) -o `echo $$nsrc | sed -e 's/\.asm/\.o/'` -M $$nsrc >> .depend ; done + for nsrc in $(NASMSRC) ; do \ + ( $(NASM) -DDEPEND $(NINCLUDE) -o \ + `echo $$nsrc | sed -e 's/\.asm/\.o/'` -M $$nsrc ; \ + echo '' ) >> .depend ; done depend: rm -f .depend -- cgit v1.2.3