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. 4 all: 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 11 SETSENV= 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 16 print_machine: .PHONY 17 @echo ${MACHINE} 18 19 print_machine_arch: .PHONY 20 @echo ${MACHINE_ARCH} 21 22 print_machine_cpu: .PHONY 23 @echo ${MACHINE_CPU} 24 25 print_object_fmt: .PHONY 26 @echo ${OBJECT_FMT} 27 28 print_toolchain_missing: .PHONY 29 @echo "${TOOLCHAIN_MISSING}" 30 31 print_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. 39 makeflist: .PHONY check_DESTDIR 40 ${SETSENV} ${HOST_SH} ${.CURDIR}/makeflist 41 42 # 43 # SET BUILDING TARGETS 44 # 45 46 .if ${MKUNPRIVED} == "no" 47 METALOG.unpriv= 48 .else 49 METALOG.unpriv= -M ${METALOG} 50 .endif 51 52 .PRECIOUS: checkflist 53 checkflist: check_DESTDIR 54 ${SETSENV} ${HOST_SH} ${.CURDIR}/checkflist ${METALOG.unpriv} 55 56 .PRECIOUS: checkflist-x11 57 checkflist-x11: check_DESTDIR 58 ${SETSENV} ${HOST_SH} ${.CURDIR}/checkflist -x11 59 60 .PRECIOUS: maketars 61 maketars: 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 71 makesrctars: check_RELEASEDIR 72 mkdir -p ${RELEASEDIR}/source/sets 73 ${SETSENV} ${HOST_SH} ${.CURDIR}/makesrctars \ 74 ${NETBSDSRCDIR} ${RELEASEDIR}/source/sets 75 76 .PRECIOUS: makesums 77 makesums: check_RELEASEDIR 78 ${SETSENV} ${MAKESUMS} -t ${RELEASEDIR}/${MACHINE}/binary/sets 79 80 .PRECIOUS: installsets 81 installsets: 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 94 sets: maketars .WAIT makesums 95 @true 96 97 sourcesets: makesrctars 98 @true 99 100 .include <bsd.sys.mk> 101