diff options
author | Bruno Haible <bruno@clisp.org> | 2021-12-15 19:18:31 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-12-15 19:18:31 +0100 |
commit | b2bd0a9041ed7401fb69f59f7450abb8b3249ecb (patch) | |
tree | 328f2f82b7b367f9ba72f43589bc774f19ecc9f4 /m4 | |
parent | e3174b6d1fdbe6ea2297bf8c8333f65f9d9d9588 (diff) | |
download | gnulib-b2bd0a9041ed7401fb69f59f7450abb8b3249ecb.tar.gz |
Accommodate non-recursive Automake in a less hacky way.
* gnulib-tool: New option --automake-subdir.
(automake_subdir): New variable.
(func_emit_initmacro_end): Add a second argument. Use it to prefix each
object file name in *_LIBOBJS and *_LTLIBOBJS.
(func_emit_shellvars_init): New function.
(func_import): Add support for --automake-subdir. Invoke
prefix-gnulib-mk. Update calls to func_emit_initmacro_end. Call
func_emit_shellvars_init.
(func_create_testdir): Update calls to func_emit_initmacro_end. Call
func_emit_shellvars_init.
* m4/gnulib-tool.m4 (gl_AUTOMAKE_SUBDIR): New macro.
* m4/gnulib-common.m4 (gl_CONDITIONAL_HEADER): Use the value of the
gl_source_base_prefix variable.
* build-aux/prefix-gnulib-mk: New options --from-gnulib-tool, --prefix.
(contents_of_file): Renamed from contents.
(contents_of_stdin): New function.
(process): Inline and remove function.
* doc/gnulib-tool.texi (Non-recursive make): New section.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/gnulib-common.m4 | 10 | ||||
-rw-r--r-- | m4/gnulib-tool.m4 | 5 |
2 files changed, 12 insertions, 3 deletions
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 9061efb519..f70ef4ea96 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 68 +# gnulib-common.m4 serial 69 dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -893,7 +893,13 @@ AC_DEFUN([gl_CONDITIONAL_HEADER], m4_pushdef([gl_generate_cond], [GL_GENERATE_]AS_TR_SH(m4_toupper($1))) case "$gl_generate_var" in false) gl_header_name='' ;; - true) gl_header_name='$1' ;; + true) + dnl It is OK to use a .h file in lib/ from within tests/, but not vice + dnl versa. + if test -z "$gl_header_name"; then + gl_header_name="${gl_source_base_prefix}$1" + fi + ;; *) echo "*** gl_generate_var is not set correctly" 1>&2; exit 1 ;; esac AC_SUBST(gl_header_name) diff --git a/m4/gnulib-tool.m4 b/m4/gnulib-tool.m4 index bbf38d7d30..3e977759f1 100644 --- a/m4/gnulib-tool.m4 +++ b/m4/gnulib-tool.m4 @@ -1,4 +1,4 @@ -# gnulib-tool.m4 serial 3 +# gnulib-tool.m4 serial 4 dnl Copyright (C) 2004-2005, 2009-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -47,6 +47,9 @@ AC_DEFUN([gl_MAKEFILE_NAME], []) dnl Usage: gl_TESTS_MAKEFILE_NAME([FILENAME]) AC_DEFUN([gl_TESTS_MAKEFILE_NAME], []) +dnl Usage: gl_AUTOMAKE_SUBDIR +AC_DEFUN([gl_AUTOMAKE_SUBDIR], []) + dnl Usage: gl_LIBTOOL AC_DEFUN([gl_LIBTOOL], []) |