Subject: CVS commit: syssrc
To: None <>
From: Jason R Thorpe <>
List: source-changes
Date: 07/08/1999 23:44:59
Module Name:	syssrc
Committed By:	thorpej
Date:		Fri Jul  9 06:44:59 UTC 1999

Modified Files:
	syssrc/usr.sbin/config: config.h files.c gram.y main.c mkheaders.c
	    mkmakefile.c scan.l util.c

Log Message:
Add a mechanism to specify prefixes that are transparently prepended
to file specifications.  The prefixes are arranged in a stack, and
nest, so that file, object, and include specifications are normalized,
and all end up relative to the kernel compile directory.

For example, in the kernel config file:

# Pull in config fragments for kernel crypto
prefix ../crypto-us/sys 			# push it
cinclude "conf/files.crypto-us"			# include it if it's there
prefix						# pop it

and in files.crypto-us:

file netinet6/esp_core.c                ipsec & ipsec_esp
file netinet6/esp_output.c              ipsec & ipsec_esp
file netinet6/esp_input.c               ipsec & ipsec_esp

...generates the following in the kernel Makefile:

        $S/../crypto-us/sys/netinet6/esp_core.c \
        $S/../crypto-us/sys/netinet6/esp_output.c \
        $S/../crypto-us/sys/netinet6/esp_input.c \

By placing this all in the kernel config file, all the magic involved in
reaching into non-standard kernel source directories is placed into a file
that the user is expected to edit anyway, and reasonable examples (and
sane defaults, for typical source checkouts) can be provided.

To generate a diff of this commit:
cvs rdiff -r1.43 -r1.44 syssrc/usr.sbin/config/config.h
cvs rdiff -r1.9 -r1.10 syssrc/usr.sbin/config/files.c
cvs rdiff -r1.26 -r1.27 syssrc/usr.sbin/config/gram.y
cvs rdiff -r1.39 -r1.40 syssrc/usr.sbin/config/main.c \
cvs rdiff -r1.22 -r1.23 syssrc/usr.sbin/config/mkheaders.c
cvs rdiff -r1.24 -r1.25 syssrc/usr.sbin/config/scan.l
cvs rdiff -r1.7 -r1.8 syssrc/usr.sbin/config/util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.