linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] make: don't spray static check failures all over the subdir build
@ 2018-11-09 19:28 Darrick J. Wong
  2018-11-09 19:34 ` Eric Sandeen
  0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2018-11-09 19:28 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs

From: Darrick J. Wong <darrick.wong@oracle.com>

Debian package building is special -- it directly calls make -C libxfs
when building the debian-installer packages.  This means that any
variables we define in the top level Makefile don't get passed down to
subdir make processes.

This means that the new static checker support effectively runs the
first argument in $(CFLAGS) as a command, which is surprising.  Fix up
buildrules to patch out CHECK_CMD if nobody's defined it, so that direct
subdir make works again.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 include/buildrules |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/buildrules b/include/buildrules
index 83dfe05b..5c3e6eb9 100644
--- a/include/buildrules
+++ b/include/buildrules
@@ -36,6 +36,10 @@ $(SUBDIRS):
 	$(Q)$(MAKE) $(MAKEOPTS) -q -C $@ || $(MAKE) $(MAKEOPTS) -C $@
 endif
 
+ifndef CHECK_CMD
+CHECK_CMD = @true
+endif
+
 #
 # Standard targets
 #

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

* Re: [PATCH] make: don't spray static check failures all over the subdir build
  2018-11-09 19:28 [PATCH] make: don't spray static check failures all over the subdir build Darrick J. Wong
@ 2018-11-09 19:34 ` Eric Sandeen
  2018-11-09 19:50   ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2018-11-09 19:34 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: xfs

On 11/9/18 1:28 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Debian package building is special -- it directly calls make -C libxfs
> when building the debian-installer packages.  This means that any
> variables we define in the top level Makefile don't get passed down to
> subdir make processes.
> 
> This means that the new static checker support effectively runs the
> first argument in $(CFLAGS) as a command, which is surprising.  Fix up
> buildrules to patch out CHECK_CMD if nobody's defined it, so that direct
> subdir make works again.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  include/buildrules |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/buildrules b/include/buildrules
> index 83dfe05b..5c3e6eb9 100644
> --- a/include/buildrules
> +++ b/include/buildrules
> @@ -36,6 +36,10 @@ $(SUBDIRS):
>  	$(Q)$(MAKE) $(MAKEOPTS) -q -C $@ || $(MAKE) $(MAKEOPTS) -C $@
>  endif
>  
> +ifndef CHECK_CMD
> +CHECK_CMD = @true
> +endif
> +

Hm, ok, not quite clear if this is a hack or a proper fix - maybe
all the check stuff should have gone into buildrules in the first
place?  But at this late stage in the game, it's probably good enough.

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

Thanks,
-eric

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

* Re: [PATCH] make: don't spray static check failures all over the subdir build
  2018-11-09 19:34 ` Eric Sandeen
@ 2018-11-09 19:50   ` Darrick J. Wong
  0 siblings, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2018-11-09 19:50 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs

On Fri, Nov 09, 2018 at 01:34:44PM -0600, Eric Sandeen wrote:
> On 11/9/18 1:28 PM, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > Debian package building is special -- it directly calls make -C libxfs
> > when building the debian-installer packages.  This means that any
> > variables we define in the top level Makefile don't get passed down to
> > subdir make processes.
> > 
> > This means that the new static checker support effectively runs the
> > first argument in $(CFLAGS) as a command, which is surprising.  Fix up
> > buildrules to patch out CHECK_CMD if nobody's defined it, so that direct
> > subdir make works again.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> >  include/buildrules |    4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/include/buildrules b/include/buildrules
> > index 83dfe05b..5c3e6eb9 100644
> > --- a/include/buildrules
> > +++ b/include/buildrules
> > @@ -36,6 +36,10 @@ $(SUBDIRS):
> >  	$(Q)$(MAKE) $(MAKEOPTS) -q -C $@ || $(MAKE) $(MAKEOPTS) -C $@
> >  endif
> >  
> > +ifndef CHECK_CMD
> > +CHECK_CMD = @true
> > +endif
> > +
> 
> Hm, ok, not quite clear if this is a hack or a proper fix - maybe
> all the check stuff should have gone into buildrules in the first
> place?  But at this late stage in the game, it's probably good enough.

It's a stupid hack, but if CFLAGS=-g -O2 -Wall and someone runs "make -C
repair" instead of "make repair" then make will foolishly run "g -O2
-Wall", whatever that does.  command-not-found tells me there's no known
"g" command.

As for debian builds we probably should just update debian/rules to
something more modern.

--D

> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> 
> Thanks,
> -eric

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

end of thread, other threads:[~2018-11-10  5:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-09 19:28 [PATCH] make: don't spray static check failures all over the subdir build Darrick J. Wong
2018-11-09 19:34 ` Eric Sandeen
2018-11-09 19:50   ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).