* [LTP] [PATCH] include config.mk and features.mk in env_pre.mk only if they exist
@ 2015-09-21 13:32 Jan Stancek
2015-09-21 13:52 ` Jan Stancek
0 siblings, 1 reply; 2+ messages in thread
From: Jan Stancek @ 2015-09-21 13:32 UTC (permalink / raw)
To: ltp
$ 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH] include config.mk and features.mk in env_pre.mk only if they exist
2015-09-21 13:32 [LTP] [PATCH] include config.mk and features.mk in env_pre.mk only if they exist Jan Stancek
@ 2015-09-21 13:52 ` Jan Stancek
0 siblings, 0 replies; 2+ messages in thread
From: Jan Stancek @ 2015-09-21 13:52 UTC (permalink / raw)
To: ltp
----- 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-21 13:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-21 13:32 [LTP] [PATCH] include config.mk and features.mk in env_pre.mk only if they exist Jan Stancek
2015-09-21 13:52 ` Jan Stancek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox