diff options
author | Bruno Haible <bruno@clisp.org> | 2021-12-15 21:49:41 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-12-15 22:17:21 +0100 |
commit | b8124d982f454b8526b5e11934a2f71faac2b600 (patch) | |
tree | 3f3b6a64dd1dd1b5d9f6439b9014cfb867e02d4b /gnulib-tool | |
parent | a3c4f3ffbed121b02ed44a6ddf6cfdd16e5b05e9 (diff) | |
download | gnulib-b8124d982f454b8526b5e11934a2f71faac2b600.tar.gz |
automake-subdir support: Look for 'subdir-objects' also in configure.ac.
* gnulib-tool: Look for the automake options also in the first argument
of the AM_INIT_AUTOMAKE invocation in configure.ac.
Diffstat (limited to 'gnulib-tool')
-rwxr-xr-x | gnulib-tool | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/gnulib-tool b/gnulib-tool index 70ea17a4cb..0d2b7e6353 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -1594,7 +1594,6 @@ func_determine_path_separator # "autoconf --trace=AC_PREREQ" fails with an error message like this: # m4: aclocal.m4:851: Cannot open m4/absolute-header.m4: No such file or directory # autom4te: m4 failed with exit status: 1 - prereqs= my_sed_traces=' s,#.*$,, s,^dnl .*$,, @@ -1621,10 +1620,25 @@ func_determine_path_separator # Determine whether --automake-subdir is supported. if $automake_subdir; then found_subdir_objects=false + if test -n "$configure_ac"; then + my_sed_traces=' + s,#.*$,, + s,^dnl .*$,, + s, dnl .*$,, + /AM_INIT_AUTOMAKE/ { + s,^.*AM_INIT_AUTOMAKE([[ ]*\([^])]*\).*$,\1,p + }' + automake_options=`sed -n -e "$my_sed_traces" < "$configure_ac"` + for option in $automake_options; do + case "$option" in + subdir-objects ) found_subdir_objects=true ;; + esac + done + fi if test -f "${destdir:-.}"/Makefile.am; then automake_options=`sed -n -e 's/^AUTOMAKE_OPTIONS[ ]*=\(.*\)$/\1/p' "${destdir:-.}"/Makefile.am` - for arg in $automake_options; do - case "$arg" in + for option in $automake_options; do + case "$option" in subdir-objects ) found_subdir_objects=true ;; esac done |