summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-08-06 07:49:53 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-08-06 07:49:53 -0700
commit51c8f5575d6d95537a9eb112c8be6838a7f89e49 (patch)
tree00782242f5d630d364d69d47bcaa67aec2c6be37
parent7d6188b2576b611552ab17dd3f27e8a308cc6c86 (diff)
downloadtxr-51c8f5575d6d95537a9eb112c8be6838a7f89e49.tar.gz
txr-51c8f5575d6d95537a9eb112c8be6838a7f89e49.tar.bz2
txr-51c8f5575d6d95537a9eb112c8be6838a7f89e49.zip
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.
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
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