> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/port/di-8-zhang-gao-ji-pkgplist-shi-jian/8.4.-dong-tai-yu-jing-tai-ruan-jian-bao-lie-biao.md).

# 8.4.动态与静态软件包列表

静态软件包列表是指在 Ports Collection 中可用的软件包列表，可以是 **pkg-plist**（无论是否使用变量替换）或通过 `PLIST_FILES` 和 `PLIST_DIRS` 嵌入在 **Makefile** 中。即使内容是在提交者将其加入 Ports Collection 之前，通过工具或 Makefile 中的目标自动生成的（例如，使用 `make makeplist`），它仍然被视为静态列表，因为在不下载或编译源文件的情况下，可以检查其内容。

动态软件包列表是指在编译 Port 时根据安装的文件和目录生成的软件包列表。在下载和编译源代码之前，或在运行 `make clean` 之后，都无法检查它。

尽管使用动态软件包列表并不被禁止，但维护者应尽可能使用静态软件包列表，因为这样可以使用户通过 [grep(1)](https://man.freebsd.org/cgi/man.cgi?query=grep\&sektion=1\&format=html) 查询现有 Port，从而发现例如哪些 Port 安装了某个特定的文件。动态软件包列表主要应当用于复杂的 Port（其软件包列表会根据 Port 的可选特性发生重大变化，因此维护静态软件包列表不可行），或软件包列表会根据所使用的依赖软件版本发生变化的 Port。例如，生成 Javadoc 文档的 Port。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/port/di-8-zhang-gao-ji-pkgplist-shi-jian/8.4.-dong-tai-yu-jing-tai-ruan-jian-bao-lie-biao.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
