mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 23:03:04 +00:00
src: make path to m4 relocatable
Commit a4ede8f85b ("package: make bison
a relocatable package") made Bison relocatable, but in fact it still
contains one absolute reference: the M4 variable, which points to the
M4 program. Let's fix that by using relocate(), see if an M4 binary is
available at the relocated location, and otherwise fallback to the
original M4 location.
See https://lists.gnu.org/r/bison-patches/2020-05/msg00078.html,
and https://lists.gnu.org/r/bison-patches/2020-05/msg00087.html.
* src/files.h, src/files.c (m4path): New.
* src/output.c: Use it.
This commit is contained in:
committed by
Akim Demaille
parent
1ce02e13c3
commit
ed7d5c2b5b
@@ -682,7 +682,7 @@ static void
|
||||
output_skeleton (void)
|
||||
{
|
||||
/* Compute the names of the package data dir and skeleton files. */
|
||||
char const *m4 = (m4 = getenv ("M4")) ? m4 : M4;
|
||||
char const *m4 = m4path ();
|
||||
char const *datadir = pkgdatadir ();
|
||||
char *skeldir = xpath_join (datadir, "skeletons");
|
||||
char *m4sugar = xpath_join (datadir, "m4sugar/m4sugar.m4");
|
||||
|
||||
Reference in New Issue
Block a user