[LTP] [PATCH] include config.mk and features.mk in env_pre.mk only if they exist

Jan Stancek jstancek@redhat.com
Mon Sep 21 15:52:58 CEST 2015





----- Original Message -----
> From: "Jan Stancek" <jstancek@redhat.com>
> To: ltp@lists.linux.it
> Sent: Monday, 21 September, 2015 3:32:09 PM
> Subject: [LTP] [PATCH] include config.mk and features.mk in env_pre.mk only	if they exist

please ignore, v2 sent with better description.

Regards,
Jan

> 
> $ git clean -f -d -x
> $ make autotools
> 
> now leads to an infinite loop, that is running help target:
> make -C /usr/src/ltp help; false
> make[1]: Entering directory `/usr/src/ltp'
> make -C /usr/src/ltp help; false
> make[2]: Entering directory `/usr/src/ltp'
> make -C /usr/src/ltp help; false
> make[3]: Entering directory `/usr/src/ltp'
> make -C /usr/src/ltp help; false
> ...
> 
> because include/mk/automake.mk has rule for these 2 files, which
> don't exist in clean tree. So it triggers help target, which again
> includes env_pre.mk and loop continues.
> 
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
>  include/mk/env_pre.mk | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/include/mk/env_pre.mk b/include/mk/env_pre.mk
> index 9c757e35e455..a7674141c83c 100644
> --- a/include/mk/env_pre.mk
> +++ b/include/mk/env_pre.mk
> @@ -98,8 +98,12 @@ endif
>  # which are filtered below (e.g. clean). However these config files may be
>  # needed for those targets (eg. the open posix testsuite is not cleaned even
>  if
>  # it's enabled by configure) thus it would be wise to do silent inclusion.
> --include $(abs_top_builddir)/include/mk/config.mk
> --include $(abs_top_builddir)/include/mk/features.mk
> +ifneq ($(wildcard $(abs_top_builddir)/include/mk/config.mk),)
> +include $(abs_top_builddir)/include/mk/config.mk
> +endif
> +ifneq ($(wildcard $(abs_top_builddir)/include/mk/features.mk),)
> +include $(abs_top_builddir)/include/mk/features.mk
> +endif
>  
>  # autotools, *clean, and help don't require config.mk, features.mk, etc...
>  ifeq ($(filter autotools %clean .gitignore gitignore.%
>  help,$(MAKECMDGOALS)),)
> --
> 1.8.3.1
> 
> 
> --
> Mailing list info: http://lists.linux.it/listinfo/ltp
> 


More information about the Ltp mailing list