1 (edited by JohnWasilewski 2014-09-19 01:09:53)

Topic: What is 'rm'?

When I clean my current project, I've been getting this error message at the end of the clean narrative, for about the last couple of weeks.  It seems not to matter because CLEAN seems still to be successful, but I'd like to get rid of it if I could find out how to do so.

:
:
:
Deleting .\build64\WinINIT.o and related files
Deleting .\build64\WinMenus.o and related files
Deleting .\build64\WinSCR.o and related files
Deleting default icon resource
Deleting Instruct(64bit).SF.exe
'rm' is not recognized as an internal or external command,
operable program or batch file.
Error(E42): Last command making (clean) returned a bad status
Error(E02): Make execution terminated

* Failed *



In case it's relevant, I've also noticed that my Makefile begins like this:

#
# Automagically generated by Approximatrix Simply Fortran 2.16
#
FC="C:\Program Files (x86)\Fortran\SF2\mingw-w64\bin\gfortran.exe"
CC="C:\Program Files (x86)\Fortran\SF2\mingw-w64\bin\gcc.exe"
AR="C:\Program Files (x86)\Fortran\SF2\mingw-w64\bin\ar.exe"
WRC="C:\PROGRA~2\Fortran\SF2\MINGW-~1\bin\windres.exe"
RM=rm -f
:
:
:
:

----
John

Re: What is 'rm'?

John,

The rm command inside the Makefile is equivalent to del at the prompt.  The rm command should be caught by the make system, and a file delete performed.

It would appear, however, that it is attempting to execute rm through the command shell.   I'm guessing this is occurring because you've put parentheses in your executable name.  This behavior is a bug; the make system should be catching and translating the rm command regardless of the arguments. However, I would advise against using parentheses in your target name in general as many Windows programs do not handle such filenames properly (even though they should, like wmake.exe for example).

I'll look at the code and get wmake.exe, Simply Fortran's  make system, fixed up.

Jeff Armstrong
Approximatrix, LLC

3 (edited by JohnWasilewski 2014-09-19 14:30:38)

Re: What is 'rm'?

Yep, thanks Jeff, my target executables (in) two makefiles both in the same project were named as, "InStruct(64bit).SF.exe" and "InStruct(32bit).SF.exe".

It all worked, save for the 'rm' error when using the 'Clean' command, which seemed not to matter - though I'd guess in certain circumstances it would do.

I've changed the target executables to "InStruct64.exe" and "InStruct32.exe".
After regenerating the Makefile with the amended and saved options with the revised target executable names, this eliminates the error message when using 'Clean'.

I'm glad I found it though, if this enables you to pick up another small thing that you are able to fix.
---
John

Re: What is 'rm'?

John,

Yes, thanks for this report.  These small errors can be tricky to find.

It's now fixed in the development version, and I'll try to get a new build out of 2.16 including this fix next week.  The issue was that the make system was not respecting quotes when detecting if what it thought were special characters were present in the command string.

Jeff Armstrong
Approximatrix, LLC