@@ -1187,13 +1187,19 @@ def construct_target_rel_paths(self, t: T.Union[build.Target, build.CustomTarget
11871187 return outputs
11881188
11891189 def generate_depmf_install (self , d : InstallData ) -> None :
1190- if self .build .dep_manifest_name is None :
1191- return
1190+ depmf_path = self .build .dep_manifest_name
1191+ if depmf_path is None :
1192+ option_dir = self .environment .coredata .get_option (OptionKey ('licensedir' ))
1193+ assert isinstance (option_dir , str ), 'for mypy'
1194+ if option_dir :
1195+ depmf_path = os .path .join (option_dir , 'depmf.json' )
1196+ else :
1197+ return
11921198 ifilename = os .path .join (self .environment .get_build_dir (), 'depmf.json' )
1193- ofilename = os .path .join (self .environment .get_prefix (), self . build . dep_manifest_name )
1194- odirname = os .path .join (self .environment .get_prefix (), os .path .dirname (self . build . dep_manifest_name ))
1195- out_name = os .path .join ('{prefix}' , self . build . dep_manifest_name )
1196- out_dir = os .path .join ('{prefix}' , os .path .dirname (self . build . dep_manifest_name ))
1199+ ofilename = os .path .join (self .environment .get_prefix (), depmf_path )
1200+ odirname = os .path .join (self .environment .get_prefix (), os .path .dirname (depmf_path ))
1201+ out_name = os .path .join ('{prefix}' , depmf_path )
1202+ out_dir = os .path .join ('{prefix}' , os .path .dirname (depmf_path ))
11971203 mfobj = {'type' : 'dependency manifest' , 'version' : '1.0' ,
11981204 'projects' : {k : v .to_json () for k , v in self .build .dep_manifest .items ()}}
11991205 with open (ifilename , 'w' , encoding = 'utf-8' ) as f :
0 commit comments