Closed Bug 406862 Opened 12 years ago Closed 12 years ago
NSPR target release does not work with MSYS shell
The target "release" for NSPR uses a Windows-batch prmkdir.bat. The MSYS shell tries to run this batch file as a Unix-shell script.
Error message: making directory /E/security/securitytip/builds/20071203.1/nss-w2kp_WIN/nspr20/v4.6 ../config/prmkdir.bat: REM: command not found ../config/prmkdir.bat: REM: command not found ../config/prmkdir.bat: REM: command not found ../config/prmkdir.bat: REM: command not found ../config/prmkdir.bat: REM: command not found ../config/prmkdir.bat: line 6: syntax error near unexpected token `(t' ../config/prmkdir.bat: line 6: `REM 1.1 (the "License"); you may not use this file except in compliance with' make: *** [release] Error 2 make: Leaving directory `/E/security/securitytip/builds/20071203.1/nss-w2kp_WIN/mozilla/nsprpub/WINNT5.2_64_OPT.OBJ'
Proposed solutions: Solution #1: We could use $(NSINSTALL) -D as we do for Unix. This solution doesn't work if MDIST is like \\server\share. Solution #2: We could use "mkdir" from the current shell. This works with MKS, CygWin and MSYS, even with //server/share. Solution #3: We could run prmkdir.bat through cmd.exe (from the variable $(COMSPEC)). This is a bit complicated because: - we have to replace the \ in $(COMPSEC) with \\. - in the case of CygWin and MSYS, we have to change the directory name to extract the drive letter (if present - like /C/) and replace it with drive:\\ (like C:\\) The solution #2 seems to be the simplest and works in all tested cases (W-PATH, UX-PATH, SERVER-PATH x MKS, CYGWIN, MSYS) . Is there any reason why we shouldn't use it ?
I don't see any reason not to use #2, but there may be a reason for the existence of prmkdir.bat . Wan-Teh, can you please comment on that ?
I tested this with cygwin and MSYS successfully.
Attachment #292879 - Flags: review?(christophe.ravel.bugs)
Attachment #292879 - Flags: review?(christophe.ravel.bugs) → review+
Please cvs remove prmkdir.bat, too. prmkdir.bat allows us to invoke the DOS mkdir command from a makefile. I don't remember why I had to use the DOS mkdir command. The reason might be documented in the CVS commit log of the NSPR source tree in the old Netscape /m/src CVS repository, which Sun has a copy. It may be because the mkdir command of MKS or even shmsdos.exe did not support a pathname like \\server\share.
Wan-Teh, Christophe tested the \\server\share pathname (with //server/share) and i worked with MKS . I removed prmkdir.bat on the trunk. Checking in Makefile.in; /cvsroot/mozilla/nsprpub/Makefile.in,v <-- Makefile.in new revision: 1.24; previous revision: 1.23 done Removing config/prmkdir.bat; /cvsroot/mozilla/nsprpub/config/prmkdir.bat,v <-- prmkdir.bat new revision: delete; previous revision: 3.4 done
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.