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