* [PATCH] stubdom: simplify and fix Makefile
@ 2016-11-04 9:53 Juergen Gross
2016-11-04 9:56 ` Samuel Thibault
2016-11-04 14:20 ` Wei Liu
0 siblings, 2 replies; 7+ messages in thread
From: Juergen Gross @ 2016-11-04 9:53 UTC (permalink / raw)
To: xen-devel; +Cc: Juergen Gross, samuel.thibault, wei.liu2
The stubdom Makefile is setting up links for various libraries. This
is done only once when qemu links are created and each library's links
are updated/created only if the link for the Makefile of the library
isn't already existing. In case a source is added to one library after
doing the first make of stubdom the new source won't be linked by a
new call of make.
Instead of testing the existence of the Makefile link use a make
dependency which will catch changes of the linked Makefile, too.
At the same time don't repeat the same link pattern 7 times but use a
make macro to do the linking.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
stubdom/Makefile | 77 ++++++++++++++++++++++++++------------------------------
1 file changed, 35 insertions(+), 42 deletions(-)
diff --git a/stubdom/Makefile b/stubdom/Makefile
index 2921f30..9b30b58 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -305,7 +305,41 @@ ioemu/linkfarm.stamp:
touch ioemu/linkfarm.stamp
endif
-mk-headers-$(XEN_TARGET_ARCH): $(IOEMU_LINKFARM_TARGET)
+define do_links
+ touch $@
+ mkdir -p $(dir $@)include
+ cd $(dir $@); \
+ ln -sf $(dir $<)include/*.h include/; \
+ ln -sf $(dir $<)*.[ch] .; \
+ ln -sf $(dir $<)Makefile .
+endef
+
+libs-$(XEN_TARGET_ARCH)/toollog/stamp: $(XEN_ROOT)/tools/libs/toollog/Makefile
+ $(do_links)
+
+libs-$(XEN_TARGET_ARCH)/evtchn/stamp: $(XEN_ROOT)/tools/libs/evtchn/Makefile
+ $(do_links)
+
+libs-$(XEN_TARGET_ARCH)/gnttab/stamp: $(XEN_ROOT)/tools/libs/gnttab/Makefile
+ $(do_links)
+
+libs-$(XEN_TARGET_ARCH)/call/stamp: $(XEN_ROOT)/tools/libs/call/Makefile
+ $(do_links)
+
+libs-$(XEN_TARGET_ARCH)/foreignmemory/stamp: $(XEN_ROOT)/tools/libs/foreignmemory/Makefile
+ $(do_links)
+
+libxc-$(XEN_TARGET_ARCH)/stamp: $(XEN_ROOT)/tools/libxc/Makefile
+ $(do_links)
+
+xenstore/stamp: $(XEN_ROOT)/tools/xenstore/Makefile
+ $(do_links)
+
+LINK_LIBS_DIRS := toollog evtchn gnttab call foreignmemory
+LINK_DIRS := libxc-$(XEN_TARGET_ARCH) xenstore $(foreach dir,$(LINK_LIBS_DIRS),libs-$(XEN_TARGET_ARCH)/$(dir))
+LINK_STAMPS := $(foreach dir,$(LINK_DIRS),$(dir)/stamp)
+
+mk-headers-$(XEN_TARGET_ARCH): $(IOEMU_LINKFARM_TARGET) $(LINK_STAMPS)
$(MAKE) -C $(XEN_ROOT)/tools/include
mkdir -p include/xen && \
ln -sf $(wildcard $(XEN_ROOT)/xen/include/public/*.h) include/xen && \
@@ -316,47 +350,6 @@ mk-headers-$(XEN_TARGET_ARCH): $(IOEMU_LINKFARM_TARGET)
ln -sf $(wildcard $(XEN_ROOT)/tools/include/xen-foreign/*) include/xen-foreign/ && \
$(MAKE) DESTDIR= -C include/xen-foreign/ && \
( [ -h include/xen/foreign ] || ln -sf ../xen-foreign include/xen/foreign )
- mkdir -p libs-$(XEN_TARGET_ARCH)/toollog/include
- [ -h libs-$(XEN_TARGET_ARCH)/toollog/Makefile ] || ( cd libs-$(XEN_TARGET_ARCH)/toollog && \
- ln -sf $(XEN_ROOT)/tools/libs/toollog/include/*.h include/ && \
- ln -sf $(XEN_ROOT)/tools/libs/toollog/*.c . && \
- ln -sf $(XEN_ROOT)/tools/libs/toollog/Makefile . )
- mkdir -p libs-$(XEN_TARGET_ARCH)/evtchn/include
- [ -h libs-$(XEN_TARGET_ARCH)/evtchn/Makefile ] || ( cd libs-$(XEN_TARGET_ARCH)/evtchn && \
- ln -sf $(XEN_ROOT)/tools/libs/evtchn/*.h . && \
- ln -sf $(XEN_ROOT)/tools/libs/evtchn/include/*.h include/ && \
- ln -sf $(XEN_ROOT)/tools/libs/evtchn/*.c . && \
- ln -sf $(XEN_ROOT)/tools/libs/evtchn/Makefile . )
- mkdir -p libs-$(XEN_TARGET_ARCH)/gnttab/include
- [ -h libs-$(XEN_TARGET_ARCH)/gnttab/Makefile ] || ( cd libs-$(XEN_TARGET_ARCH)/gnttab && \
- ln -sf $(XEN_ROOT)/tools/libs/gnttab/*.h . && \
- ln -sf $(XEN_ROOT)/tools/libs/gnttab/include/*.h include/ && \
- ln -sf $(XEN_ROOT)/tools/libs/gnttab/*.c . && \
- ln -sf $(XEN_ROOT)/tools/libs/gnttab/Makefile . )
- mkdir -p libs-$(XEN_TARGET_ARCH)/call/include
- [ -h libs-$(XEN_TARGET_ARCH)/call/Makefile ] || ( cd libs-$(XEN_TARGET_ARCH)/call && \
- ln -sf $(XEN_ROOT)/tools/libs/call/*.h . && \
- ln -sf $(XEN_ROOT)/tools/libs/call/include/*.h include/ && \
- ln -sf $(XEN_ROOT)/tools/libs/call/*.c . && \
- ln -sf $(XEN_ROOT)/tools/libs/call/Makefile . )
- mkdir -p libs-$(XEN_TARGET_ARCH)/foreignmemory/include
- [ -h libs-$(XEN_TARGET_ARCH)/foreignmemory/Makefile ] || ( cd libs-$(XEN_TARGET_ARCH)/foreignmemory && \
- ln -sf $(XEN_ROOT)/tools/libs/foreignmemory/*.h . && \
- ln -sf $(XEN_ROOT)/tools/libs/foreignmemory/include/*.h include/ && \
- ln -sf $(XEN_ROOT)/tools/libs/foreignmemory/*.c . && \
- ln -sf $(XEN_ROOT)/tools/libs/foreignmemory/Makefile . )
- mkdir -p libxc-$(XEN_TARGET_ARCH)/include
- [ -h libxc-$(XEN_TARGET_ARCH)/Makefile ] || ( cd libxc-$(XEN_TARGET_ARCH) && \
- ln -sf $(XEN_ROOT)/tools/libxc/*.h . && \
- ln -sf $(XEN_ROOT)/tools/libxc/include/*.h include/ && \
- ln -sf $(XEN_ROOT)/tools/libxc/*.c . && \
- ln -sf $(XEN_ROOT)/tools/libxc/Makefile . )
- mkdir -p xenstore/include
- [ -h xenstore/Makefile ] || ( cd xenstore && \
- ln -sf $(XEN_ROOT)/tools/xenstore/*.c . && \
- ln -sf $(XEN_ROOT)/tools/xenstore/*.h . && \
- ln -sf $(XEN_ROOT)/tools/xenstore/include/*.h include/ && \
- ln -sf $(XEN_ROOT)/tools/xenstore/Makefile . )
$(MAKE) DESTDIR= -C $(MINI_OS) links
touch mk-headers-$(XEN_TARGET_ARCH)
--
2.6.6
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] stubdom: simplify and fix Makefile
2016-11-04 9:53 [PATCH] stubdom: simplify and fix Makefile Juergen Gross
@ 2016-11-04 9:56 ` Samuel Thibault
2016-11-04 14:20 ` Wei Liu
1 sibling, 0 replies; 7+ messages in thread
From: Samuel Thibault @ 2016-11-04 9:56 UTC (permalink / raw)
To: Juergen Gross; +Cc: wei.liu2, xen-devel
Juergen Gross, on Fri 04 Nov 2016 10:53:29 +0100, wrote:
> The stubdom Makefile is setting up links for various libraries. This
> is done only once when qemu links are created and each library's links
> are updated/created only if the link for the Makefile of the library
> isn't already existing. In case a source is added to one library after
> doing the first make of stubdom the new source won't be linked by a
> new call of make.
>
> Instead of testing the existence of the Makefile link use a make
> dependency which will catch changes of the linked Makefile, too.
>
> At the same time don't repeat the same link pattern 7 times but use a
> make macro to do the linking.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
> stubdom/Makefile | 77 ++++++++++++++++++++++++++------------------------------
> 1 file changed, 35 insertions(+), 42 deletions(-)
>
> diff --git a/stubdom/Makefile b/stubdom/Makefile
> index 2921f30..9b30b58 100644
> --- a/stubdom/Makefile
> +++ b/stubdom/Makefile
> @@ -305,7 +305,41 @@ ioemu/linkfarm.stamp:
> touch ioemu/linkfarm.stamp
> endif
>
> -mk-headers-$(XEN_TARGET_ARCH): $(IOEMU_LINKFARM_TARGET)
> +define do_links
> + touch $@
> + mkdir -p $(dir $@)include
> + cd $(dir $@); \
> + ln -sf $(dir $<)include/*.h include/; \
> + ln -sf $(dir $<)*.[ch] .; \
> + ln -sf $(dir $<)Makefile .
> +endef
> +
> +libs-$(XEN_TARGET_ARCH)/toollog/stamp: $(XEN_ROOT)/tools/libs/toollog/Makefile
> + $(do_links)
> +
> +libs-$(XEN_TARGET_ARCH)/evtchn/stamp: $(XEN_ROOT)/tools/libs/evtchn/Makefile
> + $(do_links)
> +
> +libs-$(XEN_TARGET_ARCH)/gnttab/stamp: $(XEN_ROOT)/tools/libs/gnttab/Makefile
> + $(do_links)
> +
> +libs-$(XEN_TARGET_ARCH)/call/stamp: $(XEN_ROOT)/tools/libs/call/Makefile
> + $(do_links)
> +
> +libs-$(XEN_TARGET_ARCH)/foreignmemory/stamp: $(XEN_ROOT)/tools/libs/foreignmemory/Makefile
> + $(do_links)
> +
> +libxc-$(XEN_TARGET_ARCH)/stamp: $(XEN_ROOT)/tools/libxc/Makefile
> + $(do_links)
> +
> +xenstore/stamp: $(XEN_ROOT)/tools/xenstore/Makefile
> + $(do_links)
> +
> +LINK_LIBS_DIRS := toollog evtchn gnttab call foreignmemory
> +LINK_DIRS := libxc-$(XEN_TARGET_ARCH) xenstore $(foreach dir,$(LINK_LIBS_DIRS),libs-$(XEN_TARGET_ARCH)/$(dir))
> +LINK_STAMPS := $(foreach dir,$(LINK_DIRS),$(dir)/stamp)
> +
> +mk-headers-$(XEN_TARGET_ARCH): $(IOEMU_LINKFARM_TARGET) $(LINK_STAMPS)
> $(MAKE) -C $(XEN_ROOT)/tools/include
> mkdir -p include/xen && \
> ln -sf $(wildcard $(XEN_ROOT)/xen/include/public/*.h) include/xen && \
> @@ -316,47 +350,6 @@ mk-headers-$(XEN_TARGET_ARCH): $(IOEMU_LINKFARM_TARGET)
> ln -sf $(wildcard $(XEN_ROOT)/tools/include/xen-foreign/*) include/xen-foreign/ && \
> $(MAKE) DESTDIR= -C include/xen-foreign/ && \
> ( [ -h include/xen/foreign ] || ln -sf ../xen-foreign include/xen/foreign )
> - mkdir -p libs-$(XEN_TARGET_ARCH)/toollog/include
> - [ -h libs-$(XEN_TARGET_ARCH)/toollog/Makefile ] || ( cd libs-$(XEN_TARGET_ARCH)/toollog && \
> - ln -sf $(XEN_ROOT)/tools/libs/toollog/include/*.h include/ && \
> - ln -sf $(XEN_ROOT)/tools/libs/toollog/*.c . && \
> - ln -sf $(XEN_ROOT)/tools/libs/toollog/Makefile . )
> - mkdir -p libs-$(XEN_TARGET_ARCH)/evtchn/include
> - [ -h libs-$(XEN_TARGET_ARCH)/evtchn/Makefile ] || ( cd libs-$(XEN_TARGET_ARCH)/evtchn && \
> - ln -sf $(XEN_ROOT)/tools/libs/evtchn/*.h . && \
> - ln -sf $(XEN_ROOT)/tools/libs/evtchn/include/*.h include/ && \
> - ln -sf $(XEN_ROOT)/tools/libs/evtchn/*.c . && \
> - ln -sf $(XEN_ROOT)/tools/libs/evtchn/Makefile . )
> - mkdir -p libs-$(XEN_TARGET_ARCH)/gnttab/include
> - [ -h libs-$(XEN_TARGET_ARCH)/gnttab/Makefile ] || ( cd libs-$(XEN_TARGET_ARCH)/gnttab && \
> - ln -sf $(XEN_ROOT)/tools/libs/gnttab/*.h . && \
> - ln -sf $(XEN_ROOT)/tools/libs/gnttab/include/*.h include/ && \
> - ln -sf $(XEN_ROOT)/tools/libs/gnttab/*.c . && \
> - ln -sf $(XEN_ROOT)/tools/libs/gnttab/Makefile . )
> - mkdir -p libs-$(XEN_TARGET_ARCH)/call/include
> - [ -h libs-$(XEN_TARGET_ARCH)/call/Makefile ] || ( cd libs-$(XEN_TARGET_ARCH)/call && \
> - ln -sf $(XEN_ROOT)/tools/libs/call/*.h . && \
> - ln -sf $(XEN_ROOT)/tools/libs/call/include/*.h include/ && \
> - ln -sf $(XEN_ROOT)/tools/libs/call/*.c . && \
> - ln -sf $(XEN_ROOT)/tools/libs/call/Makefile . )
> - mkdir -p libs-$(XEN_TARGET_ARCH)/foreignmemory/include
> - [ -h libs-$(XEN_TARGET_ARCH)/foreignmemory/Makefile ] || ( cd libs-$(XEN_TARGET_ARCH)/foreignmemory && \
> - ln -sf $(XEN_ROOT)/tools/libs/foreignmemory/*.h . && \
> - ln -sf $(XEN_ROOT)/tools/libs/foreignmemory/include/*.h include/ && \
> - ln -sf $(XEN_ROOT)/tools/libs/foreignmemory/*.c . && \
> - ln -sf $(XEN_ROOT)/tools/libs/foreignmemory/Makefile . )
> - mkdir -p libxc-$(XEN_TARGET_ARCH)/include
> - [ -h libxc-$(XEN_TARGET_ARCH)/Makefile ] || ( cd libxc-$(XEN_TARGET_ARCH) && \
> - ln -sf $(XEN_ROOT)/tools/libxc/*.h . && \
> - ln -sf $(XEN_ROOT)/tools/libxc/include/*.h include/ && \
> - ln -sf $(XEN_ROOT)/tools/libxc/*.c . && \
> - ln -sf $(XEN_ROOT)/tools/libxc/Makefile . )
> - mkdir -p xenstore/include
> - [ -h xenstore/Makefile ] || ( cd xenstore && \
> - ln -sf $(XEN_ROOT)/tools/xenstore/*.c . && \
> - ln -sf $(XEN_ROOT)/tools/xenstore/*.h . && \
> - ln -sf $(XEN_ROOT)/tools/xenstore/include/*.h include/ && \
> - ln -sf $(XEN_ROOT)/tools/xenstore/Makefile . )
> $(MAKE) DESTDIR= -C $(MINI_OS) links
> touch mk-headers-$(XEN_TARGET_ARCH)
>
> --
> 2.6.6
>
--
Samuel
<v> je viens d'inventer mutt version magritte :D
<y> ?
<v> dans mutt
<v> tape "cceci" return
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] stubdom: simplify and fix Makefile
2016-11-04 9:53 [PATCH] stubdom: simplify and fix Makefile Juergen Gross
2016-11-04 9:56 ` Samuel Thibault
@ 2016-11-04 14:20 ` Wei Liu
2016-11-04 14:29 ` Juergen Gross
1 sibling, 1 reply; 7+ messages in thread
From: Wei Liu @ 2016-11-04 14:20 UTC (permalink / raw)
To: Juergen Gross; +Cc: samuel.thibault, wei.liu2, xen-devel
On Fri, Nov 04, 2016 at 10:53:29AM +0100, Juergen Gross wrote:
> The stubdom Makefile is setting up links for various libraries. This
> is done only once when qemu links are created and each library's links
> are updated/created only if the link for the Makefile of the library
> isn't already existing. In case a source is added to one library after
> doing the first make of stubdom the new source won't be linked by a
> new call of make.
>
I think this is a bug, hence I intend to take this patch in 4.8.
> Instead of testing the existence of the Makefile link use a make
> dependency which will catch changes of the linked Makefile, too.
>
> At the same time don't repeat the same link pattern 7 times but use a
> make macro to do the linking.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
> stubdom/Makefile | 77 ++++++++++++++++++++++++++------------------------------
> 1 file changed, 35 insertions(+), 42 deletions(-)
>
> diff --git a/stubdom/Makefile b/stubdom/Makefile
> index 2921f30..9b30b58 100644
> --- a/stubdom/Makefile
> +++ b/stubdom/Makefile
> @@ -305,7 +305,41 @@ ioemu/linkfarm.stamp:
> touch ioemu/linkfarm.stamp
> endif
>
> -mk-headers-$(XEN_TARGET_ARCH): $(IOEMU_LINKFARM_TARGET)
> +define do_links
> + touch $@
This should be moved to the last line of this macro.
If you agree on this, I can fix it up while committing.
> + mkdir -p $(dir $@)include
> + cd $(dir $@); \
> + ln -sf $(dir $<)include/*.h include/; \
> + ln -sf $(dir $<)*.[ch] .; \
> + ln -sf $(dir $<)Makefile .
> +endef
> +
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] stubdom: simplify and fix Makefile
2016-11-04 14:20 ` Wei Liu
@ 2016-11-04 14:29 ` Juergen Gross
2016-11-04 14:31 ` Wei Liu
0 siblings, 1 reply; 7+ messages in thread
From: Juergen Gross @ 2016-11-04 14:29 UTC (permalink / raw)
To: Wei Liu; +Cc: samuel.thibault, xen-devel
On 04/11/16 15:20, Wei Liu wrote:
> On Fri, Nov 04, 2016 at 10:53:29AM +0100, Juergen Gross wrote:
>> The stubdom Makefile is setting up links for various libraries. This
>> is done only once when qemu links are created and each library's links
>> are updated/created only if the link for the Makefile of the library
>> isn't already existing. In case a source is added to one library after
>> doing the first make of stubdom the new source won't be linked by a
>> new call of make.
>>
>
> I think this is a bug, hence I intend to take this patch in 4.8.
I wouldn't mind. OTOH this bug will surface only when modifying the
code, so it isn't a severe one. Normally you'll notice a build error
which will be gone after cleaning the tree.
Juergen
>
>> Instead of testing the existence of the Makefile link use a make
>> dependency which will catch changes of the linked Makefile, too.
>>
>> At the same time don't repeat the same link pattern 7 times but use a
>> make macro to do the linking.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>> stubdom/Makefile | 77 ++++++++++++++++++++++++++------------------------------
>> 1 file changed, 35 insertions(+), 42 deletions(-)
>>
>> diff --git a/stubdom/Makefile b/stubdom/Makefile
>> index 2921f30..9b30b58 100644
>> --- a/stubdom/Makefile
>> +++ b/stubdom/Makefile
>> @@ -305,7 +305,41 @@ ioemu/linkfarm.stamp:
>> touch ioemu/linkfarm.stamp
>> endif
>>
>> -mk-headers-$(XEN_TARGET_ARCH): $(IOEMU_LINKFARM_TARGET)
>> +define do_links
>> + touch $@
>
> This should be moved to the last line of this macro.
>
> If you agree on this, I can fix it up while committing.
>
>> + mkdir -p $(dir $@)include
>> + cd $(dir $@); \
>> + ln -sf $(dir $<)include/*.h include/; \
>> + ln -sf $(dir $<)*.[ch] .; \
>> + ln -sf $(dir $<)Makefile .
>> +endef
>> +
>
> Wei.
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] stubdom: simplify and fix Makefile
2016-11-04 14:29 ` Juergen Gross
@ 2016-11-04 14:31 ` Wei Liu
2016-11-04 14:44 ` Juergen Gross
0 siblings, 1 reply; 7+ messages in thread
From: Wei Liu @ 2016-11-04 14:31 UTC (permalink / raw)
To: Juergen Gross; +Cc: samuel.thibault, Wei Liu, xen-devel
On Fri, Nov 04, 2016 at 03:29:01PM +0100, Juergen Gross wrote:
> On 04/11/16 15:20, Wei Liu wrote:
> > On Fri, Nov 04, 2016 at 10:53:29AM +0100, Juergen Gross wrote:
> >> The stubdom Makefile is setting up links for various libraries. This
> >> is done only once when qemu links are created and each library's links
> >> are updated/created only if the link for the Makefile of the library
> >> isn't already existing. In case a source is added to one library after
> >> doing the first make of stubdom the new source won't be linked by a
> >> new call of make.
> >>
> >
> > I think this is a bug, hence I intend to take this patch in 4.8.
>
> I wouldn't mind. OTOH this bug will surface only when modifying the
> code, so it isn't a severe one. Normally you'll notice a build error
> which will be gone after cleaning the tree.
>
Alright. If you don't feel strongly about this, I'm fine with putting it
to my -next branch, too.
>
> Juergen
>
> >
> >> Instead of testing the existence of the Makefile link use a make
> >> dependency which will catch changes of the linked Makefile, too.
> >>
> >> At the same time don't repeat the same link pattern 7 times but use a
> >> make macro to do the linking.
> >>
> >> Signed-off-by: Juergen Gross <jgross@suse.com>
> >> ---
> >> stubdom/Makefile | 77 ++++++++++++++++++++++++++------------------------------
> >> 1 file changed, 35 insertions(+), 42 deletions(-)
> >>
> >> diff --git a/stubdom/Makefile b/stubdom/Makefile
> >> index 2921f30..9b30b58 100644
> >> --- a/stubdom/Makefile
> >> +++ b/stubdom/Makefile
> >> @@ -305,7 +305,41 @@ ioemu/linkfarm.stamp:
> >> touch ioemu/linkfarm.stamp
> >> endif
> >>
> >> -mk-headers-$(XEN_TARGET_ARCH): $(IOEMU_LINKFARM_TARGET)
> >> +define do_links
> >> + touch $@
> >
> > This should be moved to the last line of this macro.
> >
> > If you agree on this, I can fix it up while committing.
> >
What about this comment?
Wei.
> >> + mkdir -p $(dir $@)include
> >> + cd $(dir $@); \
> >> + ln -sf $(dir $<)include/*.h include/; \
> >> + ln -sf $(dir $<)*.[ch] .; \
> >> + ln -sf $(dir $<)Makefile .
> >> +endef
> >> +
> >
> > Wei.
> >
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] stubdom: simplify and fix Makefile
2016-11-04 14:31 ` Wei Liu
@ 2016-11-04 14:44 ` Juergen Gross
2016-11-04 14:59 ` Wei Liu
0 siblings, 1 reply; 7+ messages in thread
From: Juergen Gross @ 2016-11-04 14:44 UTC (permalink / raw)
To: Wei Liu; +Cc: samuel.thibault, xen-devel
On 04/11/16 15:31, Wei Liu wrote:
> On Fri, Nov 04, 2016 at 03:29:01PM +0100, Juergen Gross wrote:
>> On 04/11/16 15:20, Wei Liu wrote:
>>> On Fri, Nov 04, 2016 at 10:53:29AM +0100, Juergen Gross wrote:
>>>> The stubdom Makefile is setting up links for various libraries. This
>>>> is done only once when qemu links are created and each library's links
>>>> are updated/created only if the link for the Makefile of the library
>>>> isn't already existing. In case a source is added to one library after
>>>> doing the first make of stubdom the new source won't be linked by a
>>>> new call of make.
>>>>
>>>
>>> I think this is a bug, hence I intend to take this patch in 4.8.
>>
>> I wouldn't mind. OTOH this bug will surface only when modifying the
>> code, so it isn't a severe one. Normally you'll notice a build error
>> which will be gone after cleaning the tree.
>>
>
> Alright. If you don't feel strongly about this, I'm fine with putting it
> to my -next branch, too.
Fine with me.
>
>>
>> Juergen
>>
>>>
>>>> Instead of testing the existence of the Makefile link use a make
>>>> dependency which will catch changes of the linked Makefile, too.
>>>>
>>>> At the same time don't repeat the same link pattern 7 times but use a
>>>> make macro to do the linking.
>>>>
>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>> ---
>>>> stubdom/Makefile | 77 ++++++++++++++++++++++++++------------------------------
>>>> 1 file changed, 35 insertions(+), 42 deletions(-)
>>>>
>>>> diff --git a/stubdom/Makefile b/stubdom/Makefile
>>>> index 2921f30..9b30b58 100644
>>>> --- a/stubdom/Makefile
>>>> +++ b/stubdom/Makefile
>>>> @@ -305,7 +305,41 @@ ioemu/linkfarm.stamp:
>>>> touch ioemu/linkfarm.stamp
>>>> endif
>>>>
>>>> -mk-headers-$(XEN_TARGET_ARCH): $(IOEMU_LINKFARM_TARGET)
>>>> +define do_links
>>>> + touch $@
>>>
>>> This should be moved to the last line of this macro.
>>>
>>> If you agree on this, I can fix it up while committing.
>>>
>
> What about this comment?
Aah, sorry. Didn't scroll down.
I agree.
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] stubdom: simplify and fix Makefile
2016-11-04 14:44 ` Juergen Gross
@ 2016-11-04 14:59 ` Wei Liu
0 siblings, 0 replies; 7+ messages in thread
From: Wei Liu @ 2016-11-04 14:59 UTC (permalink / raw)
To: Juergen Gross; +Cc: samuel.thibault, Wei Liu, xen-devel
On Fri, Nov 04, 2016 at 03:44:12PM +0100, Juergen Gross wrote:
> On 04/11/16 15:31, Wei Liu wrote:
> > On Fri, Nov 04, 2016 at 03:29:01PM +0100, Juergen Gross wrote:
> >> On 04/11/16 15:20, Wei Liu wrote:
> >>> On Fri, Nov 04, 2016 at 10:53:29AM +0100, Juergen Gross wrote:
> >>>> The stubdom Makefile is setting up links for various libraries. This
> >>>> is done only once when qemu links are created and each library's links
> >>>> are updated/created only if the link for the Makefile of the library
> >>>> isn't already existing. In case a source is added to one library after
> >>>> doing the first make of stubdom the new source won't be linked by a
> >>>> new call of make.
> >>>>
> >>>
> >>> I think this is a bug, hence I intend to take this patch in 4.8.
> >>
> >> I wouldn't mind. OTOH this bug will surface only when modifying the
> >> code, so it isn't a severe one. Normally you'll notice a build error
> >> which will be gone after cleaning the tree.
> >>
> >
> > Alright. If you don't feel strongly about this, I'm fine with putting it
> > to my -next branch, too.
>
> Fine with me.
>
> >
> >>
> >> Juergen
> >>
> >>>
> >>>> Instead of testing the existence of the Makefile link use a make
> >>>> dependency which will catch changes of the linked Makefile, too.
> >>>>
> >>>> At the same time don't repeat the same link pattern 7 times but use a
> >>>> make macro to do the linking.
> >>>>
> >>>> Signed-off-by: Juergen Gross <jgross@suse.com>
> >>>> ---
> >>>> stubdom/Makefile | 77 ++++++++++++++++++++++++++------------------------------
> >>>> 1 file changed, 35 insertions(+), 42 deletions(-)
> >>>>
> >>>> diff --git a/stubdom/Makefile b/stubdom/Makefile
> >>>> index 2921f30..9b30b58 100644
> >>>> --- a/stubdom/Makefile
> >>>> +++ b/stubdom/Makefile
> >>>> @@ -305,7 +305,41 @@ ioemu/linkfarm.stamp:
> >>>> touch ioemu/linkfarm.stamp
> >>>> endif
> >>>>
> >>>> -mk-headers-$(XEN_TARGET_ARCH): $(IOEMU_LINKFARM_TARGET)
> >>>> +define do_links
> >>>> + touch $@
> >>>
> >>> This should be moved to the last line of this macro.
> >>>
> >>> If you agree on this, I can fix it up while committing.
> >>>
> >
> > What about this comment?
>
> Aah, sorry. Didn't scroll down.
>
> I agree.
>
OK. Fixed it up and queued it for -next.
Wei.
>
> Juergen
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-11-04 14:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-04 9:53 [PATCH] stubdom: simplify and fix Makefile Juergen Gross
2016-11-04 9:56 ` Samuel Thibault
2016-11-04 14:20 ` Wei Liu
2016-11-04 14:29 ` Juergen Gross
2016-11-04 14:31 ` Wei Liu
2016-11-04 14:44 ` Juergen Gross
2016-11-04 14:59 ` Wei Liu
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.