1 |
commit: 3ec4d246bcca3b0cb6dcfbaf404e55bd241976d7 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 5 17:38:44 2013 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 26 19:15:21 2015 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=3ec4d246 |
7 |
|
8 |
update doc scripts for the new structure |
9 |
|
10 |
--- |
11 |
Makefile | 4 ++-- |
12 |
doc/make_subarch_table_guidexml.py | 5 ++++- |
13 |
doc/make_target_table.py | 13 +++++++------ |
14 |
3 files changed, 13 insertions(+), 9 deletions(-) |
15 |
|
16 |
diff --git a/Makefile b/Makefile |
17 |
index 757113c..d2f17f7 100644 |
18 |
--- a/Makefile |
19 |
+++ b/Makefile |
20 |
@@ -24,10 +24,10 @@ $(MAN_PAGES): files/%: doc/%.txt doc/asciidoc.conf Makefile catalyst |
21 |
files/catalyst.1: doc/subarches.generated.txt |
22 |
files/catalyst-spec.5: doc/subarches.generated.txt doc/targets.generated.txt |
23 |
|
24 |
-doc/subarches.generated.txt: $(wildcard arch/*.py) doc/make_subarch_table_guidexml.py |
25 |
+doc/subarches.generated.txt: $(wildcard catalyst/arch/*.py) doc/make_subarch_table_guidexml.py |
26 |
./doc/make_subarch_table_guidexml.py |
27 |
|
28 |
-doc/targets.generated.txt: doc/make_target_table.py $(wildcard modules/*_target.py) |
29 |
+doc/targets.generated.txt: doc/make_target_table.py $(wildcard catalyst/targets/*.py) |
30 |
"./$<" > "$@" |
31 |
|
32 |
$(DOCS): files/%.html: doc/%.txt doc/asciidoc.conf Makefile |
33 |
|
34 |
diff --git a/doc/make_subarch_table_guidexml.py b/doc/make_subarch_table_guidexml.py |
35 |
index 16c8776..54e0a4a 100755 |
36 |
--- a/doc/make_subarch_table_guidexml.py |
37 |
+++ b/doc/make_subarch_table_guidexml.py |
38 |
@@ -1,5 +1,6 @@ |
39 |
#! /usr/bin/env python2 |
40 |
# Copyright (C) 2011 Sebastian Pipping <sebastian@×××××××.org> |
41 |
+# Copyright (C) 2013 Brian dolbec <dolsen@g.o> |
42 |
# Licensed under GPL v2 or later |
43 |
|
44 |
|
45 |
@@ -102,10 +103,12 @@ if __name__ == '__main__': |
46 |
subarch_title_to_subarch_id = dict() |
47 |
subarch_id_to_pattern_arch_genericrch_id = dict() |
48 |
|
49 |
- for (dirpath, dirnames, filenames) in os.walk('arch'): |
50 |
+ for (dirpath, dirnames, filenames) in os.walk('catalyst/arch'): |
51 |
for _fn in filenames: |
52 |
if not _fn.endswith('.py'): |
53 |
continue |
54 |
+ if _fn == '__init__.py': |
55 |
+ continue |
56 |
|
57 |
fn = os.path.join(dirpath, _fn) |
58 |
handle_file(fn, subarch_title_to_subarch_id, subarch_id_to_pattern_arch_genericrch_id) |
59 |
|
60 |
diff --git a/doc/make_target_table.py b/doc/make_target_table.py |
61 |
index ad4d292..9e7ebe8 100755 |
62 |
--- a/doc/make_target_table.py |
63 |
+++ b/doc/make_target_table.py |
64 |
@@ -1,16 +1,17 @@ |
65 |
#!/usr/bin/env python2 |
66 |
# Copyright (C) 2012 W. Trevor King <wking@××××××.edu> |
67 |
# Copyright (C) 2012 Sebastian Pipping <sebastian@×××××××.org> |
68 |
+# Copyright (C) 2013 Brian dolbec <dolsen@g.o> |
69 |
# Licensed under GPL v2 or later |
70 |
|
71 |
# This script should be run from the root of the catalyst source. |
72 |
+# source the testpath file then run "doc/make_target_table.py" |
73 |
+ |
74 |
|
75 |
from __future__ import print_function |
76 |
|
77 |
import sys as _sys |
78 |
|
79 |
-_sys.path.insert(0, 'modules') # so we can find the `catalyst` module |
80 |
- |
81 |
import glob |
82 |
import re |
83 |
|
84 |
@@ -20,15 +21,15 @@ def key_netboot_before_netboot2((target_name, module)): |
85 |
|
86 |
|
87 |
if __name__ == '__main__': |
88 |
- extractor = re.compile('^modules/(([^ ]+)_target).py$') |
89 |
+ extractor = re.compile('^catalyst/targets/(([^ ]+)).py$') |
90 |
targets = list() |
91 |
- for filename in sorted(glob.glob('modules/*_target.py')): |
92 |
- if 'generic' in filename: |
93 |
+ for filename in sorted(glob.glob('catalyst/targets/*.py')): |
94 |
+ if '__init__' in filename: |
95 |
continue |
96 |
|
97 |
match = extractor.match(filename) |
98 |
target_name = match.group(2).replace('_', '-') |
99 |
- module_name = match.group(1) |
100 |
+ module_name = 'catalyst.targets.' + match.group(1) |
101 |
|
102 |
__import__(module_name) |
103 |
module = _sys.modules[module_name] |