Compile、Make和Build的区别

本文详细解释了Java集成开发环境如Eclipse和IDEA中的Compile、Make和Build三个编译选项的区别。Compile仅编译选定目标,Make编译已更改的文件,而Build则对整个工程进行彻底的重新编译并可能生成发布包。
针对Java的开发工具,一般都有Compile、Make和Build三个菜单项,完成的功能的都差不多,但是又有区别。
 
编译,是将源代码转换为可执行代码的过程。编译需要指定源文件和编译输出的文件路径(输出目录)。Java的编译会将java编译为class文件,将非java的文件(一般成为资源文件、比如图片、xml、txt、poperties等文件)原封不动的复制到编译输出目录,并保持源文件夹的目录层次关系。
 
在Java的集成开发环境中,比如Eclipse、IDEA中,有常常有三种与编译相关的选项Compile、Make、Build三个选项。这三个选项最基本的功能都是完成编译过程。但又有很大的区别,区别如下:
1、Compile:只编译选定的目标,不管之前是否已经编译过。
 
2、Make:编译选定的目标,但是Make只编译上次编译变化过的文件,减少重复劳动,节省时间。(具体怎么检查未变化,这个就不用考虑了,IDE自己内部会搞定这些的)
 
3、Build:是对整个工程进行彻底的重新编译,而不管是否已经编译过。Build过程往往会生成发布包,这个具体要看对IDE的配置了,Build在实际中应用很少,因为开发时候基本上不用,发布生产时候一般都用ANT等工具来发布。Build因为要全部编译,还要执行打包等额外工作,因此时间较长。

转载于:https://www.cnblogs.com/wangchaonan/p/10410408.html

按照你的步骤操作后:wuyilun@ubuntu:~/Desktop/NVMP/NVMP/nvmp$ CFLAGS="-D_GNU_SOURCE" make ERROR: please fix package/tp_package/lte/Makefile - see logs/package/tp_package/lte/dump.txt for details ERROR: please fix package/tp_package/lib/libsdm/Makefile - see logs/package/tp_package/lib/libsdm/dump.txt for details Collecting package info: done AMS: buildams.config and ams.config updated from local nvmp_artifact make[1] world make[2] tools/install make[3] -C tools/m4 compile make[3] -C tools/m4 install make[3] -C tools/sed compile make[3] -C tools/sed install make[3] -C tools/autoconf compile make[3] -C tools/autoconf install make[3] -C tools/pkg-config compile make[3] -C tools/pkg-config install make[3] -C tools/xz compile make[3] -C tools/xz install make[3] -C tools/automake compile make[3] -C tools/automake install make[3] -C tools/missing-macros compile make[3] -C tools/missing-macros install make[3] -C tools/libtool compile make[3] -C tools/libtool install make[3] -C tools/flex compile make[3] -C tools/flex install make[3] -C tools/bison compile make[3] -C tools/bison install make[3] -C tools/mklibs compile make[3] -C tools/mklibs install make[3] -C tools/sstrip compile make[3] -C tools/sstrip install make[3] -C tools/ipkg-utils compile make[3] -C tools/ipkg-utils install make[3] -C tools/genext2fs compile make[3] -C tools/genext2fs install make[3] -C tools/e2fsprogs compile make[3] -C tools/e2fsprogs install make[3] -C tools/mtd-utils compile make -r world: build failed. Please re-run make with V=s to see what's going on make: *** [/home/wuyilun/Desktop/NVMP/NVMP/nvmp/include/toplevel.mk:279: world] Error 1
08-19
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值