* [LTP] [PATCH v2] avoid triggering config.mk/features.mk target in clean tree
@ 2015-09-21 13:52 Jan Stancek
2015-09-22 10:45 ` Cyril Hrubis
0 siblings, 1 reply; 3+ messages in thread
From: Jan Stancek @ 2015-09-21 13:52 UTC (permalink / raw)
To: ltp
After commit 60069253cbcd1bae213076b06f451a603f280064
Include config.mk and features.mk in env_pre.mk for all targets
$ git clean -f -d -x
$ make autotools
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 spawns new make for 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] 3+ messages in thread
* [LTP] [PATCH v2] avoid triggering config.mk/features.mk target in clean tree
2015-09-21 13:52 [LTP] [PATCH v2] avoid triggering config.mk/features.mk target in clean tree Jan Stancek
@ 2015-09-22 10:45 ` Cyril Hrubis
2015-09-22 10:48 ` Jan Stancek
0 siblings, 1 reply; 3+ messages in thread
From: Cyril Hrubis @ 2015-09-22 10:45 UTC (permalink / raw)
To: ltp
Hi!
> 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)),)
Looks good to me (thanks for fixing this). Also notice that we have
nearly identical patch from Yuriy Kolerov ([LTP] [PATCH] Fix including
config.mk and features.mk in env_pre.mk) sent to the list.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 3+ messages in thread
* [LTP] [PATCH v2] avoid triggering config.mk/features.mk target in clean tree
2015-09-22 10:45 ` Cyril Hrubis
@ 2015-09-22 10:48 ` Jan Stancek
0 siblings, 0 replies; 3+ messages in thread
From: Jan Stancek @ 2015-09-22 10:48 UTC (permalink / raw)
To: ltp
----- Original Message -----
> From: "Cyril Hrubis" <chrubis@suse.cz>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp@lists.linux.it, "yuriy kolerov" <yuriy.kolerov@synopsys.com>
> Sent: Tuesday, 22 September, 2015 12:45:04 PM
> Subject: Re: [PATCH v2] avoid triggering config.mk/features.mk target in clean tree
>
> Hi!
> > 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)),)
>
> Looks good to me (thanks for fixing this). Also notice that we have
> nearly identical patch from Yuriy Kolerov ([LTP] [PATCH] Fix including
> config.mk and features.mk in env_pre.mk) sent to the list.
My apologies, I missed his patch for some reason. I'll test/review his version.
Regards,
Jan
>
> --
> Cyril Hrubis
> chrubis@suse.cz
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-22 10:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-21 13:52 [LTP] [PATCH v2] avoid triggering config.mk/features.mk target in clean tree Jan Stancek
2015-09-22 10:45 ` Cyril Hrubis
2015-09-22 10:48 ` Jan Stancek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox