bug-make
[Top][All Lists]
Advanced

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

Re: 4.4.1 breaks recursive invocation with --print-directory [when addin


From: Dmitry Goncharov
Subject: Re: 4.4.1 breaks recursive invocation with --print-directory [when adding to MAKEFLAGS]
Date: Tue, 28 Feb 2023 23:02:13 -0500

On Tue, Feb 28, 2023 at 8:41 PM Satish Balay via Bug reports and
discussion for GNU make <bug-make@gnu.org> wrote:
> $ cat makefile
> all:
>         @MAKEFLAGS="-j1 ${MAKEFLAGS}" ${MAKE} -f makefile hello
> hello:
>         @echo Hello

When you pass --print-directory MAKEFLAGS has the value "w".
When this makefile prepends -j1 the value of MAKEFLAGS becomes "-j1 w".
Among other changes short options are now in the first word on makeflags.

Well defined MAKEFLAGS has the following format
[shortoptions] [-option with arg]... [--long option]... [ -- cli definitions]

-j carries an argument and is supposed to follow short options.

If you change to
MAKEFLAGS="${MAKEFLAGS} -j1" $(MAKE) -f makefile hello
then it'll work.

i remember, Paul fixed something like this in glibc makefile.
However, since users can arrange flags in this random order, we'll
have to think what to do about this.
Thanks for your report.

regards, Dmitry



reply via email to

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