# 5.1.原始来源

配置 **Makefile** 非常简单，再次建议在开始之前查看现有的示例。此外，本手册中有个 [示例 Makefile](https://docs.freebsd.org/en/books/porters-handbook/porting-samplem/#porting-samplem)，请查看并遵循该模板中的变量和部分的顺序，以便其他人更容易阅读 Port。

在设计新的 **Makefile** 时，请按顺序考虑以下问题：

***

它是否以类似 **foozolix-1.2.tar.gz** 的标准 `gzip` 压缩 tarball 存储在 `DISTDIR` 中？如果是，继续下一步。如果不是，分发文件格式可能需要覆盖 `DISTVERSION`、`DISTNAME`、`EXTRACT_CMD`、`EXTRACT_BEFORE_ARGS`、`EXTRACT_AFTER_ARGS`、`EXTRACT_SUFX` 或 `DISTFILES` 中的一个或多个。

在最坏的情况下，可以创建自定义的 `do-extract` 目标来覆盖默认设置。但这种情况很少发生，几乎不需要。


---

# 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-5-zhang-pei-zhi-makefile/5.1.-zuo-zhe-fa-bu-de-dai-ma.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.
