public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add missing $(obj) to aic7xxx makefile
@ 2007-10-26 11:31 Vegard Nossum
  2007-11-14 20:30 ` Sam Ravnborg
  0 siblings, 1 reply; 4+ messages in thread
From: Vegard Nossum @ 2007-10-26 11:31 UTC (permalink / raw)
  To: linux-scsi; +Cc: Sam Ravnborg

Hi,

This patch adds the proper $(obj) and $(src) prefixes to dependency
rules in aic7xxx makefile. Without this patch, there is a remote
possibility that parallel make with a different output directory can
fail.

Also changed the deprecated EXTRA_CFLAGS construct to ccflags-y syntax.


Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
CC: Sam Ravnborg <sam@ravnborg.org>

diff --git a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile
index 9a6ce19..83c1812 100644
--- a/drivers/scsi/aic7xxx/Makefile
+++ b/drivers/scsi/aic7xxx/Makefile
@@ -33,11 +33,10 @@ aic79xx-y					+= aic79xx_osm.o	\
 						   aic79xx_proc.o	\
 						   aic79xx_osm_pci.o
 
-EXTRA_CFLAGS += -Idrivers/scsi
+ccflags-y += -Idrivers/scsi -I$(obj)
 ifdef WARNINGS_BECOME_ERRORS
-EXTRA_CFLAGS += -Werror
+ccflags-y += -Werror
 endif
-#EXTRA_CFLAGS += -g
 
 # Files generated that shall be removed upon make clean
 clean-files := aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c
@@ -64,9 +63,9 @@ ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y)
 # Create a dependency chain in generated files
 # to avoid concurrent invocations of the single
 # rule that builds them all.
-aic7xxx_seq.h: aic7xxx_reg.h
+$(obj)/aic7xxx_seq.h: $(src)/aic7xxx_reg.h
 ifeq ($(CONFIG_AIC7XXX_REG_PRETTY_PRINT),y)
-aic7xxx_reg.h: aic7xxx_reg_print.c
+$(obj)aic7xxx_reg.h: $(src)/aic7xxx_reg_print.c
 endif
 $(aic7xxx-gen-y): $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm
 	$(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \
@@ -85,9 +84,9 @@ ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y)
 # Create a dependency chain in generated files
 # to avoid concurrent invocations of the single
 # rule that builds them all.
-aic79xx_seq.h: aic79xx_reg.h
+$(obj)/aic79xx_seq.h: $(src)/aic79xx_reg.h
 ifeq ($(CONFIG_AIC79XX_REG_PRETTY_PRINT),y)
-aic79xx_reg.h: aic79xx_reg_print.c
+$(obj)/aic79xx_reg.h: $(src)/aic79xx_reg_print.c
 endif
 $(aic79xx-gen-y): $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm
 	$(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \



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

* Re: [PATCH] Add missing $(obj) to aic7xxx makefile
  2007-10-26 11:31 [PATCH] Add missing $(obj) to aic7xxx makefile Vegard Nossum
@ 2007-11-14 20:30 ` Sam Ravnborg
  2007-11-14 20:36   ` Matthew Wilcox
  0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2007-11-14 20:30 UTC (permalink / raw)
  To: Vegard Nossum; +Cc: linux-scsi

Hi Vegard.

I had to modify the patch to make it actually work
reliable with "make drivers/scsi/ -j".
I have applied the below to kbuild.git.

linux-scsi cc'ed - please let me know if you prefer
to take it via scsi tree.

	Sam

commit c102f89b1e35c793a3483c67bce6b28a9adb7f2f
Author: Vegard Nossum <vegard.nossum@gmail.com>
Date:   Fri Oct 26 13:31:13 2007 +0200

    aic7(3*x): fix firmware build
    
    This patch adds the proper $(obj) and $(src) prefixes to dependency
    rules in aic7xxx makefile. Without this patch, there is a remote
    possibility that parallel make with a different output directory can
    fail.
    
    Also changed the deprecated EXTRA_CFLAGS construct to ccflags-y syntax.
    
    Fixed up patch to survive "make drivers/scsi/ -j"
    with BUILD_FIRMWARE enable. /Sam
    
    Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
    Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
    Cc: linux-scsi@vger.kernel.org

diff --git a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile
index 9a6ce19..6b3aee3 100644
--- a/drivers/scsi/aic7xxx/Makefile
+++ b/drivers/scsi/aic7xxx/Makefile
@@ -33,11 +33,10 @@ aic79xx-y					+= aic79xx_osm.o	\
 						   aic79xx_proc.o	\
 						   aic79xx_osm_pci.o
 
-EXTRA_CFLAGS += -Idrivers/scsi
+ccflags-y += -Idrivers/scsi
 ifdef WARNINGS_BECOME_ERRORS
-EXTRA_CFLAGS += -Werror
+ccflags-y += -Werror
 endif
-#EXTRA_CFLAGS += -g
 
 # Files generated that shall be removed upon make clean
 clean-files := aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c
@@ -47,52 +46,42 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c
 
 $(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h
 $(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h
-$(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped
-$(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped
 
-$(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_reg.h
-$(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_reg.h
+$(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h
+$(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h
 
-aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE)	:= $(obj)/aic7xxx_seq.h \
-						   $(obj)/aic7xxx_reg.h
+aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE)	:= $(obj)/aic7xxx_reg.h
 aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT)	+= $(obj)/aic7xxx_reg_print.c
 
 aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \
 	-p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h
 
 ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y)
-# Create a dependency chain in generated files
-# to avoid concurrent invocations of the single
-# rule that builds them all.
-aic7xxx_seq.h: aic7xxx_reg.h
-ifeq ($(CONFIG_AIC7XXX_REG_PRETTY_PRINT),y)
-aic7xxx_reg.h: aic7xxx_reg_print.c
-endif
-$(aic7xxx-gen-y): $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm
+$(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm
 	$(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \
 			      $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \
 			      $(src)/aic7xxx.seq
+
+$(aic7xxx-gen-y): $(obj)/aic7xxx_seq.h
+else
+$(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped
 endif
 
-aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE)	:= $(obj)/aic79xx_seq.h \
-						   $(obj)/aic79xx_reg.h
+aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE)	:= $(obj)/aic79xx_reg.h
 aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT)	+= $(obj)/aic79xx_reg_print.c
 
 aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \
 	-p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h
 
 ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y)
-# Create a dependency chain in generated files
-# to avoid concurrent invocations of the single
-# rule that builds them all.
-aic79xx_seq.h: aic79xx_reg.h
-ifeq ($(CONFIG_AIC79XX_REG_PRETTY_PRINT),y)
-aic79xx_reg.h: aic79xx_reg_print.c
-endif
-$(aic79xx-gen-y): $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm
+$(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm
 	$(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \
 			      $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \
 			      $(src)/aic79xx.seq
+
+$(aic79xx-gen-y): $(obj)/aic79xx_seq.h
+else
+$(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped
 endif
 
 $(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl]

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

* Re: [PATCH] Add missing $(obj) to aic7xxx makefile
  2007-11-14 20:30 ` Sam Ravnborg
@ 2007-11-14 20:36   ` Matthew Wilcox
  2007-11-14 20:47     ` Sam Ravnborg
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2007-11-14 20:36 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Vegard Nossum, linux-scsi

On Wed, Nov 14, 2007 at 09:30:46PM +0100, Sam Ravnborg wrote:
> I had to modify the patch to make it actually work
> reliable with "make drivers/scsi/ -j".
> I have applied the below to kbuild.git.
> 
> linux-scsi cc'ed - please let me know if you prefer
> to take it via scsi tree.

It seems independent of anything else that might come out of the scsi
list.  Please take it via the kbuild tree.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

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

* Re: [PATCH] Add missing $(obj) to aic7xxx makefile
  2007-11-14 20:36   ` Matthew Wilcox
@ 2007-11-14 20:47     ` Sam Ravnborg
  0 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2007-11-14 20:47 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Vegard Nossum, linux-scsi

On Wed, Nov 14, 2007 at 01:36:42PM -0700, Matthew Wilcox wrote:
> On Wed, Nov 14, 2007 at 09:30:46PM +0100, Sam Ravnborg wrote:
> > I had to modify the patch to make it actually work
> > reliable with "make drivers/scsi/ -j".
> > I have applied the below to kbuild.git.
> > 
> > linux-scsi cc'ed - please let me know if you prefer
> > to take it via scsi tree.
> 
> It seems independent of anything else that might come out of the scsi
> list.  Please take it via the kbuild tree.

I will do - thanks.

	Sam

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

end of thread, other threads:[~2007-11-14 20:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-26 11:31 [PATCH] Add missing $(obj) to aic7xxx makefile Vegard Nossum
2007-11-14 20:30 ` Sam Ravnborg
2007-11-14 20:36   ` Matthew Wilcox
2007-11-14 20:47     ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox