bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib-tool with "--makefile-name=gnulib.mk" creates a file with 'li


From: Bruno Haible
Subject: Re: gnulib-tool with "--makefile-name=gnulib.mk" creates a file with 'lib/' inserted to first line of "SED_HEADER_... ="
Date: Tue, 28 Dec 2021 10:06:17 +0100

Hi Bjarni,

>   Software: groff; latest in my repository with fixes for latest gnulib.
> 
>   gnulib: latest in repository
> 
>   Produced file "groff/lib/gnulib.mk" contains:
> 
> --- start piece of code ---
> 
> ## begin gnulib module gen-header
> 
> # In 'sed', prepend a "DO NOT EDIT" comment to the pattern space.
> SED_HEADER_NOEDIT = lib/s,^,/* lib/DO lib/NOT lib/EDIT! lib/GENERATED 
> lib/AUTOMATICALLY! lib/*/,
> 
> # '$(SED_HEADER_STDOUT) -e "..."' runs 'sed' but first outputs "DO NOT EDIT".
> SED_HEADER_STDOUT = lib/sed \
>   -e x \
>   -e '1$(SED_HEADER_NOEDIT)p' \
>   -e x
> 
> # '$(SED_HEADER_TO_AT_t) FILE' copies FILE to $@-t, prepending a leading
> # "DO_NOT_EDIT".  Although this could be done more simply via:
> #     SED_HEADER_TO_AT_t = $(SED_HEADER_STDOUT) > $@-t
> # the -n and 'w's avoid a fork+exec, at least when GNU Make is used.
> SED_HEADER_TO_AT_t = lib/sed -n \
>   -e x \
>   -e '1$(SED_HEADER_NOEDIT)w $@-t' \
>   -e x \
>   -e 'w $@-t'
> 
> # Use $(gl_V_at) instead of $(AM_V_GEN) or $(AM_V_at) on a line that
> # is its recipe's first line if and only if  lines are absent.
> gl_V_at = $(AM_V_at)
> 
> ## end   gnulib module gen-header
> 
> --- end of piece of code ---
> 
>   Some definitions in the bootstrap.conf of groff:
> 
> gnulib_modules="
>     git-version-gen
>     havelib
>     wcwidth
>     fprintf-posix
>     snprintf
>     vsnprintf
>     gen-header
> "
> gnulib_tool_option_extras="--makefile-name=gnulib.mk --automake-subdir"

Thanks for the report. Fixed through this patch:


2021-12-28  Bruno Haible  <bruno@clisp.org>

        Fix --automake-subdir breakage (regression 2021-12-24).
        Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
        <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00156.html>.
        * build-aux/prefix-gnulib-mk (prefix_assignment): Don't change
        SED_HEADER_* variables.

diff --git a/build-aux/prefix-gnulib-mk b/build-aux/prefix-gnulib-mk
index 4f300c443..3763d6e85 100755
--- a/build-aux/prefix-gnulib-mk
+++ b/build-aux/prefix-gnulib-mk
@@ -133,8 +133,8 @@ sub prefix_assignment ($$)
     {
       # Do not change the RHS, which specifies the GPERF program.
     }
-  # Don't change variables such as HAVE_INCLUDE_NEXT.
-  elsif ($lhs_and_assign_op =~ /^HAVE_/)
+  # Don't change variables such as HAVE_INCLUDE_NEXT or SED_HEADER_STDOUT.
+  elsif ($lhs_and_assign_op =~ /^(HAVE_|SED_HEADER_)/)
     {
     }
   elsif ($lhs_and_assign_op =~






reply via email to

[Prev in Thread] Current Thread [Next in Thread]