wutingcindy / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

Windows: --generator-output=dir fails to create output directories #199

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Windows: --generator-output=dir fails to create output directories

When I use --generator-output=dir to specify an output folder to gyp generated 
files, it doesn't create the output directory, and fails.

This may be a windows only issue, I know it doesn't happen on Mac.

What steps will reproduce the problem?
1. On windows, in test\generator-output\src run "..\..\..\gyp.bat 
--generator-output=gypfiles prog1.gyp"

What is the expected output? What do you see instead?

The following error are reported, and the gypfiles folder isn't created. Also 
the warning messages indicate that it is looking in the wrong place for 
subproject files.

=====================================================
C:\caustic\git\seng.git\Code\Import\gyp\test\generator-output\src>..\..\..\gyp.b
at --generator-output=gypfiles prog1.gyp
Warning: Missing input file ..\..\subdir2\gypfiles\subdir2\..\..\subdir2\prog2.c
Warning: Missing input file 
..\..\subdir2\gypfiles\subdir2\..\..\..\..\generator-output\src\subdir2\prog2.gy
p
Warning: Missing input file ..\..\subdir3\gypfiles\subdir3\..\..\subdir3\prog3.c
Warning: Missing input file 
..\..\subdir3\gypfiles\subdir3\..\..\..\..\generator-output\src\subdir3\prog3.gy
p
Warning: Missing input file ..\gypfiles\..\prog1.c
Warning: Missing input file ..\gypfiles\..\..\src\prog1.gyp
Traceback (most recent call last):
  File "C:\caustic\git\seng.git\Code\Import\gyp\/gyp", line 18, in <module>
    sys.exit(gyp.main(sys.argv[1:]))
  File "C:\caustic\git\seng.git\Code\Import\gyp\pylib\gyp\__init__.py", line 467, in main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "C:\caustic\git\seng.git\Code\Import\gyp\pylib\gyp\generator\msvs.py", line 1667, in GenerateOutput
    version=msvs_version)
  File "C:\caustic\git\seng.git\Code\Import\gyp\pylib\gyp\MSVSNew.py", line 206, in __init__
    self.Write()
  File "C:\caustic\git\seng.git\Code\Import\gyp\pylib\gyp\MSVSNew.py", line 246, in Write
    f = writer(self.path)
  File "C:\caustic\git\seng.git\Code\Import\gyp\pylib\gyp\common.py", line 326, in WriteOnDiff
    return Writer()
  File "C:\caustic\git\seng.git\Code\Import\gyp\pylib\gyp\common.py", line 273, in __init__
    dir=os.path.split(filename)[0])
  File "c:\Python27\lib\tempfile.py", line 293, in mkstemp
    return _mkstemp_inner(dir, prefix, suffix, flags)
  File "c:\Python27\lib\tempfile.py", line 228, in _mkstemp_inner
    fd = _os.open(file, flags, 0600)
OSError: [Errno 2] No such file or directory: 
'gypfiles\\subdir2\\prog2.sln.gyp.27fnxm.tmp'
=====================================================

 I expect it to create the gypfiles folder and any necessary subfolders.

What version of the product are you using? On what operating system?

This issue was reproduced at svn r937 with Python 2.7 on Win7 x64.

Please provide any additional information below.

Original issue reported on code.google.com by mark.mac...@gmail.com on 7 Jul 2011 at 6:39

GoogleCodeExporter commented 9 years ago
the repro steps should read "..\..\..\gyp.bat --generator-output=gypfiles 
--depth=. prog1.gyp"

Original comment by mark.mac...@gmail.com on 7 Jul 2011 at 6:52