Home | History | Annotate | Line # | Download | only in sets
Makefile revision 1.40
      1  1.40     lukem #	$NetBSD: Makefile,v 1.40 2004/01/08 01:48:45 lukem Exp $
      2   1.1   thorpej 
      3   1.1   thorpej # The `all' target must appear before bsd.own.mk is pulled in.
      4   1.1   thorpej all:
      5   1.1   thorpej 	@echo "Please understand what you are doing, first."
      6   1.1   thorpej 	@false
      7   1.1   thorpej 
      8   1.1   thorpej .include <bsd.own.mk>
      9  1.15     lukem .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
     10   1.1   thorpej 
     11   1.6     lukem SETSENV=	DESTDIR=${DESTDIR:Q} \
     12   1.6     lukem 		MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \
     13  1.26     lukem 		CKSUM=${TOOL_CKSUM:Q} MAKE=${MAKE:Q} MTREE=${TOOL_MTREE:Q} \
     14  1.38     lukem 		MKTEMP=${TOOL_MKTEMP:Q} PAX=${TOOL_PAX:Q} HOST_SH=${HOST_SH:Q}
     15  1.30      tron 
     16  1.40     lukem .if ${MKX11} != "no"
     17  1.40     lukem MAKEFLIST_FLAGS=	-b
     18  1.40     lukem .else
     19  1.40     lukem MAKEFLIST_FLAGS=
     20  1.40     lukem .endif
     21  1.40     lukem 
     22  1.33       jmc .if !defined(MAKETARSETS)
     23  1.40     lukem MAKETARSETS!= ${SETSENV} ${HOST_SH} ${.CURDIR}/makeflist -l ${MAKEFLIST_FLAGS}
     24  1.33       jmc .endif
     25  1.33       jmc 
     26  1.30      tron print_have_gcc3:
     27  1.30      tron 	@echo ${HAVE_GCC3}
     28   1.6     lukem 
     29   1.3   thorpej print_machine: .PHONY
     30   1.3   thorpej 	@echo ${MACHINE}
     31   1.3   thorpej 
     32   1.3   thorpej print_machine_arch: .PHONY
     33   1.3   thorpej 	@echo ${MACHINE_ARCH}
     34   1.3   thorpej 
     35   1.3   thorpej print_machine_cpu: .PHONY
     36   1.3   thorpej 	@echo ${MACHINE_CPU}
     37   1.3   thorpej 
     38   1.3   thorpej print_object_fmt: .PHONY
     39   1.3   thorpej 	@echo ${OBJECT_FMT}
     40   1.3   thorpej 
     41  1.17     lukem print_toolchain_missing: .PHONY
     42  1.17     lukem 	@echo "${TOOLCHAIN_MISSING}"
     43  1.29       mrg 
     44  1.29       mrg print_use_tools_toolchain: .PHONY
     45  1.29       mrg 	@echo "${USE_TOOLS_TOOLCHAIN}"
     46   1.5      tron 
     47   1.5      tron print_x11_version: .PHONY
     48  1.40     lukem 	${HOST_SH} -c '. ${.CURDIR}/sets.subr; echo $$x11_version'
     49   1.3   thorpej 
     50   1.3   thorpej # This target has debugging value only, really.
     51   1.7     lukem makeflist: .PHONY check_DESTDIR
     52  1.40     lukem 	${SETSENV} ${HOST_SH} ${.CURDIR}/makeflist ${MAKEFLIST_FLAGS}
     53   1.3   thorpej 
     54   1.1   thorpej #
     55   1.1   thorpej # SET BUILDING TARGETS
     56   1.1   thorpej #
     57   1.1   thorpej 
     58  1.27     lukem .if ${MKUNPRIVED} == "no"
     59  1.27     lukem METALOG.unpriv=
     60  1.27     lukem .else
     61  1.27     lukem METALOG.unpriv=	-M ${METALOG}
     62  1.27     lukem .endif
     63  1.27     lukem 
     64   1.1   thorpej .PRECIOUS: checkflist
     65   1.7     lukem checkflist: check_DESTDIR
     66  1.40     lukem 	${SETSENV} ${HOST_SH} ${.CURDIR}/checkflist \
     67  1.40     lukem 	    ${MAKEFLIST_FLAGS} ${CHECKFLIST_FLAGS} ${METALOG.unpriv}
     68   1.4       mrg 
     69   1.7     lukem .PRECIOUS: checkflist-x11
     70   1.7     lukem checkflist-x11: check_DESTDIR
     71  1.32     lukem 	${SETSENV} ${HOST_SH} ${.CURDIR}/checkflist -x ${CHECKFLIST_FLAGS}
     72   1.1   thorpej 
     73   1.2   thorpej .PRECIOUS: maketars
     74  1.39       jmc maketars: check_DESTDIR check_RELEASEDIR .WAIT maketarsetup .WAIT ${MAKETARSETS:@.TARS.@do-${.TARS.}@}
     75  1.33       jmc 	@true
     76  1.33       jmc 
     77  1.33       jmc maketarsetup: .PHONY
     78  1.23     veego .if defined(DESTDIR) && ${DESTDIR} != ""
     79  1.32     lukem 	${MAKE} checkflist
     80  1.16     lukem .endif
     81  1.24     lukem 	mkdir -p ${RELEASEDIR}/${MACHINE}/binary/sets
     82  1.35       jmc 	for i in BSDSUM CKSUM MD5 SYSVSUM; do \
     83  1.39       jmc 		rm -f ${RELEASEDIR}/${MACHINE}/binary/sets/$$i ${RELEASEDIR}/${MACHINE}/binary/sets/$$i.tmp; done
     84  1.35       jmc 	
     85  1.33       jmc .for tar in ${MAKETARSETS}
     86  1.39       jmc do-${tar}: .PHONY
     87  1.25     lukem 	${SETSENV} ${HOST_SH} ${.CURDIR}/maketars -d ${DESTDIR:S,^$,/,} \
     88  1.27     lukem 	    ${METALOG.unpriv} -N ${NETBSDSRCDIR}/etc \
     89  1.33       jmc 	    -t ${RELEASEDIR}/${MACHINE}/binary/sets ${tar}
     90  1.33       jmc .endfor
     91   1.1   thorpej 
     92  1.25     lukem .PRECIOUS: makesrctars
     93  1.25     lukem makesrctars: check_RELEASEDIR
     94  1.25     lukem 	mkdir -p ${RELEASEDIR}/source/sets
     95  1.25     lukem 	${SETSENV} ${HOST_SH} ${.CURDIR}/makesrctars \
     96  1.25     lukem 	    ${NETBSDSRCDIR} ${RELEASEDIR}/source/sets
     97  1.25     lukem 
     98   1.2   thorpej .PRECIOUS: makesums
     99  1.33       jmc makesums: check_RELEASEDIR .WAIT ${MAKETARSETS:@.TARS.@do-sum-${.TARS.}@}
    100  1.35       jmc 	for i in BSDSUM CKSUM MD5 SYSVSUM; do \
    101  1.35       jmc 		mv ${RELEASEDIR}/${MACHINE}/binary/sets/$$i.tmp \
    102  1.35       jmc 			${RELEASEDIR}/${MACHINE}/binary/sets/$$i; done
    103  1.33       jmc 
    104  1.33       jmc .for tar in ${MAKETARSETS}
    105  1.39       jmc do-sum-${tar}: .PHONY do-${tar}
    106  1.33       jmc 	${SETSENV} ${MAKESUMS} -t ${RELEASEDIR}/${MACHINE}/binary/sets ${tar}.tgz
    107  1.35       jmc 	for i in BSDSUM CKSUM MD5 SYSVSUM; do \
    108  1.35       jmc 		${TOOL_CAT} ${RELEASEDIR}/${MACHINE}/binary/sets/$$i >> ${RELEASEDIR}/${MACHINE}/binary/sets/$$i.tmp; \
    109  1.35       jmc 	done
    110  1.33       jmc .endfor
    111  1.37       jmc .ORDER: ${MAKETARSETS:@.TARS.@do-sum-${.TARS.}@}
    112  1.18     lukem 
    113  1.18     lukem .PRECIOUS: installsets
    114  1.18     lukem installsets: check_DESTDIR
    115  1.18     lukem .if !defined(INSTALLDIR)
    116  1.18     lukem 	@echo "setenv INSTALLDIR before doing that!"
    117  1.18     lukem 	@false
    118  1.18     lukem .endif
    119  1.25     lukem 	${SETSENV} ${HOST_SH} ${.CURDIR}/maketars -d ${DESTDIR:S,^$,/,} \
    120  1.27     lukem 	    ${METALOG.unpriv} -N ${NETBSDSRCDIR}/etc \
    121  1.20     lukem 	    -i ${INSTALLDIR} ${INSTALLSETS}
    122   1.1   thorpej 
    123   1.1   thorpej #
    124   1.1   thorpej # MAIN ENTRY POINTS
    125   1.1   thorpej #
    126   1.1   thorpej 
    127  1.14  sommerfe sets: maketars .WAIT makesums
    128  1.25     lukem 	@true
    129  1.25     lukem 
    130  1.25     lukem sourcesets: makesrctars
    131   1.1   thorpej 	@true
    132   1.8     lukem 
    133   1.8     lukem .include <bsd.sys.mk>
    134