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
commit9f89722644018e5949827ee18109f84fd45b41cd (patch)
tree00782242f5d630d364d69d47bcaa67aec2c6be37
parentd062100ca75811eca6aacaeb9db276f504c94dd9 (diff)
downloadtxr-9f89722644018e5949827ee18109f84fd45b41cd.tar.gz
txr-9f89722644018e5949827ee18109f84fd45b41cd.tar.bz2
txr-9f89722644018e5949827ee18109f84fd45b41cd.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