Subject: README: changes to the build system
To: None <>
From: Jason Thorpe <>
List: current-users
Date: 07/13/1999 11:27:09
Hi folks...

You may have noticed my mega-commit yesterday which completely reworks
the build system for integrated cryptography support.  These changes
are designed to make it easier to support multiple different crypto
code bases: one for the USA (crypto-us) and one for the free world

Attached below is the relevant section from /usr/share/mk/bsd.README:


The include file <> contains variables related to building
cryptography support into the system.

It has no targets.

In order to get system-specific crypto configuration parameters, will include <>, which in turn will include
the configuration file specified by the "MAKECONF" variable.  See
the <> section for more information. requires the "SRCTOP" variable to be defined before
inclusion.  This variable contains the relative path to the top of
the source tree, with no trailing '/'.

The variable "CRYPTOBASE" may be set by the user to select which
cryptography code base will be used when building the system.  If
CRYPTOBASE is set to "none", no cryptography support will be built
into the system.  CRYPTOBASE should be set to the name of the crypto
sub-tree in the SRCTOP directory.  If CRYPTOBASE is not set, will use the following algorithm to set the variable:

	.if exists(${SRCTOP}/crypto-us)
	.elif exists(${SRCTOP}/crypto-intl)

Note that it is legal for the user to set CRYPTOBASE to a relative
path outside of the source directory.  For example:

	CRYPTOPATH= ../cryptosrc-intl/crypto-intl

If CRYPTOBASE is set and not set to "none", will use
CRYPTOBASE to set the "CRYPTOPATH" variable.  CRYPTOPATH is set to
the value "${SRCTOP}/${CRYPTOBASE}".

Once CRYPTOPATH is set by, it checks to see if the
path actually exists.  If it does not exist, the variable is undefined.
Program and library Makefiles may key off the definition of CRYPTOPATH
to determine if cryptography support is to be included in that program.
For example, a typical program Makefile should do the following:

	SRCTOP= ../..
	.include <>

	PROG= login
	SRCS= login.c
	.if defined(CRYPTOPATH)
	.include "${CRYPTOPATH}/usr.bin/login/Makefile.frag"

The Makefile.frag included will now influence the build of the login(1)
program, specifying additional source files, libraries, and CPP flags.

The "EXPORTABLE_SYSTEM" variable, if set, causes CRYPTOBASE to be set
to "none".  This is for compatibilty with older NetBSD build environments.



The build process is now significantly less complex, and all of the wacky
kludges for building "src/domesic" are now gone.  Programs are built only
once, and programs that only exist in a crypto dir are build by make(1)
cd'ing into that "disconnected subdirectory".

Until the FTP/SUP server admins fix (long overdue, HINT HINT!) the
SUP'able trees to provide "src/crypto-us" instead of "src/domestic",
you will need to add the following to your /etc/mk.conf file, if you
are a USA resident and are using the USA crypto code (i.e. Kerberos IV):

CRYPTOBASE= domestic

...until you do your SUP again tomorrow; I'm going to add "domestic" to's try list right now.

If you have any questions, please send mail here about it.  If you encounter
any problems, please send a bug report w/ send-pr(1), and I'll look into

        -- Jason R. Thorpe <>