[BACK]Return to UPDATING CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src

Annotation of src/UPDATING, Revision 1.1

1.1     ! abs         1: $NetBSD$
        !             2:
        !             3: This file is intended to be a brief introduction to the build
        !             4: process and a reference on what to do if something doesn't work.
        !             5:
        !             6: For a more detailed description see Makefile.
        !             7:
        !             8: Recent changes:
        !             9: ^^^^^^^^^^^^^^^
        !            10:
        !            11: 20000623:
        !            12:        MKCRYPTO and friends added to share/mk/bsd.own.mk.
        !            13:        'cd share/mk ; make install' needed before make build.
        !            14:
        !            15:
        !            16: Hints for a more successful build:
        !            17: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        !            18:     Use object directories:
        !            19:        This helps to keep stale object
        !            20:           files from polluting the build if a Makefile "forgets"
        !            21:           about one.  It also makes it easier to clean up after
        !            22:           a build.  It's also necessary if you want to use the
        !            23:           same source tree for multiple machines.
        !            24:           To use object directories:
        !            25:            a) cd /usr/src ; make cleandir
        !            26:            b) Add "OBJMACHINE=obj.<arch>" to /etc/mk.conf
        !            27:            c) cd /usr/src ; make obj
        !            28:            d) cd /usr/src ; make build
        !            29:     Build to a DESTDIR:
        !            30:        This helps to keep old
        !            31:           installed files (especially libraries) from interfering
        !            32:           with the new build.
        !            33:           To build to a DESTDIR, set the DESTDIR environment
        !            34:           variable before running make build.
        !            35:           Problems: you might need to update critical utilities
        !            36:                without using DESTDIR since nothing is executed
        !            37:                from what is installed in DESTDIR.
        !            38:                (See critical utils, below)
        !            39:     Build often:
        !            40:        This keeps critical utilities current enough to not choke
        !            41:        on any other part of the source tree that depends on up to
        !            42:        date functionality.
        !            43:
        !            44: What to do if things don't work:
        !            45: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        !            46: When things don't work there is usually a few things that commonly
        !            47: should be done.
        !            48:     1) make includes
        !            49:        This should be done automatically by make build.
        !            50:     2)  cd share/mk && make install
        !            51:        Again, automatically done by make build.
        !            52:
        !            53: Failsafe rebuild of a small part of the tree:
        !            54: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        !            55: To make sure you rebuild something correctly you want to do
        !            56: something like the following:
        !            57:     1)  Make sure the includes and .mk files are up to date.
        !            58:     2)  Make sure any program used to build the particular
        !            59:        utility is up to date.  (yacc, lex, etc...)
        !            60:     3)  cd ...path/to/util...
        !            61:        make cleandir
        !            62:        rm ...all obj directories...
        !            63:        make cleandir                   # yes, again
        !            64:        make obj
        !            65:        make depend && make
        !            66:
        !            67: Failsafe rebuild of the entire tree:
        !            68: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        !            69: If you really want to make sure the source tree is clean and
        !            70: ready for a build try the following:
        !            71:
        !            72: ---cut here---
        !            73: #!/bin/sh
        !            74: . /etc/mk.conf
        !            75:
        !            76: if [ -z $BSDSRCDIR ] ; then
        !            77:     BSDSRCDIR=/usr/src
        !            78: fi
        !            79: if [ \! -d $BSDSRCDIR ] ; then
        !            80:     echo Unable to find sources
        !            81:     exit 1
        !            82: fi
        !            83: find $BSDSRCDIR -name \*.o -o -name obj.\* -o -name obj -exec rm \{\} \;
        !            84:
        !            85: if [ -z $BSDOBJDIR ] ; then
        !            86:     BSDOBJDIR=/usr/obj
        !            87: fi
        !            88: if [ -d $BSDOBJDIR ] ; then
        !            89:     rm -rf $BSDOBJDIR
        !            90: fi
        !            91:
        !            92: cd $BSDSRCDIR && make cleandir
        !            93:
        !            94: ---cut here---
        !            95:
        !            96: Critical utilities:
        !            97: ^^^^^^^^^^^^^^^^^^^
        !            98:        gnu/usr.bin/egcs
        !            99:        usr.bin/make
        !           100:        usr.bin/yacc
        !           101:        usr.bin/lex
        !           102:        crypto-*/usr.bin/compile_et
        !           103:        crypto-*/usr.bin/make_cmds
        !           104:
        !           105: Other problems and possibly solutions:
        !           106: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        !           107: Symptom:Unreasonable compiler errors.
        !           108: Fix:   Rebuild gnu/usr.bin/egcs
        !           109:
        !           110: Symptom:Complaints involving a Makefile.
        !           111: Fix:   Make sure .mk files are up to date.
        !           112:        cd share/mk && make install
        !           113: Fix:   Rebuild usr.bin/make
        !           114:
        !           115: Symptom:
        !           116: Fix:   Rebuild usr.bin/yacc
        !           117:
        !           118: Symptom:
        !           119: Fix:   Rebuild usr.bin/lex
        !           120:
        !           121: Symptom:
        !           122: Fix:   rm /usr/lib/libbfd.a

CVSweb <webmaster@jp.NetBSD.org>