# make "all-depends-list" vs. combined "build-depends-list" and "run-depends-list"



## rwv37 (Nov 23, 2022)

I'm not sure that I understand these commands.

From only a glance at their names, my first thought was that `make all-depends-list | sort` would probably give output equivalent to `(make build-depends-list; make run-depends-list) | sort | uniq`. But a lot more things show up in `all-depends-list` than in the combination of `build-depends-list` and `run-depends-list`.

So then I thought, well, maybe `all-depends-list` calculates recursively, while the other two do not. But `man ports` says:

```
run-depends-list, build-depends-list
                          Print a list of all the compile and run
                          dependencies, and dependencies of those
                          dependencies, by port directory.

     all-depends-list     Print a list of all dependencies for the port.
```
To me, that seems to be saying that `run-depends-list` and `build-depends-list` _are_ calculating recursively, while `all-depends-list` may or may not be.

Am I misunderstanding `man ports`? Or is `man ports` wrong about this? Or are there some sort of dependencies _other than_ run dependencies and build dependencies that I don't know about, and are included in `all-depends-list`? Or is there some other thing I'm not getting?


----------



## bob2112 (Nov 24, 2022)

IIRC all-depends-list is recursive, the other two are direct dependencies only.


----------



## PMc (Nov 26, 2022)

rwv37 said:


> I'm not sure that I understand these commands.
> 
> From only a glance at their names, my first thought was that `make all-depends-list | sort` would probably give output equivalent to `(make build-depends-list; make run-depends-list) | sort | uniq`. But a lot more things show up in `all-depends-list` than in the combination of `build-depends-list` and `run-depends-list`.


There is also lib-depends, and a few other.

To get the raw depends out of the Makefile, without recursion, you can use something like

```
for i in PKG EXTRACT PATCH FETCH BUILD LIB RUN TEST; do
  make -V ${i}_DEPENDS
done
```


----------

