Home | History | Annotate | Line # | Download | only in rz25dist
Makefile revision 1.8
      1 #	$NetBSD: Makefile,v 1.8 1995/10/14 01:43:24 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' | pax -w -d | gzip -9) > $@
     65 
     66 etc.tar.gz: mount-fs build-fs
     67 	/bin/rm -f $@
     68 	(cd ${DESTDIR} ; find ./etc | pax -w -d | gzip -9) > $@
     69 
     70 x11.tar.gz: mount-fs build-fs
     71 	/bin/rm -f $@
     72 	(cd ${DESTDIR} ; find ./usr/X11R6 | pax -w -d | gzip -9) > $@
     73 
     74 .endif
     75 
     76 _SUBDIRUSE:
     77 
     78 # clean dependencies in case somebody decides to shortcut the build.
     79 clean:
     80 	/bin/rm -f ${TARGETS}
     81 	/bin/rm -f mount-fs build-fs unmount-fs
     82 
     83 .include <bsd.own.mk>
     84 .include <bsd.obj.mk>
     85