[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnulib-tool-py] sed_replace_build_aux
From: |
Bruno Haible |
Subject: |
Re: [gnulib-tool-py] sed_replace_build_aux |
Date: |
Wed, 15 Aug 2012 02:13:42 +0200 |
User-agent: |
KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; ) |
Hi Dmitriy,
> I now try to finish the generation of the gnulib-comp.m4. My question
> is about sed_replace_build_aux at lines 5227-5232: what it does?
> As I see it is used in func_emit_autoconf_snippets and
> func_emit_autoconf_snippet, but I don't understand the way it works.
> Could you help me, please?
The purpose is to transform a line such as in modules/javaexec-script:
configure.ac:
AC_CONFIG_FILES([javaexec.sh:build-aux/javaexec.sh.in])
The syntax of AC_CONFIG_FILES is documented in
<http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Configuration-Files.html>
Namely,
AC_CONFIG_FILES([filename_in_builddir:filename_in_sourcedir])
In our example, build-aux/javaexec.sh.in is the filename in gnulib.
If the package's configure.ac contains the declaration
AC_CONFIG_AUX_DIR([autotools-stuff])
then gnulib-tool will copy GNULIB_DIR/build-aux/javaexec.sh.in to
PACKAGE_SOURCE_DIR/autotools-stuff/javaexec.sh.in, and therefore
it has to transform the declaration
AC_CONFIG_FILES([javaexec.sh:build-aux/javaexec.sh.in])
to
AC_CONFIG_FILES([javaexec.sh:autotools-stuff/javaexec.sh.in])
This is what the sed_replace_build_aux program does:
:a
/AC_CONFIG_FILES(.*:build-aux\/.*)/{
s|AC_CONFIG_FILES(\(.*\):build-aux/\(.*\))|AC_CONFIG_FILES(\1:'"$auxdir"'/\2)|
ba
}
loops over the input, searching for AC_CONFIG_FILES invocations
with of the specific form, and replaces the :build-aux/ part in the
middle of each with the corresponding string with $auxdir.
Bruno
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [gnulib-tool-py] sed_replace_build_aux,
Bruno Haible <=