@@ -23,14 +23,6 @@ def generate_documentation(dirs, output_dir):
23
23
proc .stdin .close ()
24
24
proc .wait ()
25
25
26
- MATCH_NAMESPACE = compile (r'^namespace.*' )
27
-
28
- def find_namespace (contents ):
29
- for num , line in enumerate (contents .split ("\n " )):
30
- if MATCH_NAMESPACE .match (line ):
31
- return num + 1
32
- return 0
33
-
34
26
EXCLUDES = ["targets" , "features/FEATURE" , "features/mbedtls" ,
35
27
"features/nanostack" , "features/storage" ]
36
28
@@ -48,28 +40,6 @@ def is_not_excluded(src):
48
40
from tools .targets import TARGET_MAP
49
41
toolchain = GCC_ARM (TARGET_MAP ["Super_Target" ])
50
42
resources = toolchain .scan_resources ("." )
51
- for src in filter (is_not_excluded , resources .headers ):
52
- if len (src .split (sep )) > 2 :
53
- name = src .split (sep )[1 ]
54
- if name == "features" :
55
- name = src .split (sep )[2 ]
56
- with open (src ) as fd :
57
- contents = fd .read ()
58
- with open (src , "w+" ) as fd :
59
- insert_at = find_namespace (contents )
60
- before = "\n " .join (contents .split ("\n " )[:insert_at ])
61
- after = "\n " .join (contents .split ("\n " )[insert_at :])
62
- fd .write ("{:s}\n /** \\ addtogroup {:s} */\n /** @{{*/\n {:s}\n /** @}}*/\n " .format (before ,name ,after ))
63
- for name , res in resources .features .iteritems ():
64
- for src in filter (is_not_excluded , res .headers ):
65
- with open (src ) as fd :
66
- contents = fd .read ()
67
- with open (src , "w+" ) as fd :
68
- insert_at = find_namespace (contents )
69
- before = "\n " .join (contents .split ("\n " )[:insert_at ])
70
- after = "\n " .join (contents .split ("\n " )[insert_at :])
71
- fd .write ("{:s}\n /** \\ addtogroup FEATURE_{:s} */\n /** @{{*/\n {:s}\n /** @}}*/\n " .format (before ,name ,after ))
72
-
73
43
generate_documentation (filter (is_not_excluded ,
74
44
sum (map (lambda x :x .headers ,
75
45
resources .features .values ()),
0 commit comments