diff mbox

[1/5] Makefile: clean: Clean exe files

Message ID 20170705075411.6556-2-sameeh@daynix.com
State New
Headers show

Commit Message

Sameeh Jubran July 5, 2017, 7:54 a.m. UTC
From: Sameeh Jubran <sjubran@redhat.com>

Clean exe files such as qemu-ga.exe

Signed-off-by: Sameeh Jubran <sjubran@redhat.com>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

Philippe Mathieu-Daudé July 23, 2017, 2:08 p.m. UTC | #1
Hi Sameeh,

On 07/05/2017 04:54 AM, Sameeh Jubran wrote:
> From: Sameeh Jubran <sjubran@redhat.com>
> 
> Clean exe files such as qemu-ga.exe
> 
> Signed-off-by: Sameeh Jubran <sjubran@redhat.com>
> ---
>   Makefile | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/Makefile b/Makefile
> index 16a0430..22d29d6 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -487,6 +487,7 @@ clean:
>   	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
>   	rm -f qemu-options.def
>   	rm -f *.msi
> +	rm -f *${EXESUF}
>   	find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} +
>   	rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~

It seems to me your problem is here, this line should be:

- rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* 
*.pod *~ */*~
+ rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga${EXESUF} TAGS 
cscope.* *.pod *~ */*~

>   	rm -f fsdev/*.pod
> 

Regards,

Phil.
Peter Maydell July 23, 2017, 8:03 p.m. UTC | #2
On 5 July 2017 at 08:54, Sameeh Jubran <sameeh@daynix.com> wrote:
> From: Sameeh Jubran <sjubran@redhat.com>
>
> Clean exe files such as qemu-ga.exe
>
> Signed-off-by: Sameeh Jubran <sjubran@redhat.com>
> ---
>  Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Makefile b/Makefile
> index 16a0430..22d29d6 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -487,6 +487,7 @@ clean:
>         rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
>         rm -f qemu-options.def
>         rm -f *.msi
> +       rm -f *${EXESUF}

On every host OS except Windows, ${EXESUF} is defined
to be the empty string, which means that this will be
"rm -f *", which is probably not what we want...

thanks
-- PMM
Michael Roth July 25, 2017, 11:10 p.m. UTC | #3
Quoting Peter Maydell (2017-07-23 15:03:56)
> On 5 July 2017 at 08:54, Sameeh Jubran <sameeh@daynix.com> wrote:
> > From: Sameeh Jubran <sjubran@redhat.com>
> >
> > Clean exe files such as qemu-ga.exe
> >
> > Signed-off-by: Sameeh Jubran <sjubran@redhat.com>
> > ---
> >  Makefile | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/Makefile b/Makefile
> > index 16a0430..22d29d6 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -487,6 +487,7 @@ clean:
> >         rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
> >         rm -f qemu-options.def
> >         rm -f *.msi
> > +       rm -f *${EXESUF}
> 
> On every host OS except Windows, ${EXESUF} is defined
> to be the empty string, which means that this will be
> "rm -f *", which is probably not what we want...

Perhaps something like:

  clean:
    ...
  ifneq ($(EXESUF),)
    rm -f *${EXESUF}
  endif

?

> 
> thanks
> -- PMM
>
Philippe Mathieu-Daudé July 26, 2017, 1:54 a.m. UTC | #4
I purposed another fix for Sameeh's issue, see:
http://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg07597.html

On 07/25/2017 08:10 PM, Michael Roth wrote:
> Quoting Peter Maydell (2017-07-23 15:03:56)
>> On 5 July 2017 at 08:54, Sameeh Jubran <sameeh@daynix.com> wrote:
>>> From: Sameeh Jubran <sjubran@redhat.com>
>>>
>>> Clean exe files such as qemu-ga.exe
>>>
>>> Signed-off-by: Sameeh Jubran <sjubran@redhat.com>
>>> ---
>>>   Makefile | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/Makefile b/Makefile
>>> index 16a0430..22d29d6 100644
>>> --- a/Makefile
>>> +++ b/Makefile
>>> @@ -487,6 +487,7 @@ clean:
>>>          rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
>>>          rm -f qemu-options.def
>>>          rm -f *.msi
>>> +       rm -f *${EXESUF}
>>
>> On every host OS except Windows, ${EXESUF} is defined
>> to be the empty string, which means that this will be
>> "rm -f *", which is probably not what we want...
> 
> Perhaps something like:
> 
>    clean:
>      ...
>    ifneq ($(EXESUF),)
>      rm -f *${EXESUF}
>    endif
> 
> ?
> 
>>
>> thanks
>> -- PMM
>>
> 
>
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 16a0430..22d29d6 100644
--- a/Makefile
+++ b/Makefile
@@ -487,6 +487,7 @@  clean:
 	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
 	rm -f qemu-options.def
 	rm -f *.msi
+	rm -f *${EXESUF}
 	find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} +
 	rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~
 	rm -f fsdev/*.pod