* [PATCH v2] tools/python: Improve .gitgnore and clean Makefile rule
@ 2014-07-07 10:26 Andrew Cooper
2014-07-09 15:47 ` Ian Campbell
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2014-07-07 10:26 UTC (permalink / raw)
To: Xen-devel; +Cc: Andrew Cooper, Ian Jackson, Ian Campbell
Ignore all intermediate python files, and use find in the clean rule as there
are no Makefiles in subdirectories to participate in a recursive clean.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
--
v2: Actually send the latest version of the patch
---
.gitignore | 1 +
tools/python/Makefile | 8 +++-----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/.gitignore b/.gitignore
index 562c262..cf9264f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,6 +16,7 @@
*.spit
*.gcno
*.gcda
+*.py[ocd]
TAGS
GTAGS
GRTAGS
diff --git a/tools/python/Makefile b/tools/python/Makefile
index eee746d..c914332 100644
--- a/tools/python/Makefile
+++ b/tools/python/Makefile
@@ -29,10 +29,8 @@ test:
.PHONY: clean
clean:
- rm -f $(XENPATH)
- rm -rf build/ *.pyc *.pyo *.o *.a *~ xen/util/auxbin.pyc
- rm -f xen/lowlevel/xl/_pyxl_types.h
- rm -f xen/lowlevel/xl/_pyxl_types.c
- rm -f $(DEPS)
+ find . \( -name "*.py[ocd]" -o -name "*~" -o -name "_*.[hc]" \) -delete
+ rm -rf build/
+ rm -f $(XENPATH) $(DEPS)
-include $(DEPS)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] tools/python: Improve .gitgnore and clean Makefile rule
2014-07-07 10:26 [PATCH v2] tools/python: Improve .gitgnore and clean Makefile rule Andrew Cooper
@ 2014-07-09 15:47 ` Ian Campbell
2014-07-09 16:07 ` Andrew Cooper
0 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2014-07-09 15:47 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Ian Jackson, Xen-devel
On Mon, 2014-07-07 at 11:26 +0100, Andrew Cooper wrote:
> Ignore all intermediate python files, and use find in the clean rule as there
> are no Makefiles in subdirectories to participate in a recursive clean.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> CC: Ian Campbell <Ian.Campbell@citrix.com>
> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
> diff --git a/.gitignore b/.gitignore
> index 562c262..cf9264f 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -16,6 +16,7 @@
> *.spit
> *.gcno
> *.gcda
> +*.py[ocd]
FWIW there are a bunch of explicit foo.pyc listed which could now be
removed I guess.
> - rm -f $(XENPATH)
> - rm -rf build/ *.pyc *.pyo *.o *.a *~ xen/util/auxbin.pyc
> - rm -f xen/lowlevel/xl/_pyxl_types.h
> - rm -f xen/lowlevel/xl/_pyxl_types.c
> - rm -f $(DEPS)
> + find . \( -name "*.py[ocd]" -o -name "*~" -o -name "_*.[hc]" \) -delete
I've assumed the lack of *.a in here is deliberate but *.o?
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] tools/python: Improve .gitgnore and clean Makefile rule
2014-07-09 15:47 ` Ian Campbell
@ 2014-07-09 16:07 ` Andrew Cooper
2014-07-09 16:49 ` Ian Campbell
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2014-07-09 16:07 UTC (permalink / raw)
To: Ian Campbell; +Cc: Ian Jackson, Xen-devel
On 09/07/14 16:47, Ian Campbell wrote:
> On Mon, 2014-07-07 at 11:26 +0100, Andrew Cooper wrote:
>> Ignore all intermediate python files, and use find in the clean rule as there
>> are no Makefiles in subdirectories to participate in a recursive clean.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> CC: Ian Campbell <Ian.Campbell@citrix.com>
>> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
>> diff --git a/.gitignore b/.gitignore
>> index 562c262..cf9264f 100644
>> --- a/.gitignore
>> +++ b/.gitignore
>> @@ -16,6 +16,7 @@
>> *.spit
>> *.gcno
>> *.gcda
>> +*.py[ocd]
> FWIW there are a bunch of explicit foo.pyc listed which could now be
> removed I guess.
True.
>
>> - rm -f $(XENPATH)
>> - rm -rf build/ *.pyc *.pyo *.o *.a *~ xen/util/auxbin.pyc
>> - rm -f xen/lowlevel/xl/_pyxl_types.h
>> - rm -f xen/lowlevel/xl/_pyxl_types.c
>> - rm -f $(DEPS)
>> + find . \( -name "*.py[ocd]" -o -name "*~" -o -name "_*.[hc]" \) -delete
> I've assumed the lack of *.a in here is deliberate but *.o?
>
> Ian.
>
No object files or libraries will be generated outside of build/
If we wish to cater to devs doing out-of-band builds in subdirectires
then more than .o and .a should be included in this find.
~Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] tools/python: Improve .gitgnore and clean Makefile rule
2014-07-09 16:07 ` Andrew Cooper
@ 2014-07-09 16:49 ` Ian Campbell
2014-07-10 10:33 ` Ian Campbell
0 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2014-07-09 16:49 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Ian Jackson, Xen-devel
On Wed, 2014-07-09 at 17:07 +0100, Andrew Cooper wrote:
> On 09/07/14 16:47, Ian Campbell wrote:
> > On Mon, 2014-07-07 at 11:26 +0100, Andrew Cooper wrote:
> >> Ignore all intermediate python files, and use find in the clean rule as there
> >> are no Makefiles in subdirectories to participate in a recursive clean.
> >>
> >> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> >> CC: Ian Campbell <Ian.Campbell@citrix.com>
> >> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
> >> diff --git a/.gitignore b/.gitignore
> >> index 562c262..cf9264f 100644
> >> --- a/.gitignore
> >> +++ b/.gitignore
> >> @@ -16,6 +16,7 @@
> >> *.spit
> >> *.gcno
> >> *.gcda
> >> +*.py[ocd]
> > FWIW there are a bunch of explicit foo.pyc listed which could now be
> > removed I guess.
>
> True.
>
> >
> >> - rm -f $(XENPATH)
> >> - rm -rf build/ *.pyc *.pyo *.o *.a *~ xen/util/auxbin.pyc
> >> - rm -f xen/lowlevel/xl/_pyxl_types.h
> >> - rm -f xen/lowlevel/xl/_pyxl_types.c
> >> - rm -f $(DEPS)
> >> + find . \( -name "*.py[ocd]" -o -name "*~" -o -name "_*.[hc]" \) -delete
> > I've assumed the lack of *.a in here is deliberate but *.o?
> >
> > Ian.
> >
>
> No object files or libraries will be generated outside of build/
Ah, right.
> If we wish to cater to devs doing out-of-band builds in subdirectires
> then more than .o and .a should be included in this find.
no need: Acked-by: Ian Campbell <ian.campbell@citrix.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] tools/python: Improve .gitgnore and clean Makefile rule
2014-07-09 16:49 ` Ian Campbell
@ 2014-07-10 10:33 ` Ian Campbell
0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2014-07-10 10:33 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Ian Jackson, Xen-devel
On Wed, 2014-07-09 at 17:49 +0100, Ian Campbell wrote:
> > If we wish to cater to devs doing out-of-band builds in subdirectires
> > then more than .o and .a should be included in this find.
>
> no need: Acked-by: Ian Campbell <ian.campbell@citrix.com>
and applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-07-10 10:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-07 10:26 [PATCH v2] tools/python: Improve .gitgnore and clean Makefile rule Andrew Cooper
2014-07-09 15:47 ` Ian Campbell
2014-07-09 16:07 ` Andrew Cooper
2014-07-09 16:49 ` Ian Campbell
2014-07-10 10:33 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.