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