From 51c8f5575d6d95537a9eb112c8be6838a7f89e49 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 6 Aug 2016 07:49:53 -0700 Subject: Fix issue in make dependency generation. * Makefile (DEPGEN): We must fold the backslash continuations before trying to delete the first dependency element, because if the target name is long, that first element may be on the following line, and we delete the backslash. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0c443a1d..8f907219 100644 --- a/Makefile +++ b/Makefile @@ -93,7 +93,8 @@ ABBREV = $(if $(VERBOSE),\ ABBREV3 = $(if $(VERBOSE),@:,@printf "%s %s -> %s\n" $(1) "$(3)" $(2)) define DEPGEN -$(V)sed -e '1s/^/DEP_/' -e '1s/: [^ ]\+/ :=/' < $(1) > $(1:.d=.v) +$(V)sed ':x; /\\$$/ { N; s/\\\n//; tx }' < $(1) | \ + sed -e '1s/^/DEP_/' -e '1s/: [^ ]\+/ :=/' > $(1:.d=.v) endef define COMPILE_C -- cgit v1.2.3