Commits

Anonymous committed 8a721ca

Add build_doxygen script

  • Participants
  • Parent commits 25e8c49
  • Tags 1.0

Comments (0)

Files changed (2)

File Docs/build_doxygen

+#!/usr/bin/ruby
+
+require 'pathname'
+require 'fileutils'
+
+me = Pathname.new($0)
+my_dir = me.dirname
+project_dir = my_dir.parent
+versions = project_dir + "versions.xcconfig"
+
+version = nil
+versions.open.each do |line|
+  if line.match(/\s*CURRENT_MARKETING_VERSION\s*=\s*(.*)\s*/)
+    version = $1
+  end
+end
+
+doxyfile = my_dir + "Doxyfile"
+footer = my_dir + "doxygen-footer.html"
+output = project_dir + "build/api"
+
+config = doxyfile.read
+config.concat <<EOF
+PROJECT_NUMBER = #{version}
+HTML_FOOTER = #{footer}
+OUTPUT_DIRECTORY = #{output}
+EXAMPLE_PATH = #{project_dir}
+EOF
+
+# Ensures no old files are laying around
+FileUtils.rm_rf(output)
+IO::popen("doxygen -", "w") { |io| io.puts config }

File Docs/doxygen-footer.html

+<hr class="footer">
+<address class="footer">
+  <small>Generated by&nbsp;
+    <a href="http://www.doxygen.org/index.html">
+      <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a>
+  </small>
+</address>
+</body>
+</html>