SConscript (6878:c3a3c09af8be) SConscript (6925:a27441e3d106)
1# -*- mode:python -*-
2
3# Copyright (c) 2009 The Hewlett-Packard Development Company
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 73 unchanged lines hidden (view full) ---

82 slicc.findMachines()
83
84 print "SLICC Generator pass 2..."
85 slicc.generate()
86
87 print "SLICC writing C++ files..."
88 slicc.writeCodeFiles(pdir)
89
1# -*- mode:python -*-
2
3# Copyright (c) 2009 The Hewlett-Packard Development Company
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 73 unchanged lines hidden (view full) ---

82 slicc.findMachines()
83
84 print "SLICC Generator pass 2..."
85 slicc.generate()
86
87 print "SLICC writing C++ files..."
88 slicc.writeCodeFiles(pdir)
89
90 print "SLICC writing HTML files..."
91 slicc.writeHTMLFiles(hdir)
90 if env['NO_HTML']:
91 print "skipping HTML file creation"
92 else:
93 print "SLICC writing HTML files..."
94 slicc.writeHTMLFiles(hdir)
92 return target, source
93
94def slicc_action(target, source, env):
95 protocol = source[0].get_contents()
96 pdir = str(protocol_dir)
97 hdir = str(html_dir)
98
99 if not isdir(pdir):

--- 9 unchanged lines hidden (view full) ---

109 slicc.findMachines()
110
111 print "SLICC Generator pass 2..."
112 slicc.generate()
113
114 print "SLICC writing C++ files..."
115 slicc.writeCodeFiles(pdir)
116
95 return target, source
96
97def slicc_action(target, source, env):
98 protocol = source[0].get_contents()
99 pdir = str(protocol_dir)
100 hdir = str(html_dir)
101
102 if not isdir(pdir):

--- 9 unchanged lines hidden (view full) ---

112 slicc.findMachines()
113
114 print "SLICC Generator pass 2..."
115 slicc.generate()
116
117 print "SLICC writing C++ files..."
118 slicc.writeCodeFiles(pdir)
119
117 print "SLICC writing HTML files..."
118 slicc.writeHTMLFiles(hdir)
120 if env['NO_HTML']:
121 print "skipping HTML file creation"
122 else:
123 print "SLICC writing HTML files..."
124 slicc.writeHTMLFiles(hdir)
119
120slicc_builder = Builder(action=slicc_action, emitter=slicc_emitter)
121
122protocol = env['PROTOCOL']
123sources = [ protocol_dir.File("RubySlicc_interfaces.slicc"),
124 protocol_dir.File("%s.slicc" % protocol) ]
125
126env.Append(BUILDERS={'SLICC' : slicc_builder})
127nodes = env.SLICC([], [ Value(protocol) ] + sources)
128env.Depends(nodes, slicc_depends)
129
130for f in nodes:
131 s = str(f)
132 if s.endswith('.cc'):
133 Source(f)
134 elif s.endswith('.py'):
135 SimObject(f)
136
125
126slicc_builder = Builder(action=slicc_action, emitter=slicc_emitter)
127
128protocol = env['PROTOCOL']
129sources = [ protocol_dir.File("RubySlicc_interfaces.slicc"),
130 protocol_dir.File("%s.slicc" % protocol) ]
131
132env.Append(BUILDERS={'SLICC' : slicc_builder})
133nodes = env.SLICC([], [ Value(protocol) ] + sources)
134env.Depends(nodes, slicc_depends)
135
136for f in nodes:
137 s = str(f)
138 if s.endswith('.cc'):
139 Source(f)
140 elif s.endswith('.py'):
141 SimObject(f)
142