调用doxygen时在命令行中配置一些变量 [英] Configure some variables in command line when calling doxygen

查看:31
本文介绍了调用doxygen时在命令行中配置一些变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用预定义的foo.doxyfile生成doxygen文档.我想修改例如PROJECT_NUMBER,并生成带有bat文件的文档.这是蝙蝠的内容:

I want to generate doxygen documentation with a predefined foo.doxyfile. I want to modify e.g. the PROJECT_NUMBER and generate the documentation with a bat-file. Here is the content of the bat:

@echo off
setLocal enabledelayedexpansion
cls
echo Running Doxygen
rem Set a lot of variables
set BASE_DIR=%~dp0
set "PathToDoxygen=C:\Program Files\Doxygen\bin\doxygen.exe"
set "PahtToInterfacesDoxygen=D:\foo\Interfaces\Interfaces.doxyfile"

call ( type doxyfile & echo "PROJECT_NUMBER=1.1.2" | "%PathToDoxygen%" %PahtToInterfacesDoxygen% 

遗憾的是未设置PROJECT_NUMBER.我在做什么错了?

Sadly the PROJECT_NUMBER isn't set. What I am doing wrong?

推荐答案

正如Compo指出的那样,这里有很多错误.

As Compo partly indicated there are a number of things wrong here.

呼叫"的正确语法在这种情况下,行将是:

The correct syntax for the "call" line would be in this case:

(type %PahtToInterfacesDoxygen% & echo "PROJECT_NUMBER=1.1.2") | "%PathToDoxygen%" -

在这里我们必须假设%PahtToInterfacesDoxygen%是要在 PROJECT_NUMBER 修改中使用的doxygen配置文件.doxygen调用后的-表示使用stdin提供的信息(doxygen设置),即此处的管道.

we have to assume here that %PahtToInterfacesDoxygen% is the doxygen configuration file that you would like to use with the PROJECT_NUMBER modification. The - after the doxygen call is to signal to use the information (doxygen settings) as provided through stdin i.e. the pipe here.

您不需要 call ,因为您使用的是可执行文件,而不是批处理文件来启动doixygen本身.

You don't need the call as you are using the executable and not a batch file to start doixygen itself.

这篇关于调用doxygen时在命令行中配置一些变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆