通用工具

irori的Python项目详细描述


irori-生成工具

版权所有2019 Sileader。

功能

  • 配置文件是python脚本
  • 后缀规则
  • 并发执行

如何使用

pip install irori

编写配置脚本(makefile.py)。

fromirori.rulesimportSuffixRule,StaticRule,LinkRulefromiroriimportcontextasctxt,runnerfromirori.dependimportDependenciesimportglobtarget='hello.elf'defbuild(_:ctxt.BuildContext):returnLinkRule(command='clang++ -fPIC -o $@ $^',debug='-O0 -g',release='-O2',rules=SuffixRule(cpp=StaticRule('g++ -std=c++11 -c $< -o $@',debug='-O0 -g',release='-O2'),c=StaticRule('gcc -std=c11 -c -O2 $< -o $@',debug='-O0 -g',release='-O2')))defdepend(_:ctxt.BuildContext):returnSuffixRule(cpp=StaticRule('g++ -MMD -c $< -o $@'),c=StaticRule('gcc -MMD -c $< -o $@'))defrecipes():return{'build':build,'depend':depend}defarguments(parser):passdeffind_files(_:ctxt.BuildContext):returnglob.glob('*.c')+glob.glob('*.cpp')runner.start(target,recipes=recipes,finder=find_files,arguments=arguments,dependencies=Dependencies(files=glob.glob('obj/*.d')))

makefile.py目录中运行。

irori build

许可证

GNU GPL 3.0版

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Android中Twitter共享的java xAuth身份验证?   带有@XmlAnyAttribute和方法的java Bug?(使用JAXB-RI)   安卓 ArrayAdapter导致java。lang.NullPointerException   java如何使用JExel从现有excel文件中删除工作表   java树映射随机停止正确返回值   使用switch和scanner类java使用用户选择   java JCalendar多天选择   Java文件zip正在创建损坏的文件   Ajax调用中的java未定义错误   java处理JSON更改信息的最佳方法   java JNI不适用于AppKit线程   java在运行时为JTable的特定行设置背景色   java如何在for循环中添加按钮?   java在getclass()方法之后强制转换对象