@@ -279,22 +279,7 @@ def main():
279279 os .unlink (frozen_c )
280280 os .rename (backup , frozen_c )
281281
282- # windows gets different treatment
283- if win :
284- # Taking a shortcut here...
285- import winmakemakefile
286- outfp = open (makefile , 'w' )
287- try :
288- winmakemakefile .makemakefile (outfp ,
289- locals (),
290- [frozenmain_c ,
291- os .path .basename (frozen_c )],
292- os .path .basename (target ))
293- finally :
294- outfp .close ()
295- return
296-
297- # generate config.c and Makefile
282+ # look for unfrozen modules (builtin and of unknown origin)
298283 builtins = []
299284 unknown = []
300285 mods = dict .keys ()
@@ -307,17 +292,36 @@ def main():
307292 else :
308293 unknown .append (mod )
309294
295+ # search for unknown modules in extensions directories (not on Windows)
310296 addfiles = []
311- if unknown :
297+ if unknown and not win :
312298 addfiles , addmods = \
313299 checkextensions .checkextensions (unknown , extensions )
314300 for mod in addmods :
315301 unknown .remove (mod )
316302 builtins = builtins + addmods
303+
304+ # report unknown modules
317305 if unknown :
318306 sys .stderr .write ('Warning: unknown modules remain: %s\n ' %
319307 string .join (unknown ))
320308
309+ # windows gets different treatment
310+ if win :
311+ # Taking a shortcut here...
312+ import winmakemakefile
313+ outfp = open (makefile , 'w' )
314+ try :
315+ winmakemakefile .makemakefile (outfp ,
316+ locals (),
317+ [frozenmain_c ,
318+ os .path .basename (frozen_c )],
319+ os .path .basename (target ))
320+ finally :
321+ outfp .close ()
322+ return
323+
324+ # generate config.c and Makefile
321325 builtins .sort ()
322326 infp = open (config_c_in )
323327 backup = config_c + '~'
0 commit comments