All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] linux-2.6.18-xen.hg: check that awk supports 'gensub' command
@ 2007-10-10  2:53 Michael Abd-El-Malek
  2007-10-10  7:54 ` Jan Beulich
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Abd-El-Malek @ 2007-10-10  2:53 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 409 bytes --]

The linux-2.6.18-xen.hg/scripts/Makefile.xen.awk script depends on the 
GNU AWK-specific function "gensub".  If another awk is used (e.g., 
Debian installs mawk by default), the lack of gensub trickles down to 
cause the -xen.c files to not be compiled.  This was time-consuming to 
track.  So we should check that the awk program supports 'gensub'.

Signed-off-by: Michael Abd-El-Malek <mabdelmalek@cmu.edu>

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 686 bytes --]

diff -r b0ec211da98a scripts/Makefile.build
--- a/scripts/Makefile.build	Fri Oct 05 10:51:53 2007 +0100
+++ b/scripts/Makefile.build	Tue Oct 09 22:45:45 2007 -0400
@@ -71,6 +71,8 @@ ifeq ($(CONFIG_XEN),y)
 ifeq ($(CONFIG_XEN),y)
 $(objtree)/scripts/Makefile.xen: $(srctree)/scripts/Makefile.xen.awk $(srctree)/scripts/Makefile.build
 	@echo '  Updating $@'
+	$(if $(shell echo a | $(AWK) '{ print gensub(/a/, "AA", "g"); }'),\
+        ,$(error 'Your awk program does not define gensub.  Use gawk or another awk with gensub'))
 	@$(AWK) -f $< $(filter-out $<,$^) >$@
 
 xen-src-single-used-m	:= $(patsubst $(srctree)/%,%,$(wildcard $(addprefix $(srctree)/,$(single-used-m:.o=-xen.c))))

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] linux-2.6.18-xen.hg: check that awk supports 'gensub' command
  2007-10-10  2:53 [PATCH] linux-2.6.18-xen.hg: check that awk supports 'gensub' command Michael Abd-El-Malek
@ 2007-10-10  7:54 ` Jan Beulich
  2007-10-10  8:47   ` Keir Fraser
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2007-10-10  7:54 UTC (permalink / raw)
  To: Michael Abd-El-Malek; +Cc: xen-devel

>>> Michael Abd-El-Malek <mabdelmalek@cmu.edu> 10.10.07 04:53 >>>
>The linux-2.6.18-xen.hg/scripts/Makefile.xen.awk script depends on the 
>GNU AWK-specific function "gensub".  If another awk is used (e.g., 
>Debian installs mawk by default), the lack of gensub trickles down to 
>cause the -xen.c files to not be compiled.  This was time-consuming to 
>track.  So we should check that the awk program supports 'gensub'.
>
>Signed-off-by: Michael Abd-El-Malek <mabdelmalek@cmu.edu>

Hmm, this seems odd: If I try to use an arbitrary function (with gawk) , I get a
failure, which should prevent make from continuing the build. Are you saying
this isn't happening for you? Have you determined why?

Jan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] linux-2.6.18-xen.hg: check that awk supports 'gensub' command
  2007-10-10  7:54 ` Jan Beulich
@ 2007-10-10  8:47   ` Keir Fraser
  2007-10-10 14:50     ` Michael Abd-El-Malek
  0 siblings, 1 reply; 4+ messages in thread
From: Keir Fraser @ 2007-10-10  8:47 UTC (permalink / raw)
  To: Jan Beulich, Michael Abd-El-Malek; +Cc: xen-devel

On 10/10/07 08:54, "Jan Beulich" <jbeulich@novell.com> wrote:

>>>> Michael Abd-El-Malek <mabdelmalek@cmu.edu> 10.10.07 04:53 >>>
>> The linux-2.6.18-xen.hg/scripts/Makefile.xen.awk script depends on the
>> GNU AWK-specific function "gensub".  If another awk is used (e.g.,
>> Debian installs mawk by default), the lack of gensub trickles down to
>> cause the -xen.c files to not be compiled.  This was time-consuming to
>> track.  So we should check that the awk program supports 'gensub'.
>> 
>> Signed-off-by: Michael Abd-El-Malek <mabdelmalek@cmu.edu>
> 
> Hmm, this seems odd: If I try to use an arbitrary function (with gawk) , I get
> a
> failure, which should prevent make from continuing the build. Are you saying
> this isn't happening for you? Have you determined why?

The implication seems to be that other awk implementations (most likely mawk
in this case) silently continue.

 -- Keir

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] linux-2.6.18-xen.hg: check that awk supports 'gensub' command
  2007-10-10  8:47   ` Keir Fraser
@ 2007-10-10 14:50     ` Michael Abd-El-Malek
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Abd-El-Malek @ 2007-10-10 14:50 UTC (permalink / raw)
  To: xen-devel

On Oct 10, 2007, at 4:47 AM, Keir Fraser wrote:

> On 10/10/07 08:54, "Jan Beulich" <jbeulich@novell.com> wrote:
>
>>>>> Michael Abd-El-Malek <mabdelmalek@cmu.edu> 10.10.07 04:53 >>>
>>> The linux-2.6.18-xen.hg/scripts/Makefile.xen.awk script depends  
>>> on the
>>> GNU AWK-specific function "gensub".  If another awk is used (e.g.,
>>> Debian installs mawk by default), the lack of gensub trickles  
>>> down to
>>> cause the -xen.c files to not be compiled.  This was time- 
>>> consuming to
>>> track.  So we should check that the awk program supports 'gensub'.
>>>
>>> Signed-off-by: Michael Abd-El-Malek <mabdelmalek@cmu.edu>
>>
>> Hmm, this seems odd: If I try to use an arbitrary function (with  
>> gawk) , I get
>> a
>> failure, which should prevent make from continuing the build. Are  
>> you saying
>> this isn't happening for you? Have you determined why?
>
> The implication seems to be that other awk implementations (most  
> likely mawk
> in this case) silently continue.
>
>  -- Keir

Yes, the build process would continue with mawk silently failing.   
The resulting build problems have been encountered by others before;  
see:
http://lists.xensource.com/archives/html/xen-devel/2007-07/msg00840.html

Mike

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-10-10 14:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-10  2:53 [PATCH] linux-2.6.18-xen.hg: check that awk supports 'gensub' command Michael Abd-El-Malek
2007-10-10  7:54 ` Jan Beulich
2007-10-10  8:47   ` Keir Fraser
2007-10-10 14:50     ` Michael Abd-El-Malek

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.