[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
examples: fix dependencies
From: |
Akim Demaille |
Subject: |
examples: fix dependencies |
Date: |
Wed, 26 Dec 2018 20:53:15 +0100 |
commit 50285ff06695a8c5d977337f0ede3a4d72aa048d
Author: Akim Demaille <address@hidden>
Date: Wed Dec 26 08:44:01 2018 +0100
examples: fix dependencies
Commit 112ccb5ed73ba5c64b0b5300d8b9b686f02f094c moved the skeletons
from dist_pkgdata_DATA to dist_skeletons_DATA, hence broke the dependencies.
* Makefile.am (dependencies): New.
Use it where appropriate.
diff --git a/Makefile.am b/Makefile.am
index 6911bc78..4e699383 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,6 +29,13 @@ EXTRA_DIST = .prev-version .version cfg.mk PACKAGING \
dist_doc_DATA = AUTHORS COPYING NEWS README THANKS TODO
+# Let generated files (e.g., from exampkles/) depend on this variable,
+# to make sure they are regenerated when there are changes in Bison.
+#
+# Don't depend on $(BISON) otherwise we would rebuild these files
+# in srcdir, including during distcheck, which is forbidden.
+dependencies = $(BISON_IN) $(dist_skeletons_DATA)
+
## Running the bison from this tarball. To generate our own parser,
## but also to run the tests. Of course, you ought to keep a sane
## version of Bison nearby...
diff --git a/examples/c++/calc++/local.mk b/examples/c++/calc++/local.mk
index a051ad46..c653bb71 100644
--- a/examples/c++/calc++/local.mk
+++ b/examples/c++/calc++/local.mk
@@ -20,7 +20,7 @@
# Don't depend on $(BISON) otherwise we would rebuild these files
# in srcdir, including during distcheck, which is forbidden.
-%D%/parser.stamp: $(BISON_IN) $(dist_pkgdata_DATA)
+%D%/parser.stamp: $(dependencies)
SUFFIXES += .yy .stamp
.yy.stamp:
$(AM_V_YACC)rm -f $@
diff --git a/examples/c++/local.mk b/examples/c++/local.mk
index e251276f..5364f375 100644
--- a/examples/c++/local.mk
+++ b/examples/c++/local.mk
@@ -37,7 +37,7 @@ if ENABLE_CXX14
# Don't use gnulib's system headers.
%C%_simple_CPPFLAGS = -I$(top_builddir)
TESTS += %D%/simple.test
- %D%/simple.cc: $(BISON_IN) $(dist_pkgdata_DATA)
+ %D%/simple.cc: $(dependencies)
endif
EXTRA_DIST += %D%/simple.test
@@ -52,7 +52,7 @@ if ENABLE_CXX
# Don't use gnulib's system headers.
%C%_variant_CPPFLAGS = -I$(top_builddir)
TESTS += %D%/variant.test
- %D%/variant.cc: $(BISON_IN) $(dist_pkgdata_DATA)
+ %D%/variant.cc: $(dependencies)
endif
EXTRA_DIST += %D%/variant.test
@@ -63,7 +63,7 @@ if ENABLE_CXX11
# Don't use gnulib's system headers.
%C%_variant_11_CPPFLAGS = -I$(top_builddir)
TESTS += %D%/variant-11.test
- %D%/variant-11.cc: $(BISON_IN) $(dist_pkgdata_DATA)
+ %D%/variant-11.cc: $(dependencies)
endif
EXTRA_DIST += %D%/variant-11.test
diff --git a/examples/d/local.mk b/examples/d/local.mk
index a9f0e2d2..20a8bdf6 100644
--- a/examples/d/local.mk
+++ b/examples/d/local.mk
@@ -25,7 +25,7 @@ if ENABLE_D
endif
EXTRA_DIST += %D%/calc.test
-%D%/calc.d: %D%/calc.y $(BISON_IN) $(dist_pkgdata_DATA)
+%D%/calc.d: %D%/calc.y $(dependencies)
$(AM_V_GEN)$(MKDIR_P) %D%
$(AM_V_at)$(BISON) $< -o $@
diff --git a/examples/java/local.mk b/examples/java/local.mk
index 9582bfce..b7c7e812 100644
--- a/examples/java/local.mk
+++ b/examples/java/local.mk
@@ -25,7 +25,7 @@ if ENABLE_JAVA
endif
EXTRA_DIST += %D%/Calc.test
-%D%/Calc.java: %D%/Calc.y $(BISON_IN) $(dist_pkgdata_DATA)
+%D%/Calc.java: %D%/Calc.y $(dependencies)
$(AM_V_GEN)$(MKDIR_P) %D%
$(AM_V_at)$(BISON) $< -o $@
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- examples: fix dependencies,
Akim Demaille <=