Home | History | Annotate | Line # | Download | only in rz25dist
Makefile revision 1.9
      1 #	$NetBSD: Makefile,v 1.9 1995/10/16 04:55:44 cgd Exp $
      2 
      3 # Make a distribution for the alpha, on a spare disk.
      4 # This creates a large, gzipped disk image in ${.OBJDIR}
      5 
      6 TARGETS=	bin.tar.gz etc.tar.gz x11.tar.gz rz25-image.gz
      7 
      8 .if !defined(DESTDIR) || !defined(DESTDISK)
      9 all:
     10 	@echo both 'DESTDIR' and 'DESTDISK' must be defined.
     11 	@false
     12 .else
     13 
     14 SECPERCYL=	558
     15 CYLS=		1476
     16 
     17 all: ${TARGETS}
     18 
     19 mount-fs:
     20 	disklabel -W ${DESTDISK}
     21 	-dd if=/dev/zero of=/dev/r${DESTDISK}c bs=`expr ${SECPERCYL} \* 512` \
     22 	    count=${CYLS}
     23 	disklabel -w -r -B -b /usr/mdec/sdboot -s /usr/mdec/bootsd \
     24 	    ${DESTDISK} rz25
     25 	disklabel -W ${DESTDISK}
     26 	newfs -O /dev/r${DESTDISK}a
     27 	newfs -O /dev/r${DESTDISK}d
     28 	mount /dev/${DESTDISK}a ${DESTDIR}
     29 	mkdir ${DESTDIR}/usr
     30 	mount /dev/${DESTDISK}d ${DESTDIR}/usr
     31 
     32 build-fs:
     33 	cd ${.CURDIR}/../../../etc && make distribution
     34 	cd ${.CURDIR}/../../../cygnus && \
     35 	    make prefix=${DESTDIR}/usr/local install
     36 	cd ${.CURDIR}/../../../xc && make install install.man
     37 	cp ${.CURDIR}/../../../sys/arch/alpha/compile/GENERIC/netbsd ${DESTDIR}
     38 	ln -s gcc ${DESTDIR}/usr/local/bin/cc
     39 	ln -s \
     40 	../local/lib/gcc-lib/alpha-unknown-netbsd1.0A/2.7-95q4/cpp \
     41 	    ${DESTDIR}/usr/libexec
     42 	ln -s ../local/bin/ar ${DESTDIR}/usr/bin
     43 	ln -s ../local/bin/as ${DESTDIR}/usr/bin
     44 	ln -s ../local/bin/cc ${DESTDIR}/usr/bin
     45 	ln -s ../local/bin/gcc ${DESTDIR}/usr/bin
     46 	ln -s ../local/bin/ld ${DESTDIR}/usr/bin
     47 	ln -s ../local/bin/nm ${DESTDIR}/usr/bin
     48 	ln -s ../local/bin/ranlib ${DESTDIR}/usr/bin
     49 	ln -s ../local/bin/size ${DESTDIR}/usr/bin
     50 	ln -s ../local/bin/strip ${DESTDIR}/usr/bin
     51 	cp -p ${DESTDIR}/usr/mdec/boot ${DESTDIR}/
     52 
     53 unmount-fs:
     54 	umount ${DESTDIR}/usr ${DESTDIR}
     55 	fsck /dev/r${DESTDISK}a /dev/r${DESTDISK}d
     56 
     57 rz25-image.gz: mount-fs build-fs unmount-fs
     58 	/bin/rm -f $@
     59 	dd if=/dev/r${DESTDISK}c bs=`expr ${SECPERCYL} \* 512` \
     60 	    count=${CYLS} | gzip -9 > $@
     61 
     62 bin.tar.gz: mount-fs build-fs
     63 	/bin/rm -f $@
     64 	(cd ${DESTDIR} ; find . | grep -v '^./etc' | \
     65 	    grep -v '^./usr/X11R6' | grep -v '^./netbsd' | \
     66 	    pax -w -d | gzip -9) > $@
     67 
     68 etc.tar.gz: mount-fs build-fs
     69 	/bin/rm -f $@
     70 	(cd ${DESTDIR} ; find ./etc | pax -w -d | gzip -9) > $@
     71 
     72 x11.tar.gz: mount-fs build-fs
     73 	/bin/rm -f $@
     74 	(cd ${DESTDIR} ; find ./usr/X11R6 | pax -w -d | gzip -9) > $@
     75 
     76 .endif
     77 
     78 _SUBDIRUSE:
     79 
     80 # clean dependencies in case somebody decides to shortcut the build.
     81 clean:
     82 	/bin/rm -f ${TARGETS}
     83 	/bin/rm -f mount-fs build-fs unmount-fs
     84 
     85 .include <bsd.own.mk>
     86 .include <bsd.obj.mk>
     87