Makefile revision 1.28
1# $NetBSD: Makefile,v 1.28 2003/07/22 11:46:52 mrg Exp $ 2 3# The `all' target must appear before bsd.own.mk is pulled in. 4all: 5 @echo "Please understand what you are doing, first." 6 @false 7 8.include <bsd.own.mk> 9.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" 10 11SETSENV= DESTDIR=${DESTDIR:Q} \ 12 MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \ 13 CKSUM=${TOOL_CKSUM:Q} MAKE=${MAKE:Q} MTREE=${TOOL_MTREE:Q} \ 14 PAX=${TOOL_PAX:Q} 15 16print_machine: .PHONY 17 @echo ${MACHINE} 18 19print_machine_arch: .PHONY 20 @echo ${MACHINE_ARCH} 21 22print_machine_cpu: .PHONY 23 @echo ${MACHINE_CPU} 24 25print_object_fmt: .PHONY 26 @echo ${OBJECT_FMT} 27 28print_toolchain_missing: .PHONY 29 @echo "${TOOLCHAIN_MISSING}" 30 31print_x11_version: .PHONY 32.if defined(USE_XF86_4) && (${USE_XF86_4} != no) 33 @echo 4 34.else 35 @echo 3 36.endif 37 38# This target has debugging value only, really. 39makeflist: .PHONY check_DESTDIR 40 ${SETSENV} ${HOST_SH} ${.CURDIR}/makeflist 41 42# 43# SET BUILDING TARGETS 44# 45 46.if ${MKUNPRIVED} == "no" 47METALOG.unpriv= 48.else 49METALOG.unpriv= -M ${METALOG} 50.endif 51 52.PRECIOUS: checkflist 53checkflist: check_DESTDIR 54 ${SETSENV} ${HOST_SH} ${.CURDIR}/checkflist ${METALOG.unpriv} 55 56.PRECIOUS: checkflist-x11 57checkflist-x11: check_DESTDIR 58 ${SETSENV} ${HOST_SH} ${.CURDIR}/checkflist -x11 59 60.PRECIOUS: maketars 61maketars: check_DESTDIR check_RELEASEDIR 62.if defined(DESTDIR) && ${DESTDIR} != "" 63 ${MAKE} checkflist${CHECKFLISTFLAGS} 64.endif 65 mkdir -p ${RELEASEDIR}/${MACHINE}/binary/sets 66 ${SETSENV} ${HOST_SH} ${.CURDIR}/maketars -d ${DESTDIR:S,^$,/,} \ 67 ${METALOG.unpriv} -N ${NETBSDSRCDIR}/etc \ 68 -t ${RELEASEDIR}/${MACHINE}/binary/sets ${MAKETARSETS} 69 70.PRECIOUS: makesrctars 71makesrctars: check_RELEASEDIR 72 mkdir -p ${RELEASEDIR}/source/sets 73 ${SETSENV} ${HOST_SH} ${.CURDIR}/makesrctars \ 74 ${NETBSDSRCDIR} ${RELEASEDIR}/source/sets 75 76.PRECIOUS: makesums 77makesums: check_RELEASEDIR 78 ${SETSENV} ${MAKESUMS} -t ${RELEASEDIR}/${MACHINE}/binary/sets 79 80.PRECIOUS: installsets 81installsets: check_DESTDIR 82.if !defined(INSTALLDIR) 83 @echo "setenv INSTALLDIR before doing that!" 84 @false 85.endif 86 ${SETSENV} ${HOST_SH} ${.CURDIR}/maketars -d ${DESTDIR:S,^$,/,} \ 87 ${METALOG.unpriv} -N ${NETBSDSRCDIR}/etc \ 88 -i ${INSTALLDIR} ${INSTALLSETS} 89 90# 91# MAIN ENTRY POINTS 92# 93 94sets: maketars .WAIT makesums 95 @true 96 97sourcesets: makesrctars 98 @true 99 100.include <bsd.sys.mk> 101