summaryrefslogtreecommitdiffstats
path: root/sys/modules/aic7xxx
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>2003-01-22 21:56:54 +0000
committergibbs <gibbs@FreeBSD.org>2003-01-22 21:56:54 +0000
commitabdf4d89384534ee869a4858849ed0f4dc4d25b1 (patch)
treebe7955f6a94622ff8cb6046f2dcb721dd443280a /sys/modules/aic7xxx
parentc819064a8cbdb3e0e6daee5ac0b2d16f77383a0f (diff)
downloadFreeBSD-src-abdf4d89384534ee869a4858849ed0f4dc4d25b1.zip
FreeBSD-src-abdf4d89384534ee869a4858849ed0f4dc4d25b1.tar.gz
Update GENSRCS and aicasm options correctly depending on whether register
pretty printing is enabled Add a dependency on the source files for aicasm so that it will be rebuilt if out of date. Simplify.
Diffstat (limited to 'sys/modules/aic7xxx')
-rw-r--r--sys/modules/aic7xxx/ahc/Makefile27
-rw-r--r--sys/modules/aic7xxx/ahd/Makefile27
2 files changed, 28 insertions, 26 deletions
diff --git a/sys/modules/aic7xxx/ahc/Makefile b/sys/modules/aic7xxx/ahc/Makefile
index ab6aa1b..6ef8ae0 100644
--- a/sys/modules/aic7xxx/ahc/Makefile
+++ b/sys/modules/aic7xxx/ahc/Makefile
@@ -5,33 +5,34 @@
KMOD= ahc
SUBDIR= ahc_eisa ahc_pci
-BEFORE_DEPEND= aic7xxx_{seq,reg}.h
+GENSRCS= aic7xxx_{seq,reg}.h
+AHC_REG_PRETTY_PRINT=1
+REG_PRINT_OPT=
+.ifdef AHC_REG_PRETTY_PRINT
+GENSRCS+= aic7xxx_reg_print.c
+CFLAGS+= -DAHC_REG_PRETTY_PRINT=1
+REG_PRINT_OPT= -p aic7xxx_reg_print.c
+.endif
+BEFORE_DEPEND = ${GENSRCS}
-../aicasm/aicasm:
+../aicasm/aicasm: ${.CURDIR}/../../../dev/aci7xxx/aicasm/*.[chyl]
( cd ${.CURDIR}/../aicasm; ${MAKE} aicasm; )
-aic7xxx_{seq.h,reg.h,reg_print.c}: \
- ${.CURDIR}/../../../dev/aic7xxx/aic7xxx.{reg,seq} \
+${GENSRCS}: \
+ ${.CURDIR}/../../../dev/aic7xxx/aic7xxx.{reg,seq} \
${.CURDIR}/../../../cam/scsi/scsi_message.h ../aicasm/aicasm
../aicasm/aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \
-I${.CURDIR}/../../../dev/aic7xxx \
-o aic7xxx_seq.h -r aic7xxx_reg.h \
- -p aic7xxx_reg_print.c \
+ ${REG_PRINT_OPT} \
-i ${.CURDIR}/../../../dev/aic7xxx/aic7xxx_osm.h \
${.CURDIR}/../../../dev/aic7xxx/aic7xxx.seq
-GENSRCS= aic7xxx_reg.h aic7xxx_seq.h
-
-AHC_REG_PRETTY_PRINT=1
SRCS= ${GENSRCS}
-.ifdef AHC_REG_PRETTY_PRINT
-SRCS+= aic7xxx_reg_print.c
-CFLAGS+= -DAHC_REG_PRETTY_PRINT=1
-.endif
SRCS+= aic7xxx.c aic7xxx_93cx6.c aic7xxx_osm.c
SRCS+= opt_scsi.h opt_aic7xxx.h opt_cam.h
SRCS+= device_if.h bus_if.h pci_if.h
-CLEANFILES= ${GENSRCS} aic7xxx_reg_print.c
+CLEANFILES= ${GENSRCS}
.include <bsd.kmod.mk>
diff --git a/sys/modules/aic7xxx/ahd/Makefile b/sys/modules/aic7xxx/ahd/Makefile
index 7ee5e65..7744a7d 100644
--- a/sys/modules/aic7xxx/ahd/Makefile
+++ b/sys/modules/aic7xxx/ahd/Makefile
@@ -4,33 +4,34 @@
.PATH: ${.CURDIR}/../../../dev/aic7xxx
KMOD= ahd
-BEFORE_DEPEND= aic79xx_{seq,reg}.h
+GENSRCS= aic79xx_{seq,reg}.h
+REG_PRINT_OPT=
+AHD_REG_PRETTY_PRINT=1
+.ifdef AHD_REG_PRETTY_PRINT
+GENSRCS += aic79xx_reg_print.c
+CFLAGS+= -DAHD_REG_PRETTY_PRINT=1
+REG_PRINT_OPT= -p aic79xx_reg_print.c
+.endif
+BEFORE_DEPEND= ${GENSRCS}
-../aicasm/aicasm:
+../aicasm/aicasm: ${.CURDIR}/../../../dev/aic7xxx/aicasm/*.[chyl]
( cd ${.CURDIR}/../aicasm; ${MAKE} aicasm; )
-aic79xx_{seq.h,reg.h,reg_print.c}: \
- ${.CURDIR}/../../../dev/aic7xxx/aic79xx.{reg,seq} \
+${GENSRCS}: \
+ ${.CURDIR}/../../../dev/aic7xxx/aic79xx.{reg,seq} \
${.CURDIR}/../../../cam/scsi/scsi_message.h ../aicasm/aicasm
../aicasm/aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \
-I${.CURDIR}/../../../dev/aic7xxx \
-o aic79xx_seq.h -r aic79xx_reg.h \
- -p aic79xx_reg_print.c \
+ ${REG_PRINT_OPT} \
-i ${.CURDIR}/../../../dev/aic7xxx/aic79xx_osm.h \
${.CURDIR}/../../../dev/aic7xxx/aic79xx.seq
-GENSRCS= aic79xx_reg.h aic79xx_seq.h
-
SRCS= ${GENSRCS}
-AHD_REG_PRETTY_PRINT=1
-.ifdef AHD_REG_PRETTY_PRINT
-SRCS+= aic79xx_reg_print.c
-CFLAGS+= -DAHD_REG_PRETTY_PRINT=1
-.endif
SRCS+= aic79xx.c aic79xx_osm.c aic79xx_pci.c ahd_pci.c
SRCS+= opt_scsi.h opt_aic79xx.h opt_cam.h opt_ddb.h
SRCS+= device_if.h bus_if.h pci_if.h
-CLEANFILES= ${GENSRCS} aic79xx_reg_print.c
+CLEANFILES= ${GENSRCS}
.include <bsd.kmod.mk>
OpenPOWER on IntegriCloud