# 設定 Makefile

FreeBSD Porter's Handbook
前一頁 |  | 下一頁

# 章 5. 設定 Makefile

設定 `Makefile` 是件非常簡單的事， 建議您在開始前，先看看範例。Also, there is a sample Makefile in this handbook, so take a look and please follow the ordering of variables and sections in that template to make your port easier for others to read.

Now, consider the following problems in sequence as you design your new `Makefile`:

# 5.1. The original source

Does it live in `DISTDIR` as a standard gzip'd tarball named something like `foozolix-1.2.tar.gz`? If so, you can go on to the next step. If not, you should look at overriding any of the `DISTVERSION`, `DISTNAME`, `EXTRACT_CMD`, `EXTRACT_BEFORE_ARGS`, `EXTRACT_AFTER_ARGS`, `EXTRACT_SUFX`, or `DISTFILES` variables, depending on how alien a format your port's distribution file is. (The most common case is `EXTRACT_SUFX=.tar.Z`, when the tarball is condensed by regular `compress`, not `gzip`.)

In the worst case, you can simply create your own `do-extract` target to override the default, though this should be rarely, if ever, necessary.

前一頁 | 內容 | 下一頁
處理使用者輸入 |  | Naming

For questions about the FreeBSD ports system, e-mail <ports@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.