update doc scripts for the new structure
authorBrian Dolbec <dolsen@gentoo.org>
Wed, 5 Jun 2013 17:38:44 +0000 (10:38 -0700)
committerBrian Dolbec <dolsen@gentoo.org>
Thu, 6 Jun 2013 16:04:34 +0000 (09:04 -0700)
Makefile
doc/make_subarch_table_guidexml.py
doc/make_target_table.py

index 98accbe12b1ac1ad4315b79be22ce6b3c3afde0a..52e0297e8b8559bc2ec60ac2cfa9b0aab9dc2ebc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 # Copyright (C) 2011 Sebastian Pipping <sebastian@pipping.org>
 # Licensed under GPL v2 or later
 
-PACKAGE_VERSION = `fgrep '__version__=' catalyst | sed 's|^__version__="\(.*\)"$$|\1|'`
+#PACKAGE_VERSION = `fgrep '__version__=' catalyst | sed 's|^__version__="\(.*\)"$$|\1|'`
 MAN_PAGE_SOURCES = $(wildcard doc/*.?.txt)
 MAN_PAGES = $(patsubst doc/%.txt,files/%,$(MAN_PAGE_SOURCES))
 MAN_PAGE_INCLUDES = doc/subarches.generated.txt doc/targets.generated.txt
@@ -24,10 +24,10 @@ $(MAN_PAGES): files/%: doc/%.txt doc/asciidoc.conf Makefile catalyst
 files/catalyst.1: doc/subarches.generated.txt
 files/catalyst-spec.5: doc/subarches.generated.txt doc/targets.generated.txt
 
-doc/subarches.generated.txt: $(wildcard arch/*.py) doc/make_subarch_table_guidexml.py
+doc/subarches.generated.txt: $(wildcard catalyst/arch/*.py) doc/make_subarch_table_guidexml.py
        ./doc/make_subarch_table_guidexml.py
 
-doc/targets.generated.txt: doc/make_target_table.py $(wildcard modules/*_target.py)
+doc/targets.generated.txt: doc/make_target_table.py $(wildcard catalyst/targets/*.py)
        "./$<" > "$@"
 
 $(DOCS): files/%.html: doc/%.txt doc/asciidoc.conf Makefile
index 16c877696dcde4022b7b7cdc0157d207cac6df96..54e0a4a80db28da1b7cbc5a3fc281989ba4651a7 100755 (executable)
@@ -1,5 +1,6 @@
 #! /usr/bin/env python2
 # Copyright (C) 2011 Sebastian Pipping <sebastian@pipping.org>
+# Copyright (C) 2013 Brian dolbec <dolsen@gentoo.org>
 # Licensed under GPL v2 or later
 
 
@@ -102,10 +103,12 @@ if __name__ == '__main__':
        subarch_title_to_subarch_id = dict()
        subarch_id_to_pattern_arch_genericrch_id = dict()
 
-       for (dirpath, dirnames, filenames) in os.walk('arch'):
+       for (dirpath, dirnames, filenames) in os.walk('catalyst/arch'):
                for _fn in filenames:
                        if not _fn.endswith('.py'):
                                continue
+                       if _fn == '__init__.py':
+                               continue
 
                        fn = os.path.join(dirpath, _fn)
                        handle_file(fn, subarch_title_to_subarch_id, subarch_id_to_pattern_arch_genericrch_id)
index ad4d2928ad1b8e7ae8d8feb02ba8c37df55468a6..9e7ebe83a44e9258ce25efa050594ec7a2c1340f 100755 (executable)
@@ -1,16 +1,17 @@
 #!/usr/bin/env python2
 # Copyright (C) 2012 W. Trevor King <wking@drexel.edu>
 # Copyright (C) 2012 Sebastian Pipping <sebastian@pipping.org>
+# Copyright (C) 2013 Brian dolbec <dolsen@gentoo.org>
 # Licensed under GPL v2 or later
 
 # This script should be run from the root of the catalyst source.
+# source the testpath file then run "doc/make_target_table.py"
+
 
 from __future__ import print_function
 
 import sys as _sys
 
-_sys.path.insert(0, 'modules')  # so we can find the `catalyst` module
-
 import glob
 import re
 
@@ -20,15 +21,15 @@ def key_netboot_before_netboot2((target_name, module)):
 
 
 if __name__ == '__main__':
-       extractor = re.compile('^modules/(([^ ]+)_target).py$')
+       extractor = re.compile('^catalyst/targets/(([^ ]+)).py$')
        targets = list()
-       for filename in sorted(glob.glob('modules/*_target.py')):
-               if 'generic' in filename:
+       for filename in sorted(glob.glob('catalyst/targets/*.py')):
+               if '__init__' in filename:
                        continue
 
                match = extractor.match(filename)
                target_name = match.group(2).replace('_', '-')
-               module_name = match.group(1)
+               module_name = 'catalyst.targets.' + match.group(1)
 
                __import__(module_name)
                module = _sys.modules[module_name]