[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: parse-datetime: Add support for VPATH builds with OpenBSD 'make'
From: |
Bruno Haible |
Subject: |
Re: parse-datetime: Add support for VPATH builds with OpenBSD 'make' |
Date: |
Wed, 12 Jun 2024 04:10:51 +0200 |
I wrote:
> This patch should fix it. Based on
> https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=bf9412ab2e5878f2b64c8ba5d496d7a26ac4d374
>
>
> 2024-06-11 Bruno Haible <bruno@clisp.org>
>
> parse-datetime: Add support for VPATH builds with OpenBSD 'make'.
> * modules/parse-datetime (Makefile.am): Prefix the target file name
> with '$(srcdir)/'.
It did not fix it. The problem here is that OpenBSD make insists in applying
the Automake .y.c rule, regardless whether I prefix also the dependency with
'$(srcdir)/' or not. And this Automake rule not only is broken; it also
fails because 'bison' is not present.
2024-06-11 Bruno Haible <bruno@clisp.org>
parse-datetime: Revert last commit.
* modules/parse-datetime (Makefile.am): Remove the '$(srcdir)/' prefix
from the target. Add a comment.
diff --git a/modules/parse-datetime b/modules/parse-datetime
index a49d3667dd..06c6f6173e 100644
--- a/modules/parse-datetime
+++ b/modules/parse-datetime
@@ -46,7 +46,10 @@ Makefile.am:
# Additionally, here we assume GNU Bison and therefore don't need the ylwrap
# script.
# Therefore we override this rule.
-$(srcdir)/parse-datetime.c: parse-datetime.y
+# Unfortunately, overriding the Automake generated .y.c rule does not work in
+# VPATH builds with OpenBSD make. Therefore, for VPATH builds on OpenBSD, the
+# user will need GNU make.
+parse-datetime.c: parse-datetime.y
$(AM_V_YACC)$(PARSE_DATETIME_BISON) $(YFLAGS) $(AM_YFLAGS)
$(srcdir)/parse-datetime.y \
&& test ':' = '$(PARSE_DATETIME_BISON)' || { \
sed -e 's|".*/parse-datetime\.y"|"parse-datetime.y"|' \