Makefile revision 1.29
1#	$NetBSD: Makefile,v 1.29 2003/08/04 05:53:20 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_use_tools_toolchain: .PHONY
32	@echo "${USE_TOOLS_TOOLCHAIN}"
33
34print_x11_version: .PHONY
35.if defined(USE_XF86_4) && (${USE_XF86_4} != no)
36	@echo 4
37.else
38	@echo 3
39.endif
40
41# This target has debugging value only, really.
42makeflist: .PHONY check_DESTDIR
43	${SETSENV} ${HOST_SH} ${.CURDIR}/makeflist
44
45#
46# SET BUILDING TARGETS
47#
48
49.if ${MKUNPRIVED} == "no"
50METALOG.unpriv=
51.else
52METALOG.unpriv=	-M ${METALOG}
53.endif
54
55.PRECIOUS: checkflist
56checkflist: check_DESTDIR
57	${SETSENV} ${HOST_SH} ${.CURDIR}/checkflist ${METALOG.unpriv}
58
59.PRECIOUS: checkflist-x11
60checkflist-x11: check_DESTDIR
61	${SETSENV} ${HOST_SH} ${.CURDIR}/checkflist -x11
62
63.PRECIOUS: maketars
64maketars: check_DESTDIR check_RELEASEDIR
65.if defined(DESTDIR) && ${DESTDIR} != ""
66	${MAKE} checkflist${CHECKFLISTFLAGS}
67.endif
68	mkdir -p ${RELEASEDIR}/${MACHINE}/binary/sets
69	${SETSENV} ${HOST_SH} ${.CURDIR}/maketars -d ${DESTDIR:S,^$,/,} \
70	    ${METALOG.unpriv} -N ${NETBSDSRCDIR}/etc \
71	    -t ${RELEASEDIR}/${MACHINE}/binary/sets ${MAKETARSETS}
72
73.PRECIOUS: makesrctars
74makesrctars: check_RELEASEDIR
75	mkdir -p ${RELEASEDIR}/source/sets
76	${SETSENV} ${HOST_SH} ${.CURDIR}/makesrctars \
77	    ${NETBSDSRCDIR} ${RELEASEDIR}/source/sets
78
79.PRECIOUS: makesums
80makesums: check_RELEASEDIR
81	${SETSENV} ${MAKESUMS} -t ${RELEASEDIR}/${MACHINE}/binary/sets
82
83.PRECIOUS: installsets
84installsets: check_DESTDIR
85.if !defined(INSTALLDIR)
86	@echo "setenv INSTALLDIR before doing that!"
87	@false
88.endif
89	${SETSENV} ${HOST_SH} ${.CURDIR}/maketars -d ${DESTDIR:S,^$,/,} \
90	    ${METALOG.unpriv} -N ${NETBSDSRCDIR}/etc \
91	    -i ${INSTALLDIR} ${INSTALLSETS}
92
93#
94# MAIN ENTRY POINTS
95#
96
97sets: maketars .WAIT makesums
98	@true
99
100sourcesets: makesrctars
101	@true
102
103.include <bsd.sys.mk>
104