Make doing a few things here (e.g. checkflist) a little easier. This

determines which crypto set to build based on <bsd.crypto.mk> and invokes
the programs with the various correct options.

Not complete yet, but a good starting point for a few things, and a little
more flexible than the method used in the release: target in etc/Makefile.
This commit is contained in:
thorpej 2000-03-28 00:38:06 +00:00
parent e1e415963d
commit 5c4ddfff99

104
distrib/sets/Makefile Normal file
View File

@ -0,0 +1,104 @@
# $NetBSD: Makefile,v 1.1 2000/03/28 00:38:06 thorpej Exp $
# The `all' target must appear before bsd.own.mk is pulled in.
all:
@echo "Please understand what you are doing, first."
@false
#
# DETERMINE WHICH CRYPTO SET TO USE
#
.include <bsd.own.mk>
SRCTOP= ../..
.include <bsd.crypto.mk>
.if defined(CRYPTOBASE) && (${CRYPTOBASE} != "none")
CRYPTOWHICH!= basename ${CRYPTOBASE}
.endif
.if defined(CRYPTOWHICH)
.if (${CRYPTOWHICH} == "crypto-us")
CHECKFLIST_CRYPTOARG=-secr
CRYPTOSET="secr"
.endif
.if (${CRYPTOWHICH} == "crypto-intl")
CHECKFLIST_CRYPTOARG=-cryptint
CRYPTOSET="cryptint"
.endif
.endif # defined(CRYPTOWHICH)
#
# UTILITY TARGETS
#
check_destdir: .PHONY
.if !defined(DESTDIR)
@echo "DESTDIR must be set"
@false
.else
@true
.endif
check_releasedir: .PHONY
.if !defined(RELEASEDIR)
@echo "RELEASEDIR must be set"
@false
.else
@true
.endif
#
# SET BUILDING TARGETS
#
.PRECIOUS: checkflist
checkflist: check_destdir
DESTDIR=${DESTDIR} sh ${.CURDIR}/checkflist ${CHECKFLIST_CRYPTOARG}
maketars_base: check_destdir check_releasedir
sh ${.CURDIR}/maketars -d ${DESTDIR} -t ${RELEASEDIR}/binary/sets
maketars_crypto: check_destdir check_releasedir
sh ${.CURDIR}/maketars -d ${DESTDIR} -t ${RELEASEDIR}/binary/security \
${CRYPTOSET}
.PRECIOUS: maketars
maketars: maketars_base
.if defined(CRYPTOSET)
@${MAKE} maketars_crypto
.else
@true
.endif
makesums_base: check_releasedir
sh ${.CURDIR}/makesums -t ${RELEASEDIR}/binary/sets
makesums_crypto: check_releasedir
sh ${.CURDIR}/makesums -t ${RELEASEDIR}/binary/security
.PRECIOUS: makesums
makesums: makesums_base
.if defined(CRYPTOSET)
@${MAKE} makesums_crypto
.else
@true
.endif
#
# MAIN ENTRY POINTS
#
sets: maketars makesums
@true
cryptoset: .PHONY
.if defined(CRYPTOSET)
${MAKE} maketars_crypto
${MAKE} makesums_crypto
.else
@echo "No crypto set to make."
@false
.endif