Note that this code is dormant unless the options files exist.
Also, parsing of quoted options in the config files is improved.
What this allows, is all the options in LINT to be specified to be
configured as #defines in a file rather than on the CC command line at
kernel build time. This means that 'make depend' will catch dependencies
on actual *options*, meaning that you can run 'config' and 'make depend'
in complete safety WITHOUT removing the compile directory each time.
Unfortunately, this requires a pass over the source to get the individual
files to #include the new .h files that would be generated by config.
This has a small compile time penalty (appears up to about 2% slower)
from a "fresh" build. Of course, you should not be needing to do complete
rebuilds very often once this was completed, so it would be an overall
win for most people.
Since this code is dormant and we've got a lot of other things happening
on the kernel tree at the moment (prototypes, devfs, static declarations
etc) I am not planning on doing any changes to activate this feature just
yet.
others. The flag can be put in descriptive locations, e.g.:
device sb0 at isa? port 0x220 irq 7 conflicts drq 1 vector sbintr
or
device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr
But is nonetheless boolean only. You can't turn conflict checking off for
only a given type of conflict. I didn't deem it worth the trouble at this
stage, and it's far better than the ALLOW_CONFLICT_* that preceeded it.
/*
* filename [ standard | optional ] [ config-dependent ]
* [ dev* | profiling-routine ] [ device-driver] [ no-obj ]
* [ compile-with "compile rule" [no-implicit-rule] ]
* [ dependancy "dependancy-list"]
*/
I added
no-obj - This entry does not create anything linkable to the kernel.
dependancy - Add additional dependancy rules to a target.
no-implicit-rule - Don't assume .c -> .o type rules. Config is really
dumb in this area and assumes that everything is a .c file
irregarless of extention. This was the best choice really
since there may even be .c file that you don't want to follow
the standard rules.
This was all done so that the building to the aic7770 assembler and using
the aic7770 assembler in the building of the aic7770 driver could be config
dependant. I can now have an entry like this for the driver:
aic7770 optional ahc device-driver \
compile-with "${CC} $> -o $@" \
dependancy "$S/gnu/misc/aic7770/aic7770.c" \
no-obj no-implicit-rule
aic7770_seq.h optional ahc device-driver \
compile-with "${.CURDIR}/aic7770 -o $@ $S/gnu/misc/aic7770/aic7770.seq"\
dependancy "$S/gnu/misc/aic7770/aic7770.seq aic7770" \
no-obj no-implicit-rule
i386/isa/aic7770.c optional ahc device-driver \
dependancy "aic7770_seq.h"
I also added '\' escaping to newlines so that this doesn't look as gross as
it could have.
Reviewed by: jkh