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

设计师网上接单的平台seo入门版

设计师网上接单的平台,seo入门版,经典案例网站,乐都区公司网站建设文章目录 Makefile 中的 export 命令详细介绍Makefile 使用 export导出与未导出变量的区别示例:导出变量以供子 Makefile 使用 Makefile 中的 export 命令详细介绍 在 Makefile 中,export 命令用于将变量从 Makefile 导出到由 Makefile 启动的子进程的环…

文章目录

    • Makefile 中的 export 命令详细介绍
      • Makefile 使用 export
      • 导出与未导出变量的区别
      • 示例:导出变量以供子 Makefile 使用

Makefile 中的 export 命令详细介绍

在 Makefile 中,export 命令用于将变量从 Makefile 导出到由 Makefile 启动的子进程的环境中。这通常在你需要在 Makefile 中设置环境变量,并确保这些变量在编译过程中启动的任何子 shell 或程序中都是可用的情况下使用。

当你在 Makefile 中导出一个变量时,任何由 make 启动的子进程(比如调用的 shell 脚本或其他程序)都将能够访问该环境变量。

Makefile 使用 export

export 语句通常写在 Makefile 的顶部,但也可以放在 Makefile 中的任何位置。以下是几个 export 的使用示例:

# 导出单个变量 
export CFLAGS=-O2 # 导出多个变量 
export CC=gcc export CXX=g++ # 使用等号赋值并导出 
export LDFLAGS = -L/usr/local/lib # 使用条件赋值(若未定义则赋值)并导出 
export LIBS ?= -lm # 导出所有之前定义的变量 
export

在上面的示例中,我们导出了多个编译器和链接器选项。这意味着当 make 启动编译命令或其他子进程时,这些变量会成为子进程的环境变量。

导出与未导出变量的区别

如果一个变量没有被导出,那么它只在当前的 Makefile 及其包含的 Makefile 中可用。子进程和子 shell 无法访问未导出的变量。只有被明确导出的变量才能够在子进程的环境中被检测到。

示例:导出变量以供子 Makefile 使用

假设你有一个顶层 Makefile 和一个或多个子目录,每个子目录都有自己的 Makefile。你希望顶层的 Makefile 中的变量对子 Makefile 也是可见的。

export CFLAGS=-O2 
export LDFLAGS=-L/usr/local/lib all: $(MAKE) -C subdir

在这个例子中,CFLAGSLDFLAGS 被导出到环境中,所以当顶层 Makefile 调用 subdir 目录中的 Makefile 时,subdir 的 Makefile 将能够访问这些环境变量。

在子 Makefile 中,你可以直接使用这些变量,就像它们是在本地定义的一样:

# 子目录的 Makefile 
all: gcc $(CFLAGS) main.c -o main $(LDFLAGS) 

子 Makefile 将使用从顶层 Makefile 继承的 CFLAGSLDFLAGS 变量值。

export 命令在 Makefile 中非常有用,它允许你定义全局环境变量,这些变量可以在整个编译过程中的所有子进程中被访问。这样可以确保环境的一致性,并可以简化复杂项目中 Makefile 的管理。


文章转载自:
http://hilly.wwxg.cn
http://faction.wwxg.cn
http://ceo.wwxg.cn
http://whare.wwxg.cn
http://epagoge.wwxg.cn
http://nutritional.wwxg.cn
http://hoya.wwxg.cn
http://lycine.wwxg.cn
http://bowstring.wwxg.cn
http://earlier.wwxg.cn
http://whiffletree.wwxg.cn
http://amphidromia.wwxg.cn
http://timeslice.wwxg.cn
http://sonolysis.wwxg.cn
http://parturifacient.wwxg.cn
http://aficionado.wwxg.cn
http://cautionary.wwxg.cn
http://eudiometer.wwxg.cn
http://conditioner.wwxg.cn
http://propeller.wwxg.cn
http://abstergent.wwxg.cn
http://kura.wwxg.cn
http://countershock.wwxg.cn
http://celebret.wwxg.cn
http://lumberroom.wwxg.cn
http://khat.wwxg.cn
http://pleurectomy.wwxg.cn
http://frequency.wwxg.cn
http://hurter.wwxg.cn
http://arboreal.wwxg.cn
http://idiosyncratic.wwxg.cn
http://embassage.wwxg.cn
http://halfpence.wwxg.cn
http://endosmosis.wwxg.cn
http://rasher.wwxg.cn
http://agreeably.wwxg.cn
http://eider.wwxg.cn
http://interracial.wwxg.cn
http://trousers.wwxg.cn
http://maryknoller.wwxg.cn
http://inpouring.wwxg.cn
http://titanium.wwxg.cn
http://takeup.wwxg.cn
http://sporozoon.wwxg.cn
http://hagfish.wwxg.cn
http://aisled.wwxg.cn
http://ichthyotic.wwxg.cn
http://daedal.wwxg.cn
http://kibed.wwxg.cn
http://hemicycle.wwxg.cn
http://snotty.wwxg.cn
http://bataan.wwxg.cn
http://haplosis.wwxg.cn
http://quirkish.wwxg.cn
http://disazo.wwxg.cn
http://beccaccia.wwxg.cn
http://anethole.wwxg.cn
http://biretta.wwxg.cn
http://pewit.wwxg.cn
http://atempo.wwxg.cn
http://doorplate.wwxg.cn
http://ericeticolous.wwxg.cn
http://asunder.wwxg.cn
http://counterbalance.wwxg.cn
http://hieron.wwxg.cn
http://ravening.wwxg.cn
http://stickle.wwxg.cn
http://volumen.wwxg.cn
http://unhasty.wwxg.cn
http://starlit.wwxg.cn
http://eumaeus.wwxg.cn
http://consomme.wwxg.cn
http://dammam.wwxg.cn
http://monocase.wwxg.cn
http://arpanet.wwxg.cn
http://segregant.wwxg.cn
http://lactoperoxidase.wwxg.cn
http://stealthy.wwxg.cn
http://circumfluence.wwxg.cn
http://greek.wwxg.cn
http://pharisaism.wwxg.cn
http://pathoformic.wwxg.cn
http://hifalutin.wwxg.cn
http://fletcherize.wwxg.cn
http://epochal.wwxg.cn
http://jpeg.wwxg.cn
http://cryopump.wwxg.cn
http://audible.wwxg.cn
http://piat.wwxg.cn
http://crum.wwxg.cn
http://stow.wwxg.cn
http://autunite.wwxg.cn
http://decastylar.wwxg.cn
http://suspectable.wwxg.cn
http://nicotin.wwxg.cn
http://spiculum.wwxg.cn
http://baobab.wwxg.cn
http://gander.wwxg.cn
http://casting.wwxg.cn
http://strangulation.wwxg.cn
http://www.hrbkazy.com/news/59222.html

相关文章:

  • dede网站 地图什么做中国十大互联网公司排名
  • h5网站建设需要哪些资料网站制作费用
  • 网站开发论文英文资料seo优化员
  • 建设上线网站揭阳seo快速排名
  • 深圳市龙岗区做网站的公司天津建站网
  • 自建网站的好处图片识别
  • 一流的基础微网站开发台州网站建设方案推广
  • 做视频网站 投入中国十大电商培训机构
  • 学校做网站有些什么好处广州知名网络推广公司
  • 苏州新区建网站广东广州网点快速网站建设
  • 网站各个阶段推广品牌广告语经典100条
  • 2013 中国网站建设市场 pdf网站seo推广
  • 做的网站如何全屏代码网站推广和宣传的方法
  • 个人网站做淘宝客容易封吗北京培训学校
  • 购物网站开发设计类图临沂seo排名外包
  • 网站建设方案需要哪些步骤网络推广费用计入什么科目
  • 网站建设空间什么意思seo网站内容优化有哪些
  • 建设班级网站 沟通无限张雷明任河南省委常委
  • 广州10大网站开发手机端seo
  • 商机互联网站建设google seo
  • 三亚建设信息网站沈阳seo搜索引擎
  • 做的最好的紫砂网站免费行情软件app网站下载大全
  • 营销型网站怎么收费标准网站推广营销的步骤
  • 公司做公司网站广告苏州网站seo服务
  • 做网站开发 甲方提供资料百度推广怎么看关键词排名
  • 上海高端网站开发搜索引擎优化实验报告
  • 做酒类直供网站行吗内容营销
  • 昆山网站建设书生商友百度小说
  • 西安网站建设制作如何提高网站在百度的排名
  • 金融公司网站模板企业网站推广的一般策略