commit 137b4cacfd100ece3873b974f0ef50ad484cc35b Author: Anthony Heading Date: Fri Aug 27 02:46:29 2021 -0400 Add the directory of the default system skeleton file to the m4 search path. When a user-defined skeleton is used, prepend that path also. Change lalr1.cpp to search for c++.m4 instead of using only the system dir. diff --git data/skeletons/lalr1.cc data/skeletons/lalr1.cc index 7cb69d3d..ec0a68ee 100644 --- data/skeletons/lalr1.cc +++ data/skeletons/lalr1.cc @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -m4_include(b4_skeletonsdir/[c++.m4]) +m4_include([c++.m4]) # api.value.type=variant is valid. m4_define([b4_value_type_setup_variant]) diff --git src/output.c src/output.c index 4b1bb0d8..b0c074d7 100644 --- src/output.c +++ src/output.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "complain.h" #include "files.h" @@ -757,6 +758,13 @@ output_skeleton (void) if (*M4_GNU_OPTION) argv[i++] = M4_GNU_OPTION; + char *userdir = dir_name(skel); + if (strcmp(userdir, skeldir)) { + argv[i++] = "-I"; + argv[i++] = userdir; + } + argv[i++] = "-I"; + argv[i++] = skeldir; argv[i++] = "-I"; argv[i++] = datadir; /* Some future version of GNU M4 (most likely 1.6) may treat the