Topic: Double " in makefile

I believe you told me a while ago, Jeff, that a strange quirk with Windows can cause the makefile to produce strings with double-double inverted commas. 

In my current project, and using SF 1.25, all was well, building and re-building normally, until after a cold re-boot.  Then, when attempting a re-build, I obtained this error:

===============================================
Open Watcom Make Version 1.9
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
    ""C:\Program Files (x86)\Fortran\Simply\mingw\bin\gfortran.exe"" -c -o build\rMatls.o -g -mtune=core2 -IC:/PROGRA~2/Fortran/Simply/mingw/include/ -IG:/InStruct/../MODULES -IG:/InStruct/../INCLUDE -fdollar-ok  -Jmodules .\Source\rMatls.for
4NT: Unknown command "C:\Program"
Error(E42): Last command making (build\rMatls.o) returned a bad status
===============================================


Looking at the makefile, I found this code in the first few lines:

#
# Automagically generated by Approximatrix Simply Fortran
#
FC=""C:\Program Files (x86)\Fortran\Simply\mingw\bin\gfortran.exe""
CC=""C:\Program Files (x86)\Fortran\Simply\mingw\bin\gcc.exe""
AR="F:\mingw\bin\ar.exe"
TOUCH=""C:\Program Files (x86)\Fortran\Simply\fwin\wtouch.exe""
RM=del

IDIR=-IC:/PROGRA~2/Fortran/Simp.....


Checking the currently-set options I found these strings saved:
Make location
C:\Program Files (x86)\Fortran\Simply\fwin\wmake.exe
Touch location
C:\Program Files (x86)\Fortran\Simply\fwin\wtouch.exe
Compiler location
C:\Program Files (x86)\Fortran\Simply\mingw\bin\gfortran.exe
AR location
F:\mingw\bin\ar.exe

I can solve this by two methods.  One is to correct the makefile manually and deselect the project option to regenerate it.  The other is to chnge my options settings to use my F:\ virtual drive path for all locations, thus:
Make location
F:\fwin\wmake.exe
Touch location
F:\fwin\wtouch.exe
Compiler location
F:\mingw\bin\gfortran.exe
AR location
F:\mingw\bin\ar.exe

(For other readers' benefit, I use a Win Doze utility to assign the path
"C:\Program Files (x86)\Fortran\Simply" to a virtual drive I call "F:\")

It is odd that this problem 'went away' after the last time I reported it and has only come back after a cold reboot.  As bfore, I've found a way to make it 'go away' again, but you might want to look into it, Jeff.
----
John

Re: Double " in makefile

John,

The problem you're experiencing is because you have an alternative command shell, 4NT, installed.  The double-quotes are necessary for everyone who uses the standard Windows command shell, CMD.EXE, and have Simply Fortran installed in a path containing parentheses.  The occurrence of double quotes is not a bug; on the contrary, their presence is quite deliberate. 

If I recall correctly, you have mapped drives to your Simply Fortran installation.  After a reboot, I would guess that the drive mappings aren't reinitializing.  Simply Fortran versions since 1.24 now have a sanity check at startup to determine if the paths to the compilers are valid.  If the stored path isn't valid (for example, if a drive mapping isn't functioning), Simply Fortran attempts to locate the compilers itself and internally resets the paths. 

There are a few solutions to your problem:

1.  You could uninstall 4NT, which, I'm guessing, you don't wish to do.  A fix for dealing with alternate command shells is in the works, but it involves changes to Open Watcom's wmake, not Simply Fortran.

2.  You could ensure the drive mappings persist before starting Simply Fortran.  I'm not sure how to do this other than manually navigating to the drives using Windows explorer, which is tedious.

3.  You could install Simply Fortran into a different directory.  Any directory that doesn't contain parentheses would fix your issue immediately.  I would suggest "C:\SimplyFortran" or even "C:\Program Files\Simply Fortran" although the latter violates Windows' arbitrary rule of only installing 64-bit applications to "C:\Program Files."

I apologize for the issue you're seeing, but edge cases can be difficult to deal with on occasion.  I am aware of the problem, however, and I'm working on it.

Jeff Armstrong
Approximatrix, LLC

Re: Double " in makefile

Ah yes, I remember!  I had completely forgotten it was because I'd changed the command shell.  Sorry for asking the same question twice!
---
J.

Re: Double " in makefile

John,

I'm glad you posed the question to the forum.  If anyone else is having a similar issue, they might gain something by it being posted here.

Jeff Armstrong
Approximatrix, LLC