2004-05-12 20:56:41 +04:00
|
|
|
# $NetBSD: Makefile,v 1.46 2004/05/12 16:56:41 cl Exp $
|
2000-03-28 04:38:06 +04:00
|
|
|
|
|
|
|
# The `all' target must appear before bsd.own.mk is pulled in.
|
|
|
|
all:
|
|
|
|
@echo "Please understand what you are doing, first."
|
|
|
|
@false
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
2002-05-02 22:02:14 +04:00
|
|
|
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
|
2000-03-28 04:38:06 +04:00
|
|
|
|
2004-01-30 11:43:15 +03:00
|
|
|
SETSCMD= cd ${.CURDIR} && \
|
|
|
|
DESTDIR=${DESTDIR:Q} \
|
2002-02-27 13:51:47 +03:00
|
|
|
MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
|
2003-07-10 14:33:58 +04:00
|
|
|
CKSUM=${TOOL_CKSUM:Q} MAKE=${MAKE:Q} MTREE=${TOOL_MTREE:Q} \
|
2004-01-30 11:43:15 +03:00
|
|
|
MKTEMP=${TOOL_MKTEMP:Q} PAX=${TOOL_PAX:Q} HOST_SH=${HOST_SH:Q} \
|
|
|
|
${HOST_SH}
|
2002-02-27 13:51:47 +03:00
|
|
|
|
2004-01-08 04:48:45 +03:00
|
|
|
.if ${MKX11} != "no"
|
|
|
|
MAKEFLIST_FLAGS= -b
|
2004-04-20 10:36:34 +04:00
|
|
|
MAKESRCTARS_FLAGS= -x ${X11SRCDIR}
|
2004-01-08 04:48:45 +03:00
|
|
|
.else
|
|
|
|
MAKEFLIST_FLAGS=
|
2004-04-20 10:36:34 +04:00
|
|
|
MAKESRCTARS_FLAGS=
|
2004-01-08 04:48:45 +03:00
|
|
|
.endif
|
|
|
|
|
2003-12-20 01:25:53 +03:00
|
|
|
.if !defined(MAKETARSETS)
|
2004-01-30 11:43:15 +03:00
|
|
|
MAKETARSETS!= ${SETSCMD} ./makeflist -l ${MAKEFLIST_FLAGS}
|
2003-12-20 01:25:53 +03:00
|
|
|
.endif
|
|
|
|
|
2004-01-29 11:34:21 +03:00
|
|
|
print_have_gcc3: .PHONY
|
2003-09-21 23:26:02 +04:00
|
|
|
@echo ${HAVE_GCC3}
|
|
|
|
|
2001-11-24 05:54:50 +03:00
|
|
|
print_machine: .PHONY
|
|
|
|
@echo ${MACHINE}
|
|
|
|
|
|
|
|
print_machine_arch: .PHONY
|
|
|
|
@echo ${MACHINE_ARCH}
|
|
|
|
|
|
|
|
print_machine_cpu: .PHONY
|
|
|
|
@echo ${MACHINE_CPU}
|
|
|
|
|
|
|
|
print_object_fmt: .PHONY
|
|
|
|
@echo ${OBJECT_FMT}
|
|
|
|
|
2002-09-20 02:04:34 +04:00
|
|
|
print_toolchain_missing: .PHONY
|
|
|
|
@echo "${TOOLCHAIN_MISSING}"
|
2001-11-24 05:54:50 +03:00
|
|
|
|
2003-08-04 09:53:20 +04:00
|
|
|
print_use_tools_toolchain: .PHONY
|
|
|
|
@echo "${USE_TOOLS_TOOLCHAIN}"
|
|
|
|
|
2002-02-11 19:23:17 +03:00
|
|
|
print_x11_version: .PHONY
|
2004-01-08 04:48:45 +03:00
|
|
|
${HOST_SH} -c '. ${.CURDIR}/sets.subr; echo $$x11_version'
|
2002-02-11 19:23:17 +03:00
|
|
|
|
2001-11-24 05:54:50 +03:00
|
|
|
# This target has debugging value only, really.
|
2004-03-06 19:12:06 +03:00
|
|
|
makeflist: .PHONY .PRECIOUS check_DESTDIR
|
2004-01-30 11:43:15 +03:00
|
|
|
${SETSCMD} ./makeflist ${MAKEFLIST_FLAGS}
|
2001-11-24 05:54:50 +03:00
|
|
|
|
2000-03-28 04:38:06 +04:00
|
|
|
#
|
|
|
|
# SET BUILDING TARGETS
|
|
|
|
#
|
|
|
|
|
2004-05-12 20:56:41 +04:00
|
|
|
TARDIR= ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets
|
2004-01-30 11:43:15 +03:00
|
|
|
SOURCETARDIR= ${RELEASEDIR}/source/sets
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
.if ${MKUNPRIVED} == "no"
|
|
|
|
METALOG.unpriv=
|
|
|
|
.else
|
|
|
|
METALOG.unpriv= -M ${METALOG}
|
|
|
|
.endif
|
|
|
|
|
2004-01-30 11:43:15 +03:00
|
|
|
|
2004-01-29 11:34:21 +03:00
|
|
|
checkflist: .PRECIOUS .PHONY check_DESTDIR
|
2004-01-30 11:43:15 +03:00
|
|
|
${SETSCMD} ./checkflist \
|
2004-01-08 04:48:45 +03:00
|
|
|
${MAKEFLIST_FLAGS} ${CHECKFLIST_FLAGS} ${METALOG.unpriv}
|
2000-03-28 04:38:06 +04:00
|
|
|
|
2004-01-29 11:34:21 +03:00
|
|
|
checkflist-x11: .PHONY check_DESTDIR
|
2004-01-30 11:43:15 +03:00
|
|
|
${SETSCMD} ./checkflist -x ${CHECKFLIST_FLAGS}
|
|
|
|
|
2002-01-01 10:59:32 +03:00
|
|
|
|
2004-01-29 11:34:21 +03:00
|
|
|
maketars: .PRECIOUS .PHONY check_DESTDIR check_RELEASEDIR .WAIT \
|
|
|
|
maketarsetup .WAIT ${MAKETARSETS:@.TARS.@do-${.TARS.}@}
|
2003-12-20 01:25:53 +03:00
|
|
|
@true
|
|
|
|
|
2004-01-30 11:43:15 +03:00
|
|
|
maketarsetup: .EXEC
|
2003-01-12 21:51:26 +03:00
|
|
|
.if defined(DESTDIR) && ${DESTDIR} != ""
|
2004-01-30 11:43:15 +03:00
|
|
|
${_MKMSG} "execute checkflist"
|
2003-09-30 10:26:37 +04:00
|
|
|
${MAKE} checkflist
|
2002-07-09 20:08:38 +04:00
|
|
|
.endif
|
2004-01-30 11:43:15 +03:00
|
|
|
mkdir -p ${TARDIR}
|
2003-12-22 07:56:53 +03:00
|
|
|
for i in BSDSUM CKSUM MD5 SYSVSUM; do \
|
2004-01-30 11:43:15 +03:00
|
|
|
rm -f ${TARDIR}/$$i ${TARDIR}/$$i.tmp; \
|
|
|
|
done
|
|
|
|
|
|
|
|
makesetfiles: .PHONY
|
|
|
|
${_MKMSG_CREATE} "set lists"
|
|
|
|
${SETSCMD} ./maketars -S -d ${DESTDIR:S,^$,/,} ${METALOG.unpriv} \
|
|
|
|
-N ${NETBSDSRCDIR}/etc ${MAKEFLIST_FLAGS} -t ${TARDIR}
|
|
|
|
|
2003-12-20 01:25:53 +03:00
|
|
|
.for tar in ${MAKETARSETS}
|
2003-12-29 07:46:18 +03:00
|
|
|
do-${tar}: .PHONY
|
2004-01-30 11:43:15 +03:00
|
|
|
${SETSCMD} ./maketars -d ${DESTDIR:S,^$,/,} ${METALOG.unpriv} \
|
|
|
|
-N ${NETBSDSRCDIR}/etc -t ${TARDIR} ${tar} \
|
|
|
|
|| rm -f ${TARDIR}/${tar}.tgz
|
2003-12-20 01:25:53 +03:00
|
|
|
.endfor
|
2000-03-28 04:38:06 +04:00
|
|
|
|
2004-01-30 11:43:15 +03:00
|
|
|
|
2004-01-29 11:34:21 +03:00
|
|
|
makesrctars: .PRECIOUS .PHONY check_RELEASEDIR
|
2004-01-30 11:43:15 +03:00
|
|
|
mkdir -p ${SOURCETARDIR}
|
2004-04-20 10:36:34 +04:00
|
|
|
${SETSCMD} ./makesrctars ${MAKESRCTARS_FLAGS} \
|
|
|
|
${NETBSDSRCDIR} ${SOURCETARDIR}
|
2004-01-30 11:43:15 +03:00
|
|
|
|
2003-05-10 10:08:12 +04:00
|
|
|
|
2004-01-29 11:34:21 +03:00
|
|
|
makesums: .PRECIOUS .PHONY check_RELEASEDIR .WAIT \
|
|
|
|
${MAKETARSETS:@.TARS.@do-sum-${.TARS.}@}
|
2003-12-22 07:56:53 +03:00
|
|
|
for i in BSDSUM CKSUM MD5 SYSVSUM; do \
|
2004-01-30 11:43:15 +03:00
|
|
|
mv ${TARDIR}/$$i.tmp ${TARDIR}/$$i; \
|
|
|
|
done
|
2003-12-20 01:25:53 +03:00
|
|
|
|
|
|
|
.for tar in ${MAKETARSETS}
|
2003-12-29 07:46:18 +03:00
|
|
|
do-sum-${tar}: .PHONY do-${tar}
|
2004-01-30 11:43:15 +03:00
|
|
|
${MAKESUMS} -t ${TARDIR} ${tar}.tgz
|
2003-12-22 07:56:53 +03:00
|
|
|
for i in BSDSUM CKSUM MD5 SYSVSUM; do \
|
2004-01-30 11:43:15 +03:00
|
|
|
${TOOL_CAT} ${TARDIR}/$$i >> ${TARDIR}/$$i.tmp; \
|
2003-12-22 07:56:53 +03:00
|
|
|
done
|
2003-12-20 01:25:53 +03:00
|
|
|
.endfor
|
2003-12-28 12:27:41 +03:00
|
|
|
.ORDER: ${MAKETARSETS:@.TARS.@do-sum-${.TARS.}@}
|
2000-03-28 04:38:06 +04:00
|
|
|
|
2004-01-30 11:43:15 +03:00
|
|
|
|
2004-01-29 11:34:21 +03:00
|
|
|
installsets: .PHONY check_DESTDIR
|
2002-12-12 11:54:25 +03:00
|
|
|
.if !defined(INSTALLDIR)
|
|
|
|
@echo "setenv INSTALLDIR before doing that!"
|
|
|
|
@false
|
|
|
|
.endif
|
2004-01-30 11:43:15 +03:00
|
|
|
${SETSCMD} ./maketars -d ${DESTDIR:S,^$,/,} \
|
2004-01-29 11:34:21 +03:00
|
|
|
${METALOG.unpriv} -N ${NETBSDSRCDIR}/etc ${MAKEFLIST_FLAGS} \
|
2002-12-19 09:21:45 +03:00
|
|
|
-i ${INSTALLDIR} ${INSTALLSETS}
|
2002-12-12 11:54:25 +03:00
|
|
|
|
2004-01-30 11:43:15 +03:00
|
|
|
|
2000-03-28 04:38:06 +04:00
|
|
|
#
|
|
|
|
# MAIN ENTRY POINTS
|
|
|
|
#
|
|
|
|
|
2004-01-29 11:34:21 +03:00
|
|
|
sets: .PHONY maketars .WAIT makesums
|
2000-03-28 04:38:06 +04:00
|
|
|
@true
|
2002-03-23 02:15:32 +03:00
|
|
|
|
2004-01-29 11:34:21 +03:00
|
|
|
sourcesets: .PHONY makesrctars
|
2003-05-10 10:08:12 +04:00
|
|
|
@true
|
|
|
|
|
2002-03-23 02:15:32 +03:00
|
|
|
.include <bsd.sys.mk>
|