# @(#)Makefile 5.1.1.2 (Berkeley) 5/9/91
# $Id: Makefile,v 1.39 1994/02/05 08:33:14 rgrimes Exp $
# This is for people who want to have src/ports, src/local built
.if defined
(MAKE_LOCAL
) & exists
(local
) & exists
(local
/Makefile
)
.if defined
(MAKE_PORTS
) & exists
(ports
) & exists
(ports
/Makefile
)
# setenv NOCLEANDIR will prevent make cleandirs from being run
world
: directories cleandist mk includes libraries tools mdec
@echo
"--------------------------------------------------------------"
@echo
" Rebuilding ${DESTDIR} The whole thing"
@echo
"--------------------------------------------------------------"
cd
${.CURDIR
}/share
/man
; make makedb
cd
${.CURDIR
}/etc
; make distrib-dirs
@echo
"--------------------------------------------------------------"
@echo
" Cleaning up the source tree, and rebuilding the obj tree"
@echo
"--------------------------------------------------------------"
here
=`pwd`; dest
=/usr
/obj
`echo $$here | sed 's,^/usr/src,,'`; \
if
test -d
/usr
/obj
-a
! -d
$$dest; then \
cd
$$dest; rm -rf
${SUBDIR}
find .
-name obj | xargs
-n30
rm -rf
.if defined
(MAKE_LOCAL
) & exists
(local
) & exists
(local
/Makefile
)
# The cd is done as local may well be a symbolic link
-cd local
; find .
-name obj | xargs
-n30
rm -rf
.if defined
(MAKE_PORTS
) & exists
(ports
) & exists
(ports
/Makefile
)
# The cd is done as local may well be a symbolic link
-cd ports
; find .
-name obj | xargs
-n30
rm -rf
@echo
"--------------------------------------------------------------"
@echo
" Rebuilding ${DESTDIR}/usr/share/mk"
@echo
"--------------------------------------------------------------"
# DONT DO THIS!! rm -rf ${DESTDIR}/usr/share/mk
# DONT DO THIS!! mkdir ${DESTDIR}/usr/share/mk
# DONT DO THIS!! chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/share/mk
# DONT DO THIS!! chmod 755 ${DESTDIR}/usr/share/mk
cd
${.CURDIR
}/share
/mk
; make
install;
@echo
"--------------------------------------------------------------"
@echo
" Rebuilding ${DESTDIR}/usr/include"
@echo
"--------------------------------------------------------------"
rm -rf
${DESTDIR}/usr
/include
mkdir
${DESTDIR}/usr
/include
chown
${BINOWN}.
${BINGRP} ${DESTDIR}/usr
/include
chmod
755 ${DESTDIR}/usr
/include
cd
${.CURDIR
}/include; make
install
cd
${.CURDIR
}/gnu
/usr.bin
/cc/libobjc
; make beforeinstall
cd
${.CURDIR
}/gnu
/lib
/libg
++; make beforeinstall
cd
${.CURDIR
}/lib
/libcurses
; make beforeinstall
cd
${.CURDIR
}/lib
/libc
; make beforeinstall
# You MUST run this the first time you get the new sources to boot strap
# the shared library tools onto you system. This target should only
# need to be run once on a system.
bootstrapld
: directories cleandist mk includes
@echo
"--------------------------------------------------------------"
@echo
" Building new shlib compiler tools"
@echo
"--------------------------------------------------------------"
# These tools need to be built very early due to a.out.h changes:
# It is possible that ar is needed
cd
${.CURDIR
}/usr.bin
/mkdep
; make
-DNOPIC depend
all install ${CLEANDIR} obj
cd
${.CURDIR
}/usr.bin
/nm
; make
-DNOPIC depend
all install ${CLEANDIR} obj
cd
${.CURDIR
}/usr.bin
/ranlib
; make
-DNOPIC depend
all install ${CLEANDIR} obj
cd
${.CURDIR
}/usr.bin
/strip; make
-DNOPIC depend
all install ${CLEANDIR} obj
cd
${.CURDIR
}/gnu
/usr.bin
/ld; make
-DNOPIC depend
all install ${CLEANDIR} obj
cd
${.CURDIR
}/gnu
/usr.bin
/as; make depend
all install ${CLEANDIR} obj
cd
${.CURDIR
}/gnu
/usr.bin
/cc; make
-DNOPIC depend
all install ${CLEANDIR} obj
cd
${.CURDIR
}/gnu
/usr.bin
/cc/libgcc
; make
all install ${CLEANDIR} obj
cd
${.CURDIR
}/lib
/csu.i386
; make depend
all install ${CLEANDIR} obj
cd
${.CURDIR
}/lib
/libc
; make depend
all install ${CLEANDIR} obj
cd
${.CURDIR
}/gnu
/usr.bin
/ld/rtld
; make depend
all install ${CLEANDIR} obj
# setenv NOPROFILE if you do not want profiled libraries
@echo
"--------------------------------------------------------------"
@echo
" Rebuilding ${DESTDIR}/usr/lib"
@echo
"--------------------------------------------------------------"
find
${DESTDIR}/usr
/lib \
! -name
'*.s[ao].*' -a \
! -type d | xargs
-n30
rm -rf
cd
${.CURDIR
}/lib
; make depend
all install ${CLEANDIR} obj
cd
${.CURDIR
}/gnu
/usr.bin
/cc/libgcc
; make depend
all install ${CLEANDIR} obj
cd
${.CURDIR
}/gnu
/lib
/libg
++; make depend
all install ${CLEANDIR} obj
cd
${.CURDIR
}/gnu
/lib
/libregex
; make depend
all install ${CLEANDIR} obj
cd
${.CURDIR
}/gnu
/lib
/libmalloc
; make depend
all install ${CLEANDIR} obj
cd
${.CURDIR
}/usr.bin
/lex; make depend
all install ${CLEANDIR} obj
@echo
"--------------------------------------------------------------"
@echo
" Rebuilding ${DESTDIR} Compiler and Make"
@echo
"--------------------------------------------------------------"
cd
${.CURDIR
}/gnu
/usr.bin
/cc; make depend
all install ${CLEANDIR} obj
cd
${.CURDIR
}/usr.bin
/make
; make depend
all install ${CLEANDIR} obj
@echo
"--------------------------------------------------------------"
@echo
" Rebuilding ${DESTDIR}/usr/mdec"
@echo
"--------------------------------------------------------------"
cd
${.CURDIR
}/sys
/i386
/boot
; make depend
all install ${CLEANDIR}
cd
/usr
/mdec
; find . | cpio
-pdamuv
${DESTDIR}/usr
/mdec