Home | History | Annotate | Line # | Download | only in sets
Makefile revision 1.41
      1  1.41    lukem #	$NetBSD: Makefile,v 1.41 2004/01/29 08:34:21 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.41    lukem print_have_gcc3: .PHONY
     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.41    lukem checkflist: .PRECIOUS .PHONY check_DESTDIR
     65  1.40    lukem 	${SETSENV} ${HOST_SH} ${.CURDIR}/checkflist \
     66  1.40    lukem 	    ${MAKEFLIST_FLAGS} ${CHECKFLIST_FLAGS} ${METALOG.unpriv}
     67   1.4      mrg 
     68  1.41    lukem checkflist-x11: .PHONY check_DESTDIR
     69  1.32    lukem 	${SETSENV} ${HOST_SH} ${.CURDIR}/checkflist -x ${CHECKFLIST_FLAGS}
     70   1.1  thorpej 
     71  1.41    lukem maketars: .PRECIOUS .PHONY check_DESTDIR check_RELEASEDIR .WAIT \
     72  1.41    lukem 		maketarsetup .WAIT ${MAKETARSETS:@.TARS.@do-${.TARS.}@}
     73  1.33      jmc 	@true
     74  1.33      jmc 
     75  1.33      jmc maketarsetup: .PHONY
     76  1.23    veego .if defined(DESTDIR) && ${DESTDIR} != ""
     77  1.32    lukem 	${MAKE} checkflist
     78  1.16    lukem .endif
     79  1.24    lukem 	mkdir -p ${RELEASEDIR}/${MACHINE}/binary/sets
     80  1.35      jmc 	for i in BSDSUM CKSUM MD5 SYSVSUM; do \
     81  1.39      jmc 		rm -f ${RELEASEDIR}/${MACHINE}/binary/sets/$$i ${RELEASEDIR}/${MACHINE}/binary/sets/$$i.tmp; done
     82  1.35      jmc 	
     83  1.33      jmc .for tar in ${MAKETARSETS}
     84  1.39      jmc do-${tar}: .PHONY
     85  1.25    lukem 	${SETSENV} ${HOST_SH} ${.CURDIR}/maketars -d ${DESTDIR:S,^$,/,} \
     86  1.27    lukem 	    ${METALOG.unpriv} -N ${NETBSDSRCDIR}/etc \
     87  1.33      jmc 	    -t ${RELEASEDIR}/${MACHINE}/binary/sets ${tar}
     88  1.33      jmc .endfor
     89   1.1  thorpej 
     90  1.41    lukem makesrctars: .PRECIOUS .PHONY check_RELEASEDIR
     91  1.25    lukem 	mkdir -p ${RELEASEDIR}/source/sets
     92  1.25    lukem 	${SETSENV} ${HOST_SH} ${.CURDIR}/makesrctars \
     93  1.25    lukem 	    ${NETBSDSRCDIR} ${RELEASEDIR}/source/sets
     94  1.25    lukem 
     95  1.41    lukem makesums: .PRECIOUS .PHONY check_RELEASEDIR .WAIT \
     96  1.41    lukem 		${MAKETARSETS:@.TARS.@do-sum-${.TARS.}@}
     97  1.35      jmc 	for i in BSDSUM CKSUM MD5 SYSVSUM; do \
     98  1.35      jmc 		mv ${RELEASEDIR}/${MACHINE}/binary/sets/$$i.tmp \
     99  1.35      jmc 			${RELEASEDIR}/${MACHINE}/binary/sets/$$i; done
    100  1.33      jmc 
    101  1.33      jmc .for tar in ${MAKETARSETS}
    102  1.39      jmc do-sum-${tar}: .PHONY do-${tar}
    103  1.41    lukem 	${SETSENV} ${MAKESUMS} \
    104  1.41    lukem 	    -t ${RELEASEDIR}/${MACHINE}/binary/sets ${tar}.tgz
    105  1.35      jmc 	for i in BSDSUM CKSUM MD5 SYSVSUM; do \
    106  1.41    lukem 		${TOOL_CAT} ${RELEASEDIR}/${MACHINE}/binary/sets/$$i \
    107  1.41    lukem 		    >> ${RELEASEDIR}/${MACHINE}/binary/sets/$$i.tmp; \
    108  1.35      jmc 	done
    109  1.33      jmc .endfor
    110  1.37      jmc .ORDER: ${MAKETARSETS:@.TARS.@do-sum-${.TARS.}@}
    111  1.18    lukem 
    112  1.41    lukem installsets: .PHONY check_DESTDIR
    113  1.18    lukem .if !defined(INSTALLDIR)
    114  1.18    lukem 	@echo "setenv INSTALLDIR before doing that!"
    115  1.18    lukem 	@false
    116  1.18    lukem .endif
    117  1.25    lukem 	${SETSENV} ${HOST_SH} ${.CURDIR}/maketars -d ${DESTDIR:S,^$,/,} \
    118  1.41    lukem 	    ${METALOG.unpriv} -N ${NETBSDSRCDIR}/etc ${MAKEFLIST_FLAGS} \
    119  1.20    lukem 	    -i ${INSTALLDIR} ${INSTALLSETS}
    120   1.1  thorpej 
    121   1.1  thorpej #
    122   1.1  thorpej # MAIN ENTRY POINTS
    123   1.1  thorpej #
    124   1.1  thorpej 
    125  1.41    lukem sets: .PHONY maketars .WAIT makesums
    126  1.25    lukem 	@true
    127  1.25    lukem 
    128  1.41    lukem sourcesets: .PHONY makesrctars
    129   1.1  thorpej 	@true
    130   1.8    lukem 
    131   1.8    lukem .include <bsd.sys.mk>
    132