Re: [LTP] [PATCH] Enable including config.mk and features.mk for *clean targets

2015-09-16 Thread Cyril Hrubis
Hi!
> Seems like it's a better and more concise solution. Need I to prepare and 
> send a second version of the PATCH?

Ideally yes, if you send a patch I will apply it right away.

-- 
Cyril Hrubis
chru...@suse.cz

--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140
___
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


Re: [LTP] [PATCH] Enable including config.mk and features.mk for *clean targets

2015-09-10 Thread Yuriy Kolerov
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:chru...@suse.cz] 
Sent: Tuesday, September 08, 2015 2:58 PM
To: Yuriy Kolerov
Cc: ltp-list@lists.sourceforge.net; anton.kole...@synopsys.com; 
francois.bed...@synopsys.com
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 <yuriy.kole...@synopsys.com>
> ---
>  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
chru...@suse.cz

--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991=/4140
___
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


Re: [LTP] [PATCH] Enable including config.mk and features.mk for *clean targets

2015-09-08 Thread Cyril Hrubis
Hi!
> I try to build LTP with POSIX testsuite and run "make clean". As a result 
> "testcases/open_posix_testsuite" is no cleaned properly. It happens because 
> that directory is filtered by "make" here:
> https://github.com/linux-test-project/ltp/blob/master/testcases/Makefile#L33
> 
> And it's filtered because WITH_OPEN_POSIX_TESTSUITE symbol is not defined 
> when you run "make clean". And it's not defined because "config.mk" and 
> "features.mk" are not included for "clean" target:
> https://github.com/linux-test-project/ltp/blob/master/include/mk/env_pre.mk#L98
> 
> So I've decided to include these configuration files for "clean" target too. 
> I've supposed that "clean" target may be invoked even if those files don't 
> exist so I've used error suppression mechanism.

Ah, right, now I understand what this fixes. I will have a look at the
patch.

-- 
Cyril Hrubis
chru...@suse.cz

--
___
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


Re: [LTP] [PATCH] Enable including config.mk and features.mk for *clean targets

2015-09-08 Thread Cyril Hrubis
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 
> ---
>  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
chru...@suse.cz

--
___
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


Re: [LTP] [PATCH] Enable including config.mk and features.mk for *clean targets

2015-09-07 Thread Cyril Hrubis
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.

What problem are you trying to fix? I cannot image how we can get into
state where the mk files generated by configure does not exist but the
tree is not clean. Unless one deletes them manually of course.

-- 
Cyril Hrubis
chru...@suse.cz

--
___
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


Re: [LTP] [PATCH] Enable including config.mk and features.mk for *clean targets

2015-09-07 Thread Yuriy Kolerov
Hi Cyril!

I try to build LTP with POSIX testsuite and run "make clean". As a result 
"testcases/open_posix_testsuite" is no cleaned properly. It happens because 
that directory is filtered by "make" here:
https://github.com/linux-test-project/ltp/blob/master/testcases/Makefile#L33

And it's filtered because WITH_OPEN_POSIX_TESTSUITE symbol is not defined when 
you run "make clean". And it's not defined because "config.mk" and 
"features.mk" are not included for "clean" target:
https://github.com/linux-test-project/ltp/blob/master/include/mk/env_pre.mk#L98

So I've decided to include these configuration files for "clean" target too. 
I've supposed that "clean" target may be invoked even if those files don't 
exist so I've used error suppression mechanism.

Regards,
Yuriy Kolerov


-Original Message-
From: Cyril Hrubis [mailto:chru...@suse.cz] 
Sent: Monday, September 07, 2015 6:30 PM
To: Yuriy Kolerov
Cc: ltp-list@lists.sourceforge.net; anton.kole...@synopsys.com; 
francois.bed...@synopsys.com
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.

What problem are you trying to fix? I cannot image how we can get into state 
where the mk files generated by configure does not exist but the tree is not 
clean. Unless one deletes them manually of course.

--
Cyril Hrubis
chru...@suse.cz

--
___
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list