From: Vladimír Vondruš Date: Wed, 25 Apr 2018 11:18:01 +0000 (+0200) Subject: doxygen: actually, just abort when CREATE_SUBDIRS is enabled. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=e93df33fabf9ee5d627eaf1d6e0256bac33ffcdc;p=blog.git doxygen: actually, just abort when CREATE_SUBDIRS is enabled. --- diff --git a/doc/doxygen.rst b/doc/doxygen.rst index b3e3c172..e381cd5b 100644 --- a/doc/doxygen.rst +++ b/doc/doxygen.rst @@ -210,6 +210,12 @@ amount of generated content for no added value. - ``@section``, ``@subsection`` etc. commands inside anything else than top-level documentation of a class, namespace, file, directory, page or module are not supported as the visual layout is not expecting such things +- The :ini:`CREATE_SUBDIRS` Doxyfile option is not supported. This option + causes Doxygen to scatter the XML files across numerous subdirectories to + work around limits of ancient filesystems. Implementing support for this + option would be too much effort for too little gain and so m.css simply + aborts if it discovers this option being enabled. Set it back to ``NO`` it + in your ``Doxyfile-mcss`` override. `Not yet implemented features`_ ------------------------------- @@ -909,13 +915,6 @@ positives, this information is not present in the non-verbose output. DEBUG:root:dir_22305cb0964bbe63c21991dd2265ce48.xml: neither brief nor detailed description present, skipping -Besides the above, the output will be mostly empty also if you have the -:ini:`CREATE_SUBDIRS` Doxyfile option enabled. This option causes Doxygen to -scatter the XML files across numerous subdirectories to work around limits of -ancient filesystems. m.css doesn't support it and probably never will, set it -back to ``NO`` it in your ``Doxyfile-mcss`` override. For easier debugging, -m.css will warn if it finds this option enabled. - `Output is not styled`_ ----------------------- diff --git a/doxygen/dox2html5.py b/doxygen/dox2html5.py index 74f2db36..6c0f0350 100755 --- a/doxygen/dox2html5.py +++ b/doxygen/dox2html5.py @@ -2608,7 +2608,6 @@ def parse_doxyfile(state: State, doxyfile, config = None): continuation_re = re.compile(r"""^\s*(?P['"]?)(?P.*)(?P=quote)\s*(?P\\?)$""") default_config = { - 'CREATE_SUBDIRS': ['NO'], 'PROJECT_NAME': ['My Project'], 'OUTPUT_DIRECTORY': [''], 'XML_OUTPUT': ['xml'], @@ -2752,8 +2751,9 @@ list using and if i in config: state.doxyfile[i] = [line for line in config[i] if line] - if state.doxyfile['CREATE_SUBDIRS']: - logging.fatal("{}: CREATE_SUBDIRS is not supported, output will be most probably empty".format(doxyfile)) + if state.doxyfile.get('CREATE_SUBDIRS', False): + logging.fatal("{}: CREATE_SUBDIRS is not supported, sorry. Disable it and try again.".format(doxyfile)) + raise NotImplementedError default_index_pages = ['pages', 'files', 'namespaces', 'modules', 'annotated'] default_wildcard = '*.xml' diff --git a/doxygen/test/test_doxyfile.py b/doxygen/test/test_doxyfile.py index fa105342..da0a336c 100644 --- a/doxygen/test/test_doxyfile.py +++ b/doxygen/test/test_doxyfile.py @@ -37,7 +37,6 @@ class Doxyfile(unittest.TestCase): state = State() parse_doxyfile(state, 'test/doxyfile/Doxyfile') self.assertEqual(state.doxyfile, { - 'CREATE_SUBDIRS': False, 'HTML_EXTRA_FILES': ['css', 'another.png', 'hello'], 'HTML_EXTRA_STYLESHEET': ['a.css', 'b.css'], 'HTML_OUTPUT': 'html', @@ -68,33 +67,5 @@ list using and def test_subdirs(self): state = State() - parse_doxyfile(state, 'test/doxyfile/Doxyfile-subdirs') - self.assertEqual(state.doxyfile, { - 'CREATE_SUBDIRS': True, - 'HTML_EXTRA_FILES': [], - 'HTML_EXTRA_STYLESHEET': [ - 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600', - '../css/m-dark+doxygen.compiled.css'], - 'HTML_OUTPUT': 'html', - 'M_CLASS_TREE_EXPAND_LEVELS': 1, - 'M_EXPAND_INNER_TYPES': False, - 'M_FAVICON': '', - 'M_FILE_TREE_EXPAND_LEVELS': 1, - 'M_LINKS_NAVBAR1': ['pages', 'namespaces'], - 'M_LINKS_NAVBAR2': ['annotated', 'files'], - 'M_PAGE_FINE_PRINT': '[default]', - 'M_SEARCH_DISABLED': False, - 'M_SEARCH_DOWNLOAD_BINARY': False, - 'M_SEARCH_EXTERNAL_URL': '', - 'M_SEARCH_HELP': -"""Search for symbols, directories, files, pages or modules. You can omit any -prefix from the symbol or file path; adding a : or / -suffix lists all members of given symbol or directory. Navigate through the -list using and -, press -Enter to go.""", - 'M_THEME_COLOR': '#22272e', - 'OUTPUT_DIRECTORY': '', - 'PROJECT_NAME': 'My Project', - 'XML_OUTPUT': 'xml' - }) + with self.assertRaises(NotImplementedError): + parse_doxyfile(state, 'test/doxyfile/Doxyfile-subdirs')