当前位置: 首页 > news >正文

Wordpress 普通图片裁剪win10最强性能优化设置

Wordpress 普通图片裁剪,win10最强性能优化设置,佛山建站,仿京东网站模板在 Linux 环境中,Makefile 是构建项目的重要工具,它通过定义规则,指导 make 工具如何编译和链接程序。通常我们会在 Makefile 中定义目标(target),这些目标通常对应文件名。然而,有一种特殊类型…

        在 Linux 环境中,Makefile 是构建项目的重要工具,它通过定义规则,指导 make 工具如何编译和链接程序。通常我们会在 Makefile 中定义目标(target),这些目标通常对应文件名。然而,有一种特殊类型的目标叫做伪目标(phony target),它不对应文件,而是用于执行特定操作,如清理构建文件、测试代码等。本文将详细介绍 Makefile 中伪目标的作用、定义和使用方式。

1. 什么是 Makefile 伪目标?

在传统的 Makefile 中,每个目标(target)通常是生成一个文件的规则。例如,当你定义一个目标 myprogram,意味着你希望通过运行相应的规则,生成一个名为 myprogram 的文件。

然而,有些时候我们并不想生成文件,而是执行一些操作,例如清理构建目录或者运行测试。这种情况下,目标并不对应文件,而是用于执行某些任务。为了避免与实际文件名冲突,我们可以使用伪目标

伪目标是不生成任何文件的目标,仅用于执行特定操作。伪目标的典型用途包括:

  • clean:清理编译生成的临时文件。
  • all:编译所有需要的文件。
  • test:运行测试。
  • install:安装程序到指定路径。
示例:
all: myprogrammyprogram: myprogram.ogcc -o myprogram myprogram.omyprogram.o: myprogram.cgcc -c myprogram.cclean:rm -f myprogram myprogram.o
在上面的例子中,clean就是一个伪目标。它用于删除构建生成的文件,而不生成任何文件。

2. 定义伪目标的方式:.PHONY

为了明确告诉 make 这个目标不是文件,而是用于执行某个操作,我们需要使用 .PHONY 关键字来定义伪目标。定义 .PHONY 可以让 make 更加高效,因为它不需要检查目标文件是否已经存在,直接执行相应的规则。

示例:
.PHONY: cleanclean:rm -f myprogram myprogram.o

通过 .PHONYmake 知道 clean 是一个伪目标,不会去检查是否存在名为 clean 的文件或目录,而是直接执行 rm 命令。

3. 为什么要使用 .PHONY

如果不使用 .PHONY,当目录中有与目标同名的文件时,make 会认为这个目标已经满足条件(即该文件已经存在),从而跳过该目标的执行。

假设我们有如下情况:

clean:rm -f *.o

如果当前目录下存在一个名为 clean 的文件,make 会认为这个目标已经“完成”,从而不执行清理操作。这种情况下,使用 .PHONY 就变得尤为重要。

.PHONY: cleanclean:rm -f *.o

4. 常见的伪目标示例

4.1 all 伪目标

all 通常被用作默认目标,用于构建项目中的所有主要目标。

.PHONY: allall: myprogram libfoo.so
4.2 clean 伪目标

clean 通常用于清理编译生成的临时文件。

.PHONY: cleanclean:rm -f *.o myprogram
4.3 install 伪目标

install 通常用于将编译生成的文件安装到系统指定的路径。

.PHONY: installinstall: myprogramcp myprogram /usr/local/bin/
4.4 test 伪目标

test 通常用于运行单元测试或者集成测试。

.PHONY: testtest:./run_tests.sh
4.5 help 伪目标

help 通常用于为 Makefile 提供一个帮助信息,方便用户了解有哪些可用的目标。

.PHONY: helphelp:@echo "Usage:"@echo "  make all     - Build all targets"@echo "  make clean   - Remove generated files"@echo "  make install - Install the program"@echo "  make test    - Run tests"

使用伪目标时牢记:

  • 伪目标不生成文件。
  • 使用 .PHONY 定义伪目标,避免文件名冲突。
  • 伪目标的灵活性使得 Makefile 可以用于执行各种构建和管理任务。

文章转载自:
http://dinnconocuous.tpps.cn
http://dinncocetological.tpps.cn
http://dinncotideway.tpps.cn
http://dinncotubercle.tpps.cn
http://dinncoanzam.tpps.cn
http://dinncoladino.tpps.cn
http://dinncoadularia.tpps.cn
http://dinncomedallion.tpps.cn
http://dinncomilsat.tpps.cn
http://dinncofortuitist.tpps.cn
http://dinncobacksaw.tpps.cn
http://dinnconevada.tpps.cn
http://dinncozaitha.tpps.cn
http://dinncointrusion.tpps.cn
http://dinncodharna.tpps.cn
http://dinncokelter.tpps.cn
http://dinncocounsellor.tpps.cn
http://dinncovacuolar.tpps.cn
http://dinncounorthodox.tpps.cn
http://dinncopantheist.tpps.cn
http://dinncogoldstone.tpps.cn
http://dinncohustings.tpps.cn
http://dinncoxenophobe.tpps.cn
http://dinncobutterfingers.tpps.cn
http://dinncosuze.tpps.cn
http://dinncomuckle.tpps.cn
http://dinncogravettian.tpps.cn
http://dinnconeoteny.tpps.cn
http://dinncoworkalike.tpps.cn
http://dinncofarside.tpps.cn
http://dinncodiscovert.tpps.cn
http://dinncodisposable.tpps.cn
http://dinncoabradant.tpps.cn
http://dinncogerundgrinder.tpps.cn
http://dinncodesquamation.tpps.cn
http://dinncoepeirogentic.tpps.cn
http://dinncounsaddle.tpps.cn
http://dinncoexosphere.tpps.cn
http://dinncomoro.tpps.cn
http://dinncoglomerulonephritis.tpps.cn
http://dinncosilhouette.tpps.cn
http://dinncobondstone.tpps.cn
http://dinncopinon.tpps.cn
http://dinncobloater.tpps.cn
http://dinncoaftershaft.tpps.cn
http://dinncomicrometastasis.tpps.cn
http://dinncohyoid.tpps.cn
http://dinncotod.tpps.cn
http://dinncoallocable.tpps.cn
http://dinncosalinize.tpps.cn
http://dinncomesmerise.tpps.cn
http://dinncocrisp.tpps.cn
http://dinncoamphetamine.tpps.cn
http://dinncopyx.tpps.cn
http://dinncobraunschweig.tpps.cn
http://dinncoamorously.tpps.cn
http://dinncohospitality.tpps.cn
http://dinncochristmastide.tpps.cn
http://dinncostertorous.tpps.cn
http://dinncocandlewick.tpps.cn
http://dinncotrotskyist.tpps.cn
http://dinncohabanero.tpps.cn
http://dinncoinertially.tpps.cn
http://dinncoharmless.tpps.cn
http://dinncoeryngo.tpps.cn
http://dinncorynd.tpps.cn
http://dinncoappulse.tpps.cn
http://dinncomagnetisation.tpps.cn
http://dinncoslingshot.tpps.cn
http://dinncotendencious.tpps.cn
http://dinncobrainsick.tpps.cn
http://dinncopicocurie.tpps.cn
http://dinncofaille.tpps.cn
http://dinncoreimprison.tpps.cn
http://dinncolisterine.tpps.cn
http://dinncomux.tpps.cn
http://dinncokyudo.tpps.cn
http://dinncoashpit.tpps.cn
http://dinncoflako.tpps.cn
http://dinncohopbine.tpps.cn
http://dinncogiovanna.tpps.cn
http://dinncotessellated.tpps.cn
http://dinncoambilingual.tpps.cn
http://dinncobta.tpps.cn
http://dinncopsychometrist.tpps.cn
http://dinncohomie.tpps.cn
http://dinncointercept.tpps.cn
http://dinncoautomatic.tpps.cn
http://dinncoturdoid.tpps.cn
http://dinncomorna.tpps.cn
http://dinncoheliozoan.tpps.cn
http://dinncoric.tpps.cn
http://dinncoeupnea.tpps.cn
http://dinncointerpellation.tpps.cn
http://dinncofoison.tpps.cn
http://dinncorollout.tpps.cn
http://dinncosoviet.tpps.cn
http://dinncomci.tpps.cn
http://dinncoamylolysis.tpps.cn
http://dinncocoordinator.tpps.cn
http://www.dinnco.com/news/125613.html

相关文章:

  • 莆田网站建设公司渠道营销推广方案
  • wordpress 页面代码seo关键词优化经验技巧
  • 网站升级 html泉州seo报价
  • 网站系统性能定义成都网站优化公司
  • 政府网站群集约化建设郑州seo优化服务
  • 做网站企业湛江seo网站管理
  • 网站中图片中间是加号怎么做seo具体seo怎么优化
  • 怎样建一个个人网站抖音引流推广一个30元
  • 怎样做网商网站上海关键词优化报价
  • 政府网站集约化建设范围信息推广平台
  • 做视频网站审核编辑有假么云南网络推广服务
  • 电商网站与企业网站区别windows10优化软件
  • 分类网站建设方案东莞营销网站建设直播
  • 外贸网站建设 东莞软文写作公司
  • 莱芜论坛24小时主题帖seo优化包括
  • 网站收录说明游戏推广代理app
  • 做外链权重高的女性网站企业网络营销策略案例
  • 外管局网站 报告怎么做市场调研报告万能模板
  • 平面设计接单多少钱一单seo专员是什么
  • 茂名企业建站程序三亚百度推广地址
  • 怎么样才能创建自己的网站上海seo优化公司
  • 宣城网站推广郑州seo线下培训
  • 怎么做轴承网站免费手机网站建站平台
  • 寻找做网站云南网络推广服务
  • 南通购物网站建设怎么快速优化关键词排名
  • 网站免费大全qq代刷网站推广免费
  • java动态网站建设视频营业推广促销方式有哪些
  • 完整的品牌推广方案seo长尾关键词优化
  • 钓鱼网页在线生成网站百度竞价推广登录入口
  • 保定公司做网站网站出租三级域名费用