Subject: Re: [PATCH iproute2-next v3] lib/fs: fix issue when {name,open}_to_handle_at() is not implemented

From: Petr Vorel <[email-masked]>
Date: Sat, 15 May 2021 18:59:55 +0200

Hi David,
> On 5/14/21 6:20 AM, Petr Vorel wrote:

> >>> This causes compile failures if anyone is reusing a tree. It would be
> >>> good to require config.mk to be updated if configure is newer.
> >> Do you mean the config.mk should have a dependency to configure in the
> >> Makefile? Wouldn't that be better as a separate patch?
> > I guess it should be a separate patch. I'm surprised it wasn't needed before.

> yes, it should be a separate patch, but it needs to precede this one.

> This worked for me last weekend; I'll send it when I get a chance.

> diff --git a/Makefile b/Makefile
> index 19bd163e2e04..5bc11477ab7a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -60,7 +60,7 @@ SUBDIRS=lib ip tc bridge misc netem genl tipc devlink
> rdma dcb man vdpa
>  LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a
>  LDLIBS += $(LIBNETLINK)

> -all: config.mk
> +all: config
>         @set -e; \
>         for i in $(SUBDIRS); \
>         do echo; echo $$i; $(MAKE) -C $$i; done
> @@ -80,8 +80,10 @@ all: config.mk
>         @echo "Make Arguments:"
>         @echo " V=[0|1]             - set build verbosity level"

> -config.mk:
> -       sh configure $(KERNEL_INCLUDE)
> +config:
> +       @if [ ! -f config.mk -o configure -nt config.mk ]; then \
> +               sh configure $(KERNEL_INCLUDE); \
> +       fi

>  install: all
>         install -m 0755 -d $(DESTDIR)$(SBINDIR)

Thanks a lot, please send it.

I know this is only a fragment, but:
Reviewed-by: Petr Vorel <[email-masked]>

-nt is supported by dash and busybox sh.

Kind regards,
Petr