diff options
| author | Vegard Nossum <vegard.nossum@gmail.com> | 2008-01-24 17:02:52 -0500 |
|---|---|---|
| committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-25 10:26:33 -0500 |
| commit | 93a38fa2dd83fcaf65b2327fff65e364472388f9 (patch) | |
| tree | 87cd5be0a3f3da5119c98e263c8a97c253567dae | |
| parent | a119ee8ee3045bf559d4cf02d72b112f3de2a15b (diff) | |
[SCSI] aic7xxx: 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>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| -rw-r--r-- | drivers/scsi/aic7xxx/Makefile | 45 |
1 files changed, 18 insertions, 27 deletions
diff --git a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile index 9a6ce19a4030..e4f70c563bc2 100644 --- a/drivers/scsi/aic7xxx/Makefile +++ b/drivers/scsi/aic7xxx/Makefile | |||
| @@ -33,11 +33,10 @@ aic79xx-y += aic79xx_osm.o \ | |||
| 33 | aic79xx_proc.o \ | 33 | aic79xx_proc.o \ |
| 34 | aic79xx_osm_pci.o | 34 | aic79xx_osm_pci.o |
| 35 | 35 | ||
| 36 | EXTRA_CFLAGS += -Idrivers/scsi | 36 | ccflags-y += -Idrivers/scsi |
| 37 | ifdef WARNINGS_BECOME_ERRORS | 37 | ifdef WARNINGS_BECOME_ERRORS |
| 38 | EXTRA_CFLAGS += -Werror | 38 | ccflags-y += -Werror |
| 39 | endif | 39 | endif |
| 40 | #EXTRA_CFLAGS += -g | ||
| 41 | 40 | ||
| 42 | # Files generated that shall be removed upon make clean | 41 | # Files generated that shall be removed upon make clean |
| 43 | clean-files := aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c | 42 | clean-files := aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c |
| @@ -46,53 +45,45 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c | |||
| 46 | # Dependencies for generated files need to be listed explicitly | 45 | # Dependencies for generated files need to be listed explicitly |
| 47 | 46 | ||
| 48 | $(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h | 47 | $(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h |
| 48 | $(obj)/aic7xxx_core.o: $(obj)/aic7xxx_reg.h | ||
| 49 | $(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h | 49 | $(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h |
| 50 | $(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped | 50 | $(obj)/aic79xx_core.o: $(obj)/aic79xx_reg.h |
| 51 | $(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped | ||
| 52 | 51 | ||
| 53 | $(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_reg.h | 52 | $(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h |
| 54 | $(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_reg.h | 53 | $(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h |
| 55 | 54 | ||
| 56 | aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_seq.h \ | 55 | aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_reg.h |
| 57 | $(obj)/aic7xxx_reg.h | ||
| 58 | aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c | 56 | aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c |
| 59 | 57 | ||
| 60 | aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \ | 58 | aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \ |
| 61 | -p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h | 59 | -p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h |
| 62 | 60 | ||
| 63 | ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y) | 61 | ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y) |
| 64 | # Create a dependency chain in generated files | 62 | $(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm |
| 65 | # to avoid concurrent invocations of the single | ||
| 66 | # rule that builds them all. | ||
| 67 | aic7xxx_seq.h: aic7xxx_reg.h | ||
| 68 | ifeq ($(CONFIG_AIC7XXX_REG_PRETTY_PRINT),y) | ||
| 69 | aic7xxx_reg.h: aic7xxx_reg_print.c | ||
| 70 | endif | ||
| 71 | $(aic7xxx-gen-y): $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm | ||
| 72 | $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \ | 63 | $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \ |
| 73 | $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \ | 64 | $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \ |
| 74 | $(src)/aic7xxx.seq | 65 | $(src)/aic7xxx.seq |
| 66 | |||
| 67 | $(aic7xxx-gen-y): $(obj)/aic7xxx_seq.h | ||
| 68 | else | ||
| 69 | $(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped | ||
| 75 | endif | 70 | endif |
| 76 | 71 | ||
| 77 | aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE) := $(obj)/aic79xx_seq.h \ | 72 | aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE) := $(obj)/aic79xx_reg.h |
| 78 | $(obj)/aic79xx_reg.h | ||
| 79 | aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += $(obj)/aic79xx_reg_print.c | 73 | aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += $(obj)/aic79xx_reg_print.c |
| 80 | 74 | ||
| 81 | aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \ | 75 | aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \ |
| 82 | -p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h | 76 | -p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h |
| 83 | 77 | ||
| 84 | ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y) | 78 | ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y) |
| 85 | # Create a dependency chain in generated files | 79 | $(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm |
| 86 | # to avoid concurrent invocations of the single | ||
| 87 | # rule that builds them all. | ||
| 88 | aic79xx_seq.h: aic79xx_reg.h | ||
| 89 | ifeq ($(CONFIG_AIC79XX_REG_PRETTY_PRINT),y) | ||
| 90 | aic79xx_reg.h: aic79xx_reg_print.c | ||
| 91 | endif | ||
| 92 | $(aic79xx-gen-y): $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm | ||
| 93 | $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \ | 80 | $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \ |
| 94 | $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \ | 81 | $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \ |
| 95 | $(src)/aic79xx.seq | 82 | $(src)/aic79xx.seq |
| 83 | |||
| 84 | $(aic79xx-gen-y): $(obj)/aic79xx_seq.h | ||
| 85 | else | ||
| 86 | $(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped | ||
| 96 | endif | 87 | endif |
| 97 | 88 | ||
| 98 | $(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl] | 89 | $(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl] |
