Annotation of wikisrc/pkgsrc/targets.mdwn, revision 1.12

1.1       asau        1: # pkgsrc targets
                      2: 
                      3: It was proposed that we document _all_ pkgsrc targets,
                      4: but this is unreasonable and useless.
1.6       asau        5: Most targets are ancilliary ones;
1.8       wiki        6: they exist because that's how [[!template id=man name=make section=1]] works.
1.7       asau        7: Only few of them are useful for regular work.
1.1       asau        8: 
                      9: The following targets may be useful to invoke from keyboard:
1.2       asau       10: 
1.9       wiki       11: * **depends** to build and install dependencies
                     12: * **fetch** to fetch distribution file(s)
                     13: * **checksum** to fetch and check distribution file(s)
                     14: * **extract** to look at unmodified source
                     15: * **patch** to look at initial source
                     16: * **configure** to stop after configure stage
                     17: * **all** or **build** to stop after build stage
                     18: * **stage-install** to install under stage directory
                     19: * **test** to run package's self-tests, if any exist and supported
                     20: * **package** to create binary package before installing it
                     21: * **replace** to change (upgrade, downgrade, or just replace) installed package in-place
                     22: * **deinstall** to deinstall previous package
                     23: * **package-install** to install package and build binary package
                     24: * **install** to install package
                     25: * **bin-install** to attempt to skip building from source and use pre-built binary package
1.12    ! wiki       26: * **show-depends** print dependencies for building
        !            27: * **show-options** print available options from options.mk
1.3       asau       28: 
1.4       asau       29: Cleanup targets (in separate section because of importance):
                     30: 
1.9       wiki       31: * **clean-depends** to remove work directories for dependencies
                     32: * **clean** to remove work directory
                     33: * **distclean** to remove distribution file(s)
                     34: * **package-clean** to remove binary package
1.4       asau       35: 
1.3       asau       36: The following targets are useful in development and thus may be useful for an advanced user:
                     37: 
1.9       wiki       38: * **makesum** to fetch and generate checksum for distributed file(s)
                     39: * **makepatchsum** to (re)generate checksum for patches
                     40: * **makedistinfo** to (re)generate *distinfo* file (creating checksums for distributed file and patches)
                     41: * **mps** short for **makepatchsum**
                     42: * **mdi** short for **makedistinfo**
                     43: * **print-PLIST** to _attempt_ to generate correct packaging list
1.5       asau       44: (NB! It helps, but it _doesn't_ eliminate manual work.)
1.1       asau       45: 
                     46: For example, package updating looks like this:
1.8       wiki       47: 
                     48: [[!template id=programlisting text="""
1.10      wiki       49: su root -c "make depends clean-depends clean" # to catch new dependencies
                     50: rm -f distinfo && su root -c "make makesum clean" && make makepatchsum
                     51: make clean && make stage-install # build
1.1       asau       52: # modify patches
1.10      wiki       53: make makepatchsum # and build again, or
                     54: make makepatchsum && make clean && make patch # until all patches apply, if they failed at first
                     55: make print-PLIST | diff -u PLIST -
1.1       asau       56: # modify PLIST
1.11      asau       57: make install-clean # to remove cached PLISTs and "installation done" marker
1.10      wiki       58: make stage-install
1.1       asau       59: # modify PLIST again or build again
1.10      wiki       60: make test # just to check for regressions
                     61: su root -c "make package deinstall bin-install" # or
                     62: su root -c "make package replace"
1.8       wiki       63: """]]

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb