File:  [NetBSD Developer Wiki] / wikisrc / pkgsrc / targets.mdwn
Revision 1.1: download - view: text, annotated - select for diffs
Sat Dec 11 18:30:52 2010 UTC (12 years, 11 months ago) by asau
Branches: MAIN
CVS tags: HEAD
Add pkgsrc targets cheat-sheet.

# pkgsrc targets

It was proposed that we document _all_ pkgsrc targets,
but this is unreasonable and useless.
Most targets are ancilliary ones,
they exist because that's how make(1) works,
only few of them are useful for regular work.

The following targets may be useful to invoke from keyboard:
* "extract" to look at unmodified source
* "patch" to look at initial source
* "configure" to stop after configure stage
* "all" or "build" to stop after build stage
* "stage-install" to install under stage directory
* "test" to run package's self-tests, if any exist and supported
* "package" to create binary package before installing it
* "replace" to change (upgrade, downgrade, or just replace) installed package in-place
* "deinstall" to deinstall previous package
* "package-install" to install package and build binary package
* "install" to install package

For example, package updating looks like this:
rm -f distinfo && su root -c "make makesum clean" && make makepatchsum
make clean && make stage-install # build
# modify patches
make makepatchsum # and build again, or
make makepatchsum && make clean && make patch # until all patches apply, if they failed at first
make print-PLIST | diff -u PLIST -
# modify PLIST
rm $(make show-var VARNAME=WRKDIR)/.PLIST* # this deserves to be another target
make stage-install
# modify PLIST again or build again
make test # just to check for regressions
su root -c "make package deinstall bin-install" # or
su root -c "make package replace"

CVSweb for NetBSD wikisrc <> software: FreeBSD-CVSweb