Move set version outside of _generate_doxyfile as they keeps changing
Generate doxyfile in project root
@@ -30,7 +30,7 @@ import("private.action.require.impl.install_packages")
function _generate_doxyfile()
-- generate the default doxyfile
- local doxyfile = path.join(os.tmpdir(), "doxyfile")
+ local doxyfile = path.join(project.directory(), "doxyfile")
os.vrunv(doxygen.program, {"-g", doxyfile})
-- enable recursive
@@ -58,15 +58,6 @@ function _generate_doxyfile()
os.mkdir(outputdir)
end
- -- set the project version
- --
- -- PROJECT_NUMBER =
- --
- local version = project.version()
- if version then
- io.gsub(doxyfile, "PROJECT_NUMBER%s-=.-\n", format("PROJECT_NUMBER = %s\n", version))
- end
-
-- set the project name
--
-- PROJECT_NAME =
@@ -111,6 +102,15 @@ function main()
end
assert(os.isfile(doxyfile), "%s not found!", doxyfile)
+ -- set the project version
+ --
+ -- PROJECT_NUMBER =
+ --
+ local version = project.version()
+ if version then
+ io.gsub(doxyfile, "PROJECT_NUMBER%s-=.-\n", format("PROJECT_NUMBER = %s\n", version))
+ end
+
-- generate document
cprint("generating ..${beer}")
os.vrunv(doxygen.program, {doxyfile}, {curdir = project.directory()})
