summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2019-05-13 18:32:54 +0200
committerAkim Demaille <akim.demaille@gmail.com>2019-05-13 22:16:23 +0200
commit3f25104caf222b32557d4a9a4cc532c34d4cbc43 (patch)
treeb75d70f762b03a3ab48ec45b7e403e6080c4751c
parent6b1933d9929bc498fa93bdbb6b9f107dad09c62c (diff)
downloadbison-3f25104caf222b32557d4a9a4cc532c34d4cbc43.tar.gz
build: do not use $< in plain rules
It works only in implicit rules (or with GNU Make, but not with Solaris Make). Reported by Bruno Haible. http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00009.html Diagnosed thanks to Kiyoshi Kanazawa. * examples/c/reccalc/local.mk, examples/d/local.mk, * examples/java/local.mk: Don't use $< in non implicit rules.
-rw-r--r--examples/c/reccalc/local.mk2
-rw-r--r--examples/d/local.mk4
-rw-r--r--examples/java/local.mk4
3 files changed, 5 insertions, 5 deletions
diff --git a/examples/c/reccalc/local.mk b/examples/c/reccalc/local.mk
index 85296b83..2fc2bccb 100644
--- a/examples/c/reccalc/local.mk
+++ b/examples/c/reccalc/local.mk
@@ -41,7 +41,7 @@ DASH = -
$(AM_V_LEX)rm -f $@ $@.tmp
$(AM_V_at)$(MKDIR_P) %D%
$(AM_V_at)touch $@.tmp
- $(AM_V_at) $(LEX) -o %D%/scan.c --header-file=%D%/scan.h $<
+ $(AM_V_at)$(LEX) -o%D%/scan.c --header-file=%D%/scan.h $(srcdir)/%D%/scan.l
$(AM_V_at)mv $@.tmp $@
# Don't use gnulib's system headers.
diff --git a/examples/d/local.mk b/examples/d/local.mk
index 1d8cd51a..8b701efe 100644
--- a/examples/d/local.mk
+++ b/examples/d/local.mk
@@ -27,10 +27,10 @@ EXTRA_DIST += %D%/calc.test
%D%/calc.d: %D%/calc.y $(dependencies)
$(AM_V_GEN)$(MKDIR_P) %D%
- $(AM_V_at)$(BISON) $< -o $@
+ $(AM_V_at)$(BISON) $(srcdir)/%D%/calc.y -o $@
%D%/calc: %D%/calc.d
- $(AM_V_GEN) $(DC) $(DCFLAGS) -of$@ $<
+ $(AM_V_GEN) $(DC) $(DCFLAGS) -of$@ $(srcdir)/%D%/calc.d
dist_d_DATA = %D%/calc.y %D%/Makefile %D%/README.md
CLEANFILES += %D%/calc %D%/calc.[do]
diff --git a/examples/java/local.mk b/examples/java/local.mk
index b9bcebf5..3ea0cc33 100644
--- a/examples/java/local.mk
+++ b/examples/java/local.mk
@@ -27,10 +27,10 @@ EXTRA_DIST += %D%/Calc.test
%D%/Calc.java: %D%/Calc.y $(dependencies)
$(AM_V_GEN)$(MKDIR_P) %D%
- $(AM_V_at)$(BISON) $< -o $@
+ $(AM_V_at)$(BISON) $(srcdir)/%D%/Calc.y -o $@
%D%/Calc.class: %D%/Calc.java
- $(AM_V_GEN) $(SHELL) $(top_builddir)/javacomp.sh $<
+ $(AM_V_GEN) $(SHELL) $(top_builddir)/javacomp.sh $(srcdir)/%D%/Calc.java
dist_java_DATA = %D%/Calc.y %D%/Makefile %D%/README.md
CLEANFILES += %D%/*.class %D%/Calc.java