diff options
author | dfr <dfr@FreeBSD.org> | 2000-04-05 10:33:55 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2000-04-05 10:33:55 +0000 |
commit | c41aef9448b8ca86cc10997777a6e5a89bdb21a2 (patch) | |
tree | 5088a0bc0baea1bcc8e294ffec20add9aab2d39a | |
parent | 3d94aee5e44a0bb40d7ed1611c547bfe7e0fddd8 (diff) | |
download | FreeBSD-src-c41aef9448b8ca86cc10997777a6e5a89bdb21a2.zip FreeBSD-src-c41aef9448b8ca86cc10997777a6e5a89bdb21a2.tar.gz |
Make it possible to include a device interface description by a single
line in files or files.${arch} instead of 13 lines of code.
This is a small chance that this will break the alpha kernel build - I'll
fix it this evening if it does.
-rw-r--r-- | sys/conf/Makefile.alpha | 17 | ||||
-rw-r--r-- | sys/conf/Makefile.i386 | 17 | ||||
-rw-r--r-- | sys/conf/Makefile.powerpc | 17 | ||||
-rw-r--r-- | sys/conf/files | 163 | ||||
-rw-r--r-- | sys/conf/files.alpha | 30 |
5 files changed, 55 insertions, 189 deletions
diff --git a/sys/conf/Makefile.alpha b/sys/conf/Makefile.alpha index d3046e0..6135dc5 100644 --- a/sys/conf/Makefile.alpha +++ b/sys/conf/Makefile.alpha @@ -73,6 +73,9 @@ NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC} NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${.IMPSRC} PROFILE_C= ${CC} -c ${CFLAGS} ${.IMPSRC} +NORMAL_M= perl5 $S/kern/makedevops.pl -c $<; \ + ${CC} -c ${CFLAGS} ${PROF} ${.PREFIX}.c + GEN_CFILES= $S/$M/$M/genassym.c # setdef0.c and setdef1.c are intentionally # omitted from SYSTEM_CFILES. They include setdefs.h, a header which @@ -119,14 +122,21 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o ${SYSTEM_LD_TAIL} .if !exists(.depend) -${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} +${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.h/} .endif +.for mfile in ${MFILES} +${mfile:T:S/.m$/.h/}: ${mfile} + perl5 $S/kern/makedevops.pl -h ${mfile} +.endfor + clean: rm -f *.o *.so *.So *.ko *.s eddep errs genassym \ ${FULLKERNEL} ${KERNEL} linterrs makelinks param.c \ setdef[01].c setdefs.h tags \ - vers.c vnode_if.c vnode_if.h ${CLEAN} + vers.c vnode_if.c vnode_if.h \ + ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ + ${CLEAN} #lint: /tmp param.c # @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \ @@ -213,7 +223,8 @@ __reml.S: $S/$M/$M/divrem.m4 ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h depend: assym.s param.c vnode_if.h ${BEFORE_DEPEND} \ - ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} ${SYSTEM_SFILES} + ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \ + ${SYSTEM_SFILES} ${MFILES:T:S/.m$/.h/} rm -f .newdep mkdep -a -f .newdep ${CFLAGS} ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} env MKDEP_CPP="${CC} -E" \ diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386 index 3ecd831..c79a7b2 100644 --- a/sys/conf/Makefile.i386 +++ b/sys/conf/Makefile.i386 @@ -73,6 +73,9 @@ NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC} NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${.IMPSRC} PROFILE_C= ${CC} -c ${CFLAGS} ${.IMPSRC} +NORMAL_M= perl5 $S/kern/makedevops.pl -c $<; \ + ${CC} -c ${CFLAGS} ${PROF} ${.PREFIX}.c + GEN_CFILES= $S/$M/$M/genassym.c # setdef0.c and setdef1.c are intentionally # omitted from SYSTEM_CFILES. They include setdefs.h, a header which @@ -118,14 +121,21 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o ${SYSTEM_LD_TAIL} .if !exists(.depend) -${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} +${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.h/} .endif +.for mfile in ${MFILES} +${mfile:T:S/.m$/.h/}: ${mfile} + perl5 $S/kern/makedevops.pl -h ${mfile} +.endfor + clean: rm -f *.o *.so *.So *.ko *.s eddep errs genassym \ ${FULLKERNEL} ${KERNEL} linterrs makelinks param.c \ setdef[01].c setdefs.h tags \ - vers.c vnode_if.c vnode_if.h ${CLEAN} + vers.c vnode_if.c vnode_if.h \ + ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ + ${CLEAN} #lint: /tmp param.c # @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \ @@ -167,7 +177,8 @@ genassym.o: $S/$M/$M/genassym.c ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h depend: assym.s param.c vnode_if.h ${BEFORE_DEPEND} \ - ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} ${SYSTEM_SFILES} + ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \ + ${SYSTEM_SFILES} ${MFILES:T:S/.m$/.h/} rm -f .newdep mkdep -a -f .newdep ${CFLAGS} ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} env MKDEP_CPP="${CC} -E" \ diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc index 3ecd831..c79a7b2 100644 --- a/sys/conf/Makefile.powerpc +++ b/sys/conf/Makefile.powerpc @@ -73,6 +73,9 @@ NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC} NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${.IMPSRC} PROFILE_C= ${CC} -c ${CFLAGS} ${.IMPSRC} +NORMAL_M= perl5 $S/kern/makedevops.pl -c $<; \ + ${CC} -c ${CFLAGS} ${PROF} ${.PREFIX}.c + GEN_CFILES= $S/$M/$M/genassym.c # setdef0.c and setdef1.c are intentionally # omitted from SYSTEM_CFILES. They include setdefs.h, a header which @@ -118,14 +121,21 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o ${SYSTEM_LD_TAIL} .if !exists(.depend) -${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} +${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.h/} .endif +.for mfile in ${MFILES} +${mfile:T:S/.m$/.h/}: ${mfile} + perl5 $S/kern/makedevops.pl -h ${mfile} +.endfor + clean: rm -f *.o *.so *.So *.ko *.s eddep errs genassym \ ${FULLKERNEL} ${KERNEL} linterrs makelinks param.c \ setdef[01].c setdefs.h tags \ - vers.c vnode_if.c vnode_if.h ${CLEAN} + vers.c vnode_if.c vnode_if.h \ + ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ + ${CLEAN} #lint: /tmp param.c # @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \ @@ -167,7 +177,8 @@ genassym.o: $S/$M/$M/genassym.c ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h depend: assym.s param.c vnode_if.h ${BEFORE_DEPEND} \ - ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} ${SYSTEM_SFILES} + ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \ + ${SYSTEM_SFILES} ${MFILES:T:S/.m$/.h/} rm -f .newdep mkdep -a -f .newdep ${CFLAGS} ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} env MKDEP_CPP="${CC} -E" \ diff --git a/sys/conf/files b/sys/conf/files index 2d5c67c..a70b49a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -14,32 +14,8 @@ aic7xxx_{seq,reg}.h optional ahc \ no-obj no-implicit-rule before-depend \ clean "aic7xxx_seq.h aic7xxx_reg.h" \ dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" -device_if.o standard \ - compile-with "${NORMAL_C}" \ - no-implicit-rule local -device_if.c standard \ - dependency "$S/kern/makedevops.pl $S/kern/device_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -c $S/kern/device_if.m" \ - no-obj no-implicit-rule before-depend local \ - clean "device_if.c" -device_if.h standard \ - dependency "$S/kern/makedevops.pl $S/kern/device_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -h $S/kern/device_if.m" \ - no-obj no-implicit-rule before-depend \ - clean "device_if.h" -bus_if.o standard \ - compile-with "${NORMAL_C}" \ - no-implicit-rule local -bus_if.c standard \ - dependency "$S/kern/makedevops.pl $S/kern/bus_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -c $S/kern/bus_if.m" \ - no-obj no-implicit-rule before-depend local \ - clean "bus_if.c" -bus_if.h standard \ - dependency "$S/kern/makedevops.pl $S/kern/bus_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -h $S/kern/bus_if.m" \ - no-obj no-implicit-rule before-depend \ - clean "bus_if.h" +kern/device_if.m standard +kern/bus_if.m standard cam/cam.c optional scbus cam/cam_extend.c optional scbus cam/cam_periph.c optional scbus @@ -178,34 +154,8 @@ dev/ida/ida_disk.c optional ida dev/ida/ida_eisa.c optional ida eisa dev/ida/ida_pci.c optional ida pci dev/ie/if_ie.c optional ie isa -iicbb_if.o optional iicbb \ - dependency "iicbb_if.c" \ - compile-with "${NORMAL_C}" \ - no-implicit-rule local -iicbb_if.c optional iicbb \ - dependency "$S/kern/makedevops.pl $S/dev/iicbus/iicbb_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -c $S/dev/iicbus/iicbb_if.m" \ - no-obj no-implicit-rule before-depend local \ - clean "iicbb_if.c" -iicbb_if.h optional iicbb \ - dependency "$S/kern/makedevops.pl $S/dev/iicbus/iicbb_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -h $S/dev/iicbus/iicbb_if.m" \ - no-obj no-implicit-rule before-depend \ - clean "iicbb_if.h" -iicbus_if.o optional iicbus \ - dependency "iicbus_if.c iicbus_if.h" \ - compile-with "${NORMAL_C}" \ - no-implicit-rule local -iicbus_if.c optional iicbus \ - dependency "$S/kern/makedevops.pl $S/dev/iicbus/iicbus_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -c $S/dev/iicbus/iicbus_if.m" \ - no-obj no-implicit-rule before-depend local \ - clean "iicbus_if.c" -iicbus_if.h optional iicbus \ - dependency "$S/kern/makedevops.pl $S/dev/iicbus/iicbus_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -h $S/dev/iicbus/iicbus_if.m" \ - no-obj no-implicit-rule before-depend \ - clean "iicbus_if.h" +dev/iicbus/iicbb_if.m optional iicbb +dev/iicbus/iicbus_if.m optional iicbus dev/iicbus/if_ic.c optional ic dev/iicbus/iic.c optional iic dev/iicbus/iicbb.c optional iicbb @@ -230,40 +180,14 @@ dev/mii/rlphy.c optional miibus dev/mii/tlphy.c optional miibus dev/mii/ukphy.c optional miibus dev/mii/ukphy_subr.c optional miibus -miibus_if.o optional miibus \ - dependency "miibus_if.c miibus_if.h" \ - compile-with "${NORMAL_C}" \ - no-implicit-rule local -miibus_if.c optional miibus \ - dependency "$S/kern/makedevops.pl $S/dev/mii/miibus_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -c $S/dev/mii/miibus_if.m" \ - no-obj no-implicit-rule before-depend local \ - clean "miibus_if.c" -miibus_if.h optional miibus \ - dependency "$S/kern/makedevops.pl $S/dev/mii/miibus_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -h $S/dev/mii/miibus_if.m" \ - no-obj no-implicit-rule before-depend \ - clean "miibus_if.h" +dev/mii/miibus_if.m optional miibus dev/mlx/mlx.c optional mlx dev/mlx/mlx_disk.c optional mlx dev/mlx/mlx_pci.c optional mlx dev/pccard/pccard.c optional pccard dev/pccard/pccard_cis.c optional pccard dev/pccard/pccard_cis_quirks.c optional pccard -power_if.o optional pccard \ - dependency "power_if.c power_if.h" \ - compile-with "${NORMAL_C}" \ - no-implicit-rule local -power_if.c optional pccard \ - dependency "$S/kern/makedevops.pl $S/dev/pccard/power_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -c $S/dev/pccard/power_if.m" \ - no-obj no-implicit-rule before-depend local \ - clean "power_if.c" -power_if.h optional pccard \ - dependency "$S/kern/makedevops.pl $S/dev/pccard/power_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -h $S/dev/pccard/power_if.m" \ - no-obj no-implicit-rule before-depend \ - clean "power_if.h" +dev/pccard/power_if.m optional pccard dev/pcic/i82365.c optional pcic pccard dev/pcic/i82365_isa.c optional pcic pccard dev/pdq/if_fea.c optional fea eisa @@ -272,20 +196,7 @@ dev/pdq/pdq.c optional fea eisa dev/pdq/pdq.c optional fpa pci dev/pdq/pdq_ifsubr.c optional fea eisa dev/pdq/pdq_ifsubr.c optional fpa pci -ppbus_if.o optional ppbus \ - dependency "ppbus_if.c ppbus_if.h" \ - compile-with "${NORMAL_C}" \ - no-implicit-rule local -ppbus_if.c optional ppbus \ - dependency "$S/kern/makedevops.pl $S/dev/ppbus/ppbus_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -c $S/dev/ppbus/ppbus_if.m" \ - no-obj no-implicit-rule before-depend local \ - clean "ppbus_if.c" -ppbus_if.h optional ppbus \ - dependency "$S/kern/makedevops.pl $S/dev/ppbus/ppbus_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -h $S/dev/ppbus/ppbus_if.m" \ - no-obj no-implicit-rule before-depend \ - clean "ppbus_if.h" +dev/ppbus/ppbus_if.m optional ppbus dev/ppbus/if_plip.c optional plip dev/ppbus/immio.c optional vpo dev/ppbus/lpbb.c optional lpbb @@ -305,20 +216,7 @@ dev/si/si3_t225.c optional si dev/si/si_eisa.c optional si eisa dev/si/si_isa.c optional si isa dev/si/si_pci.c optional si pci -smbus_if.o optional smbus \ - dependency "smbus_if.c smbus_if.h" \ - compile-with "${NORMAL_C}" \ - no-implicit-rule local -smbus_if.c optional smbus \ - dependency "$S/kern/makedevops.pl $S/dev/smbus/smbus_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -c $S/dev/smbus/smbus_if.m" \ - no-obj no-implicit-rule before-depend local \ - clean "smbus_if.c" -smbus_if.h optional smbus \ - dependency "$S/kern/makedevops.pl $S/dev/smbus/smbus_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -h $S/dev/smbus/smbus_if.m" \ - no-obj no-implicit-rule before-depend \ - clean "smbus_if.h" +dev/smbus/smbus_if.m optional smbus dev/smbus/smb.c optional smb dev/smbus/smbconf.c optional smbus dev/smbus/smbus.c optional smbus @@ -355,20 +253,7 @@ dev/sym/sym_hipd.c optional sym \ dependency "$S/dev/sym/sym_{conf,defs}.h" # # USB support -usb_if.o optional usb \ - dependency "usb_if.c" \ - compile-with "${NORMAL_C}" \ - no-implicit-rule local -usb_if.c optional usb \ - dependency "$S/kern/makedevops.pl $S/dev/usb/usb_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -c $S/dev/usb/usb_if.m" \ - no-obj no-implicit-rule before-depend local \ - clean "usb_if.c" -usb_if.h optional usb \ - dependency "$S/kern/makedevops.pl $S/dev/usb/usb_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -h $S/dev/usb/usb_if.m" \ - no-obj no-implicit-rule before-depend \ - clean "usb_if.h" +dev/usb/usb_if.m optional usb dev/usb/hid.c optional usb dev/usb/if_aue.c optional aue dev/usb/if_cue.c optional cue @@ -455,20 +340,7 @@ i4b/layer4/i4b_i4bdrv.c optional i4b i4b/layer4/i4b_l4.c optional i4b i4b/layer4/i4b_l4mgmt.c optional i4b i4b/layer4/i4b_l4timer.c optional i4b -isa_if.o optional isa \ - dependency "isa_if.c isa_if.h" \ - compile-with "${NORMAL_C}" \ - no-implicit-rule local -isa_if.c optional isa \ - dependency "$S/kern/makedevops.pl $S/isa/isa_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -c $S/isa/isa_if.m" \ - no-obj no-implicit-rule before-depend local \ - clean "isa_if.c" -isa_if.h optional isa \ - dependency "$S/kern/makedevops.pl $S/isa/isa_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -h $S/isa/isa_if.m" \ - no-obj no-implicit-rule before-depend \ - clean "isa_if.h" +isa/isa_if.m optional isa isa/isa_common.c optional isa isa/isahint.c optional isa isa/joy.c optional joy @@ -947,20 +819,7 @@ pci/pci.c optional pci pci/pci_compat.c optional pci pci/pcic_p.c optional pcic pci pci/pcisupport.c optional pci -pci_if.o optional pci \ - dependency "pci_if.c pci_if.h" \ - compile-with "${NORMAL_C}" \ - no-implicit-rule local -pci_if.c optional pci \ - dependency "$S/kern/makedevops.pl $S/pci/pci_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -c $S/pci/pci_if.m" \ - no-obj no-implicit-rule before-depend local \ - clean "pci_if.c" -pci_if.h optional pci \ - dependency "$S/kern/makedevops.pl $S/pci/pci_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -h $S/pci/pci_if.m" \ - no-obj no-implicit-rule before-depend \ - clean "pci_if.h" +pci/pci_if.m optional pci pci/simos.c optional simos pci/uhci_pci.c optional uhci pci/xrpu.c optional xrpu diff --git a/sys/conf/files.alpha b/sys/conf/files.alpha index fdd7e6c..785a7f8 100644 --- a/sys/conf/files.alpha +++ b/sys/conf/files.alpha @@ -73,20 +73,7 @@ alpha/alpha/interrupt.c standard alpha/alpha/userconfig.c optional userconfig alpha/alpha/vm_machdep.c standard alpha/alpha/clock.c standard -clock_if.o standard \ - dependency "clock_if.c" \ - compile-with "${NORMAL_C}" \ - no-implicit-rule local -clock_if.c standard \ - dependency "$S/kern/makedevops.pl $S/alpha/alpha/clock_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -c $S/alpha/alpha/clock_if.m" \ - no-obj no-implicit-rule before-depend local \ - clean "clock_if.c" -clock_if.h standard \ - dependency "$S/kern/makedevops.pl $S/alpha/alpha/clock_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -h $S/alpha/alpha/clock_if.m" \ - no-obj no-implicit-rule before-depend \ - clean "clock_if.h" +alpha/alpha/clock_if.m standard alpha/tlsb/tlsb.c optional dec_kn8ae alpha/tlsb/tlsbmem.c optional dec_kn8ae alpha/tlsb/tlsbcpu.c optional dec_kn8ae @@ -117,20 +104,7 @@ alpha/tc/tcds_dma.c optional tcds dec_3000_500 alpha/tc/esp.c optional esp dec_3000_300 alpha/tc/esp.c optional esp dec_3000_500 dev/dec/mcclock.c optional mcclock -mcclock_if.o optional mcclock \ - dependency "mcclock_if.c" \ - compile-with "${NORMAL_C}" \ - no-implicit-rule local -mcclock_if.c standard \ - dependency "$S/kern/makedevops.pl $S/dev/dec/mcclock_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -c $S/dev/dec/mcclock_if.m" \ - no-obj no-implicit-rule before-depend local \ - clean "mcclock_if.c" -mcclock_if.h optional mcclock \ - dependency "$S/kern/makedevops.pl $S/dev/dec/mcclock_if.m" \ - compile-with "perl5 $S/kern/makedevops.pl -h $S/dev/dec/mcclock_if.m" \ - no-obj no-implicit-rule before-depend \ - clean "mcclock_if.h" +dev/dec/mcclock_if.m optional mcclock alpha/alpha/elf_machdep.c standard alpha/isa/isa.c optional isa alpha/isa/isa_dma.c optional isa |