Pointless rebuilding of ports

Norman Feske norman.feske at ...1...
Tue Jan 17 21:18:09 CET 2012


Hi Julian,

> if I do make run/noux_vim it will _always_ rebuild vim, regardless of
> whether this is useful. Is there a way to avoid this?

you are right - this is a bit annoying. The simplest solution is to
comment-out the following line in the 'noux_vim.run' script:

  lappend build_components noux-pkg/vim

It is on a separate line for a reason. .-)
If you want to execute the run script and also rebuild vim, simply do

  make noux-pkg/vim run/noux_vim

This will first re-build vim and then execute the run script (with the
commented-out line). But in the normal case (when working on the Noux or
on the Noux libc plugin, not the vim source), you can leave out the
'noux-pkg/vim' part.

Just a note regarding the rationale behind the current situation: The
alternative solution would have been to build the respective Noux
package only when it does not exist yet and skip it otherwise. However,
in this case, a rebuild would never occur except when deleting the
package manually from the build directory. The middle ground might be to
execute './configure' only once but 'make' each time when revisiting the
package. But in this case, dependencies from libports libraries would
not be handled correctly. For example, when the ncurses library changes,
we would expect vim to be relinked but this does not happen.

I figured that missing dependencies is worse than rebuilding the whole
package in the default case. When working on Noux, I always do the trick
mentioned above. But in this case, skipping the rebuild is a conscious
decision.

Another idea I had was to make the behavior of building noux packages
configurable via a build SPEC. E.g., by specifying the value
'phony_noux_pkg' to the SPECS build variable, the current policy could
be enabled. Otherwise, a no-rebuild policy could be in effect. But I
haven't made my mind yet whether I like this idea or not. The best would
be if 'noux.mk' always did the right thing. But how?

If you like, you can experiment with the different approaches. All the
magic happens within 'ports/mk/noux.mk'.

Cheers
Norman




More information about the users mailing list