[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / src

Diff for /src/Makefile between version 1.19 and 1.131

version 1.19, 1997/07/29 03:37:03 version 1.131, 2016/11/19 14:20:58
Line 1 
Line 1 
 #       $OpenBSD$  #       $OpenBSD$
 #       $NetBSD: Makefile,v 1.25 1995/10/09 02:11:28 thorpej Exp $  
   
 #  #
 # For more information on building in tricky environments, please see  # For more information on building in tricky environments, please see
 # the list of possible environment variables described in  # the list of possible environment variables described in
 # /usr/share/mk/bsd.README.  # /usr/share/mk/bsd.README.
 #  #
 # Building recommendations:  # Building recommendations:
 #  #
 # 1) If at all possible, put this source tree in /usr/src.  If /usr/src  # 1) If at all possible, put this source tree in /usr/src.  If /usr/src
 # must be a symbolic link, setenv BSDSRCDIR to point to the real location.  # must be a symbolic link, set BSDSRCDIR in the environment to point to
   # the real location.
 #  #
 # 2) It is also recommended that you compile with objects outside the  # 2) It is also recommended that you compile with objects outside the
 # source tree. To do this, ensure /usr/obj exists or points to some  # source tree. To do this, ensure /usr/obj exists or points to some
Line 18 
Line 18 
 # well as populate the /usr/obj properly with directories for the  # well as populate the /usr/obj properly with directories for the
 # objects.  # objects.
 #  #
 # 3) If you are reasonably sure that things will compile OK, use the  # 3) It is strongly recommended that you build and install a new kernel
   # before rebuilding your system. Some of the new programs may use new
   # functionality or depend on API changes that your old kernel doesn't have.
   #
   # 4) If you are reasonably sure that things will compile OK, use the
 # "make build" target supplied here. Good luck.  # "make build" target supplied here. Good luck.
   #
   # 5) If you want to setup a cross-build environment, there is a "cross-gcc"
   # target available which upon completion of:
   #       "make -f Makefile.cross TARGET=<target> cross-gcc"
   # (where <target> is one of the names in the /sys/arch directory) will produce
   # a set of compilation tools along with the includes in the /usr/cross/<target>
   # directory. The "cross-distrib" target will build cross-tools as well as
   # binaries for a given <target>.
   #
   
 .include <bsd.own.mk>   # for NOMAN, if it's there.  .include <bsd.own.mk>   # for NOMAN, if it's there.
   
 SUBDIR+= lib include bin libexec sbin usr.bin usr.sbin share games  SUBDIR+= lib include bin libexec sbin usr.bin usr.sbin share games
 SUBDIR+= gnu  SUBDIR+= gnu
   
 SUBDIR+= sys lkm  SUBDIR+= sys
   
 .if (${KERBEROS} == "yes")  .if   make(clean) || make(cleandir) || make(obj)
 SUBDIR+= kerberosIV  SUBDIR+= etc distrib regress
 .endif  .endif
   
 .if exists(regress)  
 .ifmake !(install)  
 SUBDIR+= regress  
 .endif  
   
 regression-tests:  regression-tests:
         @echo Running regression tests...          @echo Running regression tests...
         @(cd ${.CURDIR}/regress && ${MAKE} regress)          @cd ${.CURDIR}/regress && ${MAKE} depend && exec ${MAKE} regress
 .endif  
   
 includes:  includes:
         (cd ${.CURDIR}/include; ${MAKE} includes)          cd ${.CURDIR}/include && \
                   su ${BUILDUSER} -c 'exec ${MAKE} prereq' && \
                   exec ${MAKE} includes
   
 beforeinstall:  beforeinstall:
 .ifndef DESTDIR          cd ${.CURDIR}/etc && exec ${MAKE} DESTDIR=${DESTDIR} distrib-dirs
         (cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs)          cd ${.CURDIR}/etc && exec ${MAKE} DESTDIR=${DESTDIR} install-mtree
 .else          cd ${.CURDIR}/include && exec ${MAKE} includes
         (cd ${.CURDIR}/etc && ${MAKE} distrib-dirs)  
 .endif  
         (cd ${.CURDIR}/include; ${MAKE} includes)  
   
 afterinstall:  afterinstall:
 .ifndef NOMAN  .ifndef NOMAN
         (cd ${.CURDIR}/share/man && ${MAKE} makedb)          cd ${.CURDIR}/share/man && exec ${MAKE} makedb
           cd ${.CURDIR}/distrib/sets && exec ${MAKE} makedb
 .endif  .endif
   
   .ifdef DESTDIR
 build:  build:
           @echo cannot build with DESTDIR set
           @false
   .else
   build:
           umask ${WOBJUMASK}; exec ${MAKE} do-build
   
   do-build:
 .ifdef GLOBAL_AUTOCONF_CACHE  .ifdef GLOBAL_AUTOCONF_CACHE
         rm -f $GLOBAL_AUTOCONF_CACHE          cp /dev/null ${GLOBAL_AUTOCONF_CACHE}
 .endif  .endif
         (cd ${.CURDIR}/share/mk && ${MAKE} install)          @if [[ `id -u` -ne 0 ]]; then \
         (cd ${.CURDIR}/include; ${MAKE} includes)                  echo $@ must be called by root >&2; \
         ${MAKE} cleandir                  false; \
         (cd ${.CURDIR}/lib && ${MAKE} depend && ${MAKE} && ${MAKE} install)          fi
         (cd ${.CURDIR}/gnu/lib && ${MAKE} depend && ${MAKE} && ${MAKE} install)          cd ${.CURDIR}/share/mk && exec ${MAKE} install
 .if (${MACHINE_ARCH} == "mips")          exec ${MAKE} cleandir
         ldconfig          exec ${MAKE} includes
           cd ${.CURDIR}/lib && \
               su ${BUILDUSER} -c '${MAKE} depend && exec ${MAKE}' && \
               NOMAN=1 exec ${MAKE} install
           cd ${.CURDIR}/gnu/lib && \
               su ${BUILDUSER} -c '${MAKE} depend && exec ${MAKE}' && \
               NOMAN=1 exec ${MAKE} install
           su ${BUILDUSER} -c '${MAKE} depend && exec ${MAKE}' && \
               exec ${MAKE} install
           /bin/sh ${.CURDIR}/distrib/sets/makeetcset ${.CURDIR} ${MAKE}
 .endif  .endif
 .if (${KERBEROS} == "yes")  
         (cd ${.CURDIR}/kerberosIV && ${MAKE} build)  
 .endif  
         ${MAKE} depend && ${MAKE} && ${MAKE} install  
   
   CROSS_TARGETS=cross-env cross-dirs cross-obj cross-includes cross-binutils \
           cross-gcc cross-tools cross-lib cross-bin cross-etc-root-var \
           cross-depend cross-clean cross-cleandir
   
 .if !defined(TARGET)  .if !defined(TARGET)
 cross-tools:  ${CROSS_TARGETS}:
         echo "TARGET must be set"; exit 1          @echo "TARGET must be set for $@"; exit 1
 .else  .else
 cross-tools:    cross-helpers cross-includes cross-binutils cross-gcc  . include "Makefile.cross"
   .endif # defined(TARGET)
   
 CROSSDIR=       ${DESTDIR}/usr/cross/${TARGET}  .PHONY: ${CROSS_TARGETS} \
           build regression-tests includes beforeinstall afterinstall \
 cross-helpers:          all depend
         -mkdir -p ${CROSSDIR}/usr/include  
         echo _MACHINE_ARCH | \  
             cat ${.CURDIR}/sys/arch/${TARGET}/include/param.h - | \  
             ${CPP} -E |sed -n '$$p' >${CROSSDIR}/TARGET_ARCH  
         eval `grep '^osr=' sys/conf/newvers.sh`; \  
            sed "s/\$$/-unknown-openbsd$$osr/" ${CROSSDIR}/TARGET_ARCH > \  
            ${CROSSDIR}/TARGET_CANON  
   
 cross-includes:  
         ${MAKE} MACHINE=${TARGET} MACHINE_ARCH=`cat ${CROSSDIR}/TARGET_ARCH` \  
             DESTDIR=${CROSSDIR} includes  
   
 cross-binutils:  
         -mkdir -p ${CROSSDIR}/usr/obj  
         export BSDSRCDIR=`pwd`; \  
             (cd ${.CURDIR}/gnu/usr.bin/binutils; \  
             BSDOBJDIR=${CROSSDIR}/usr/obj \  
             MAKEOBJDIR=obj.${MACHINE}.${TARGET} \  
             ${MAKE} -f Makefile.bsd-wrapper obj); \  
             (cd ${CROSSDIR}/usr/obj/gnu/usr.bin/binutils; \  
             ${BSDSRCDIR}/gnu/usr.bin/binutils/configure \  
             --prefix ${CROSSDIR}/usr \  
             --target `cat ${CROSSDIR}/TARGET_CANON` && \  
             ${MAKE} && ${MAKE} install)  
         ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 755 \  
             ${.CURDIR}/usr.bin/lorder/lorder.sh.gnm \  
             ${CROSSDIR}/usr/bin/`cat ${CROSSDIR}/TARGET_CANON`-lorder  
   
 cross-gcc:  
         -mkdir -p ${CROSSDIR}/usr/obj  
         (cd gnu/usr.bin/gcc; \  
             BSDOBJDIR=${CROSSDIR}/usr/obj BSDSRCDIR=${.CURDIR} \  
             MAKEOBJDIR=obj.${MACHINE}.${TARGET} \  
             ${MAKE} -f Makefile.bsd-wrapper obj)  
         (cd ${CROSSDIR}/usr/obj/gnu/usr.bin/gcc; \  
             ${.CURDIR}/gnu/usr.bin/gcc/configure \  
             --prefix ${CROSSDIR}/usr \  
             --target `cat ${CROSSDIR}/TARGET_CANON` && \  
             ${MAKE} BISON=yacc LANGUAGES=c \  
             GCC_FOR_TARGET="./xgcc -B./ -I${CROSSDIR}/usr/include" && \  
             ${MAKE} LANGUAGES=c install)  
 .endif  
   
 .include <bsd.subdir.mk>  .include <bsd.subdir.mk>

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.131