View Single Post
  #1   (View Single Post)  
Old 12th June 2019
brudan brudan is offline
Fdisk Soldier
Join Date: Dec 2018
Posts: 82
Default how to recompile only changed part of port

I'm making some tweaks to a port (Xfe file manager) and would like to know if it is possible, after building the package, to make additional tweaks to the source code, recompile only the changed files, and remake the package to include the changes?

Here is my workflow so far:

1. Install Xfe's build dependencies:
# doas pkg_add intltool gmake

2. Get source code and apply the porter's patches:
$ cd /usr/ports/x11/xfe; make patch

3. Do some hacking on the source code by manually editing some files:
$ cd /usr/ports/pobj/xfe-*/xfe-*
hack, hack, hack

4. Build the tweaked package:
$ cd /usr/ports/x11/xfe; make package
Say I need to repeat step 3 to add an additional tweak. If I then try...
$ cd /usr/ports/x11/xfe; make repackage
...the package is remade but nothing is recompiled, so my additional tweak gets ignored.

If, on the other hand, I do this...
$ cd /usr/ports/x11/xfe; make clean; make repackage
...then the whole port is recompiled from scratch, which seems like overkill if, for example, I only tweaked one line in one source code file.

So hence my question: Is it possible to repackage after recompiling only those source code files that I've edited since last building the package?

Last edited by brudan; 12th June 2019 at 06:45 PM.
Reply With Quote