因为执行sbt clean dist百度了下,搜到make也有如下相似命令:
make clean仅仅是清除之前编译的可执行文件及配置文件。
而make distclean要清除所有生成的文件。
Makefile
在符合GNU Makefiel惯例的Makefile中,包含了一些基本的预先定义的操作:
make
根据Makefile编译源代码,连接,生成目标文件,可执行文件。
make clean
清除上次的make命令所产生的object文件(后缀为“.o”的文件)及可执行文件。
make install
将编译成功的可执行文件安装到系统目录中,一般为/usr/local/bin目录。
make dist
产生发布软件包文件(即distribution package)。这个命令将会将可执行文件及相关文件打包成一个tar.gz压缩的文件用来作为发布软件的软件包。
它会在当前目录下生成一个名字类似“PACKAGE-VERSION.tar.gz”的文件。PACKAGE和VERSION,是我们在configure.in中定义的AM_INIT_AUTOMAKE(PACKAGE, VERSION)。
make distcheck
生成发布软件包并对其进行测试检查,以确定发布包的正确性。这个操作将自动把压缩包文件解开,然后执行configure命令,并且执行make,来确认编译不出现错误,最后提示你软件包已经准备好,可以发布了。
make distclean类似make clean,但同时也将configure生成的文件全部删除掉,包括Makefile。
ps:sbt、maven也有类似的命令
如sbt有命令sbt clean dist
下面是命令输出:
[root@aleiye kafka-manager-master]# sbt clean dist
[info] Loading project definition from /Application/Aleiye/enterprise/kafka/kafka_2.10-0.8.1.1/bin/kafka-manager-master/project
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] * com.typesafe.sbt:sbt-native-packager:0.7.4 -> 1.0.1
[warn] Run 'evicted' to see detailed eviction warnings
[info] Set current project to kafka-manager (in build file:/Application/Aleiye/enterprise/kafka/kafka_2.10-0.8.1.1/bin/kafka-manager-master/)
[success] Total time: 0 s, completed 2015-7-31 1:17:12
[info] Packaging /Application/Aleiye/enterprise/kafka/kafka_2.10-0.8.1.1/bin/kafka-manager-master/target/scala-2.11/kafka-manager_2.11-1.2.7-sources.jar ...
[info] Done packaging.
[info] Updating {file:/Application/Aleiye/enterprise/kafka/kafka_2.10-0.8.1.1/bin/kafka-manager-master/}root...
[info] Resolving jline#jline;2.12 ...
[info] Done updating.
[info] Wrote /Application/Aleiye/enterprise/kafka/kafka_2.10-0.8.1.1/bin/kafka-manager-master/target/scala-2.11/kafka-manager_2.11-1.2.7.pom
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] * org.webjars:jquery:(2.1.3, 1.11.1) -> 2.1.4
[warn] Run 'evicted' to see detailed eviction warnings
[info] Main Scala API documentation to /Application/Aleiye/enterprise/kafka/kafka_2.10-0.8.1.1/bin/kafka-manager-master/target/scala-2.11/api...
[info] Compiling 84 Scala sources and 2 Java sources to /Application/Aleiye/enterprise/kafka/kafka_2.10-0.8.1.1/bin/kafka-manager-master/target/scala-2.11/classes...
model contains 331 documentable templates
[info] Main Scala API documentation successful.
[info] Packaging /Application/Aleiye/enterprise/kafka/kafka_2.10-0.8.1.1/bin/kafka-manager-master/target/scala-2.11/kafka-manager_2.11-1.2.7-javadoc.jar ...
[info] Done packaging.
[info] LESS compiling on 1 source(s)
[info] Packaging /Application/Aleiye/enterprise/kafka/kafka_2.10-0.8.1.1/bin/kafka-manager-master/target/kafka-manager-1.2.7-assets.jar ...
[info] Done packaging.
[info] Packaging /Application/Aleiye/enterprise/kafka/kafka_2.10-0.8.1.1/bin/kafka-manager-master/target/scala-2.11/kafka-manager_2.11-1.2.7.jar ...
[info] Done packaging.
[info]
[info] Your package is ready in /Application/Aleiye/enterprise/kafka/kafka_2.10-0.8.1.1/bin/kafka-manager-master/target/universal/kafka-manager-1.2.7.zip
[info]
[success] Total time: 93 s, completed 2015-7-31 1:18:44
[root@aleiye kafka-manager-master]# ll
总用量 72
drwxr-xr-x. 7 root root 4096 7月 30 15:08 app
-rw-r--r--. 1 root root 2598 7月 30 15:08 build.sbt
drwxr-xr-x. 2 root root 4096 7月 30 18:00 conf
drwxr-xr-x. 2 root root 4096 7月 30 15:08 img
-rw-r--r--. 1 root root 11323 7月 30 15:08 LICENCE
drwxr-xr-x. 4 root root 4096 7月 30 18:38 project
drwxr-xr-x. 5 root root 4096 7月 30 15:08 public
-rw-r--r--. 1 root root 3900 7月 30 15:08 README.md
-rwxr-xr-x. 1 root root 18746 7月 30 15:08 sbt
drwxr-xr-x. 4 root root 4096 7月 30 15:08 src
drwxr-xr-x. 7 root root 4096 7月 31 01:18 target
drwxr-xr-x. 4 root root 4096 7月 30 15:08 test
[root@aleiye kafka-manager-master]# cd target/
[root@aleiye target]# ll
总用量 2708
-rw-r--r--. 1 root root 2749403 7月 31 01:18 kafka-manager-1.2.7-assets.jar
drwxr-xr-x. 4 root root 4096 7月 31 01:17 resolution-cache
drwxr-xr-x. 8 root root 4096 7月 31 01:18 scala-2.11
drwxr-xr-x. 7 root root 4096 7月 31 01:18 streams
drwxr-xr-x. 3 root root 4096 7月 31 01:18 universal
drwxr-xr-x. 6 root root 4096 7月 31 01:18 web