| 302 | |
| 303 | == Testing Port Phases == |
| 304 | |
| 305 | Individual port phases (extract, patch, configure, build, etc.) can be run by using the appropriate keyword: |
| 306 | {{{ |
| 307 | port build python26 |
| 308 | }}} |
| 309 | All phases that have not already been performed up to the designated phase will be run. If you want to rerun a port command that completed successfully, you can edit ./work/.macports.[port name].state and remove the lines up to the completed stage you want to keep. |
| 310 | |
| 311 | By default, if the portfile is changed, you will get the message: |
| 312 | {{{ |
| 313 | Portfile changed since last build; discarding previous state. |
| 314 | }}} |
| 315 | and the build directory will be removed (cleaned) before proceeding. When debugging a portfile, this can be avoided by using the '-o' flag (from the manpage): |
| 316 | {{{ |
| 317 | -o honor state files older than Portfile |
| 318 | }}} |