Will `make clean` clean the dependencies?

Will `make clean` clean the dependencies, which is not dependent by others?

Just now I tried to install gnome2-lite using port:
firstly I run `make`, error occurs,
I ignored the error and run `make install`, it seems working - downloading, compiling, linking, but after several hours, error occurs, I don't know how to fix it
(need an automatic way :) ), so I want to rollback it, does `make clean` help here?
BTW, I found disk usage grows when `make clean` is done.
Thanks in advance.
 
# make clean should catch the dependencies, however the simplest and most straight-forward way of removing the build directories is # rm -r /usr/ports/*/*/work (or, if you have [red]WRKDIRPREFIX=[/red] set, the relative equivalent under that).

If old or mis-set options are causing trouble, # make rmconfig in the relevant port directory, or (assuming that's not catching what you want) you can remove directories under /var/db/ports/.
 
jronald said:
Will `make clean` clean the dependencies, which is not dependent by others?

Just now I tried to install gnome2-lite using port:
firstly I run `make`, error occurs,
I ignored the error and run `make install`, it seems working - downloading, compiling, linking, but after several hours, error occurs, I don't know how to fix it
(need an automatic way :) ), so I want to rollback it, does `make clean` help here?
BTW, I found disk usage grows when `make clean` is done.
Thanks in advance.

I think what you're looking for is # make clean-depends. # make clean, as fronclynne mentioned earlier, is similar to # rm -r /usr/ports/*/*/work.


Code:
# clean                 - Remove ${WRKDIR} and other temporary files used for building.
# clean-depends - Do a "make clean" for all dependencies.


You could refer for more make options in /usr/ports/Mk/bsd.port.mk.
 
fronclynne said:
# make clean should catch the dependencies,

No, it won't. make clean only cleans the work directory for the current port.
# make clean-recursive will clean out the work directory for the current port, and the work directories for all dependencies of the current port.

# rm -rf /usr/ports/*/*/work will clear out all the work directories for all ports. As will using # portsclean -CDD, which is part of the portupgrade suite of tools.
 
phoenix said:
No, it won't. make clean only cleans the work directory for the current port.
# make clean-recursive will clean out the work directory for the current port, and the work directories for all dependencies of the current port.

# rm -rf /usr/ports/*/*/work will clear out all the work directories for all ports. As will using # portsclean -CDD, which is part of the portupgrade suite of tools.

find /usr/ports -name work -mindepth 2 -maxdepth 3 | xargs rm -Rf

would be a safer bet -- especially because the globbing could go over the shell argument character limit.
 
More safer: -type d = directory

Code:
find /usr/ports -type d -name work -mindepth 2 -maxdepth 3 | xargs rm -Rf
 
Back
Top