From: Yuriy K. <Yur...@sy...> - 2015-09-10 16:49:14
|
Hi Cyril, Seems like it's a better and more concise solution. Need I to prepare and send a second version of the PATCH? Regards, Yuriy Kolerov -----Original Message----- From: Cyril Hrubis [mailto:ch...@su...] Sent: Tuesday, September 08, 2015 2:58 PM To: Yuriy Kolerov Cc: ltp...@li...; Ant...@sy...; Fra...@sy... Subject: Re: [LTP] [PATCH] Enable including config.mk and features.mk for *clean targets Hi! > It's necessary for correct cleaning. E.g. open_posix_testsuite is not > cleaned without including these .mk files. However it's not an error > if these files does not exist while cleaning. > > Signed-off-by: Yuriy Kolerov <yur...@sy...> > --- > include/mk/env_pre.mk | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/include/mk/env_pre.mk b/include/mk/env_pre.mk index > f1584a8..a6beb5b 100644 > --- a/include/mk/env_pre.mk > +++ b/include/mk/env_pre.mk > @@ -94,11 +94,18 @@ ifeq ($(srcdir),) > srcdir := . > endif > > -# autotools, *clean, and help don't require config.mk, features.mk, etc... > -ifeq ($(filter autotools %clean .gitignore gitignore.% > help,$(MAKECMDGOALS)),) > +# autotools and help don't require config.mk, features.mk, etc... > +ifeq ($(filter autotools .gitignore gitignore.% > +help,$(MAKECMDGOALS)),) > > +# If config.mk and features.mk does not exist it's not an error for > +*clean # targets. > +ifeq ($(filter %clean,$(MAKECMDGOALS)),) > include $(abs_top_builddir)/include/mk/config.mk > include $(abs_top_builddir)/include/mk/features.mk > +else > +-include $(abs_top_builddir)/include/mk/config.mk > +-include $(abs_top_builddir)/include/mk/features.mk > +endif Hmm, besides including the config.mk this also enables the out-of-tree build checks and make 3.80 compatibility targets. Not that it's apriory wrong but I would rather be more conservative and only include the config.mk and features.mk. One option would be to add the: -include $(abs_top_builddir)/include/mk/config.mk -include $(abs_top_builddir)/include/mk/features.mk before the ifeq that filters out the autotools, clean, etc. targets. What do you think? -- Cyril Hrubis ch...@su... |