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

静态包列表是指在 Ports 中可用的包列表，可以是 **pkg-plist**（无论是否使用变量替换）或通过 `PLIST_FILES` 和 `PLIST_DIRS` 嵌入在 **Makefile** 中。即使内容是通过工具或 Makefile 中的目标在加入 Ports 集合之前自动生成的（例如，使用 `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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
