tools/userland-mangler
changeset 2171 b7344f27cbbc
parent 2153 f64a9f4ada4d
child 4973 be26c0c14fa7
equal deleted inserted replaced
2170:0be434f30a4f 2171:b7344f27cbbc
   215 #
   215 #
   216 def mangle_cddl(manifest, action, text):
   216 def mangle_cddl(manifest, action, text):
   217 	strip_cddl = action.attrs.pop('mangler.strip_cddl', 'true')
   217 	strip_cddl = action.attrs.pop('mangler.strip_cddl', 'true')
   218 	if strip_cddl is 'false':
   218 	if strip_cddl is 'false':
   219 		return text
   219 		return text
   220 	cddl_re = re.compile('^[^\n]*CDDL HEADER START.+CDDL HEADER END[^\n]*$',
   220 	cddl_re = re.compile('^[^\n]*CDDL HEADER START.+CDDL HEADER END[^\n]*\n',
   221 			     re.MULTILINE|re.DOTALL)
   221 			     re.MULTILINE|re.DOTALL)
   222 	return cddl_re.sub('', text)
   222 	return cddl_re.sub('', text)
   223 
   223 
   224 def mangle_path(manifest, action, src, dest):
   224 def mangle_path(manifest, action, src, dest):
   225 	if elf.is_elf_object(src):
   225 	if elf.is_elf_object(src):