B进行的优点 [英] Merits of bmake

查看:195
本文介绍了B进行的优点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除了一个事实,即B进行是一个BSD等价的GNU make,我不能清楚地了解它的过去GNU优势使。谁能帮我?我能找到唯一一个资源那是有点帮助。更多的帮助或指针是AP preciated。

Apart from the fact that bmake is an BSD equivalent of GNU make, I could not clearly understand it's advantages over GNU make. Can anyone help me? I was able to find only one resource that was bit helpful. More help or pointers are appreciated.

谢谢,帕布

推荐答案

BSD make和GNU make是原来的AT&功放都免费更换;吨做。主要的区别是具有先进的功能,不同的语法。下面是如何把一个shell命令的输出变量在BSD化妆:

BSD make and GNU make are both free replacements for the original AT&T make. The major difference is having different syntax for the advanced features. Here is how to put the output of a shell command in a variable in BSD make:

# BSD make
TODAY != date +%Y-%m-%d

和在GNU做:

# GNU make
TODAY = $(shell date +%Y-%m-%d)

只要有人在Makefile中写道: $(壳...),它requries GNU使。由于不同的语法,一些软件包需要GNU作出构建,有的要求BSD化妆。

As soon as someone writes $(shell ...) in a Makefile, it requries GNU make. Because of the different syntax, some packages require GNU make for the build, and some require BSD make.

BSD化妆开始了它的生命的 PMake ,简称并行make 的。教程 - 其作者亚当·德布尔在的 PMake描述PMake 的。其优点是并行运行的作业,如使新的能力-j 3 。这种并行模式下运行对每个目标的所有命令在一个外壳,而不是在每行一个外壳打破了兼容性。 GNU make也有一个并行模式下,也 -j ,即保持每行一个外壳。 NetBSD的使(1)现在有制作-B -j 3 做并行模式,每行一个外壳。 <一href=\"http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/make.1?query=make&sec=1\">OpenBSD使(1)现在总是这样并行模式下,每行一个外壳。

BSD make began its life as PMake, short for parallel make. Its author, Adam de Boor, described PMake in PMake -- A Tutorial. Its merit was the new ability to run jobs in parallel, as in make -j 3. This parallel mode broke compatibility by running all commands for each target in a single shell, not in one shell per line. GNU make has a parallel mode, also -j, that keeps one shell per line. NetBSD make(1) now has make -B -j 3 to do parallel mode with one shell per line. OpenBSD make(1) now always does parallel mode with one shell per line.

4.3BSD-里诺包括PMake为制作和BSD *。MK包含文件。这些包含文件BSD make的最好的功能。 <一href=\"http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD-Tahoe/usr/src/bin/sed/Makefile\">src/bin/sed/Makefile在4.3BSD-塔霍(前4.3BSD-里诺释放)定义喜欢干净的几个目标,依赖,安装等。 <一href=\"http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD-Reno/src/usr.bin/sed/Makefile\">src/usr.bin/sed/Makefile在4.3BSD-里诺的只有四个非空行:

4.3BSD-Reno included PMake as make and the bsd.*.mk include files. These include files are the best feature of BSD make. src/bin/sed/Makefile in 4.3BSD-Tahoe (the release before 4.3BSD-Reno) defines several targets like clean, depend, install, and so on. src/usr.bin/sed/Makefile in 4.3BSD-Reno has only four non-empty lines:

#   @(#)Makefile    4.6 (Berkeley) 5/11/90

PROG=   sed
SRCS=   sed0.c sed1.c

.include <bsd.prog.mk>

下面的 bsd.prog.mk 的自动设置 OBJS sed0.o sed1.o ,定义了一个sed的目标链接,从这些对象的sed,定义一样干净的其他目标,依赖,安装和原因制作安装来安装这两个sed和它的手册页的sed 0.1。还有的 bsd.lib.mk 的建筑库。

Here bsd.prog.mk automatically sets OBJS to sed0.o sed1.o, defines a sed target to link sed from those objects, defines other targets like clean, depend, install, and causes make install to install both sed and its manual page sed.1. There is also bsd.lib.mk for building libraries.

在使用BSD *。MK,每个Makefile文件可以仅生成一个程序或库。要建立另外一个,必须有另一个目录第二Makefile文件。因此,的src / usr.sbin / smtpd的/ OpenBSD中有六个子目录,每个子目录只包含一个Makefile,因为smtpd的建立六个方案。

When using bsd.*.mk, each Makefile can build only one program or library. To build another one, there must be a second Makefile in another directory. So src/usr.sbin/smtpd/ in OpenBSD has six subdirectories, where each subdirectory only contains a Makefile, because smtpd builds six programs.

这也是罕见的使用BSD *。MK打造除了BSD本身什么。来自BSD的开发,像OpenSSH的(来自OpenBSD)或mksh(从MirBSD)许多便携式包,不需要BSD化妆,不要使用BSD。*。MK文件。

It is also rare to use bsd.*.mk to build anything except BSD itself. Many portable packages from BSD developers, like OpenSSH (from OpenBSD) or mksh (from MirBSD), do not require BSD make and do not use bsd.*.mk files.

该文件的 bsd.port.mk 的是 FreeBSD的Ports中心 ,即建立软件包的FreeBSD系统。 (的NetBSD的pkgsrc 调用这个文件的 bsd.pkg.mk 的)。这个系统在其他脚本语言对手。家酿使用红宝石。 MacPorts的使用Tcl的。

The file bsd.port.mk is at the center of FreeBSD Ports, the system that builds software packages for FreeBSD. (NetBSD pkgsrc calls this file bsd.pkg.mk.) This system has rivals in other scripting languages. Homebrew uses Ruby. MacPorts use Tcl.

在过去,GNU化妆比化妆BSD更便携。由于BSD化妆是BSD的一部分,这是罕见的BSD作出其他系统。现在有其他系统的便携式B进行。这是NetBSD的化妆的一个便携版本。便携式B进行最常见的用途是在非NetBSD的系统上运行的pkgsrc。我在OS X上运行的pkgsrc,与B进行由自举的pkgsrc

In the past, GNU make was more portable than BSD make. Because BSD make was part of BSD, it is rare to find BSD make on other systems. Now there is portable bmake for other systems. This is a portable version of NetBSD make. The most common use for portable bmake is to run pkgsrc on non-NetBSD systems. I run pkgsrc on OS X, with bmake bootstrapped by pkgsrc.

这篇关于B进行的优点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆