Topic: Clean and rebuild directory error in Makefile
Clean and rebuild directory error in Makefile
After reading the reports, and Jeff's advice, on the matter captioned, "Questions on debugger and code optimization", I tried to overcome my own version of the same problem by using 'Clean'.
My project CLEANs and re-compiles/rebuilds as before.
It also uses a static library I created a while ago called, 'iolib'.
I therefore re-opened iolib.prj and CLEANed that as well.
I expected this to work smoothly, and I planned to rebuild it then go back to teh main project, CLEAN that again, then re-compile/rebuild, and try the debugger again.
When trying to re-compile/rebuild my iolib library, however, it failed unexpectedly.
The BUILD STATUS error message was this:
---------------start----------------
Open Watcom Make Version 1.9 (Built on May 17 2012)
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\SF\mingw-w64\bin\ar.exe"rcs "..\Libs\ioLib32.a" "build\AInput.o" "build\Banner.o" "build\biofix.o" "build\Commas.o" "build\config.o" "build\Disp.o" "build\Error.o" "build\ff.o" "build\FIF.o" "build\FindChr.o" "build\I2Char.o" "build\IIF.o" "build\IInput.o" "build\Indent.o" "build\LenStr.o" "build\LF.o" "build\LStri.o" "build\LTrim.o" "build\OpenE.o" "build\Opener.o" "build\OpenI.o" "build\OpenO.o" "build\PadStr.o" "build\page.o" "build\Prompt.o" "build\R2Char.o" "build\RInput.o" "build\RStri.o" "build\Send.o" "build\SkipChr.o" "build\UndLin.o" "build\VerLib.o" "build\write.o" "..\LIBS\disgf.a"
C:\Program Files (x86)\Fortran\SF\mingw-w64\bin\ar.exercs: invalid option -- .
Usage: C:\Program Files (x86)\Fortran\SF\mingw-w64\bin\ar.exercs [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [member-name] [count] archive-file file...
C:\Program Files (x86)\Fortran\SF\mingw-w64\bin\ar.exercs -M [<mri-script]
commands:
d - delete file(s) from the archive
m[ab] - move file(s) in the archive
p - print file(s) found in the archive
q[f] - quick append file(s) to the archive
r[ab][f] - replace existing or insert new file(s) into the archive
s - act as ranlib
t - display contents of archive
x[o] - extract file(s) from the archive
command specific modifiers:
[a] - put file(s) after [member-name]
[D] - use zero for timestamps and uids/gids
[N] - use instance [count] of name
[f] - truncate inserted file names
[P] - use full path names when matching
[o] - preserve original dates
generic modifiers:
[c] - do not warn if the library had to be created
[s] - create an archive index (cf. ranlib)
[S] - do not build a symbol table
[T] - make a thin archive
[v] - be verbose
[V] - display the version number
@<file> - read options from <file>
--target=BFDNAME - specify the target object format as BFDNAME
emulation options:
No emulation specific options
C:\Program Files (x86)\Fortran\SF\mingw-w64\bin\ar.exercs: supported targets: pe-x86-64 pei-x86-64 elf64-x86-64 elf64-l1om elf64-k1om pe-i386 pei-i386 elf32-i386 elf64-little elf64-big elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex
Error(E42): Last command making (..\Libs\ioLib32.a) returned a bad status
Error(E02): Make execution terminated
---------------end-----------------
I therefore examined the Makefile.
Here it is:
---------------start----------------
#
# Automagically generated by Approximatrix Simply Fortran
#
FC="C:\Program Files (x86)\Fortran\SF\mingw-w64\bin\gfortran.exe"
CC="C:\Program Files (x86)\Fortran\SF\mingw-w64\bin\gcc.exe"
AR="C:\Program Files (x86)\Fortran\SF\mingw-w64\bin\ar.exe"
TOUCH="C:\Program Files (x86)\Fortran\SF\fwin\wtouch.exe"
WRC="C:\PROGRA~2\FORTRAN\SF\MINGW-~1\bin\windres.exe"
RM=del
IDIR=-IG:/IoLib/../INCLUDE -IG:/IoLib/../MODULES
# -I error: Directory C:\Program Files (x86)\Fortran\SF\mingw-w64\include\ does not exist
LDIR=-LC:/PROGRA~2/Fortran/SF/MINGW-~1/lib/ -LG:/IoLib/./modules -LG:/IoLib/../LIBS
SPECIALFLAGS=-g -m32 $(IDIR)
RCFLAGS=-O coff -F pe-i386
PRJ_FFLAGS=-fdollar-ok
PRJ_CFLAGS=
PRJ_LFLAGS=
FFLAGS=$(SPECIALFLAGS) $(PRJ_FFLAGS) -Jmodules
CFLAGS=-g -m32 $(IDIR) $(PRJ_CFLAGS)
"build\AInput.o": ".\Source\AInput.for"
$(FC) -c -o "build\AInput.o" $(FFLAGS) ".\Source\AInput.for"
"build\Banner.o": ".\Source\Banner.for"
$(FC) -c -o "build\Banner.o" $(FFLAGS) ".\Source\Banner.for"
"build\biofix.o": ".\Source\biofix.for"
$(FC) -c -o "build\biofix.o" $(FFLAGS) ".\Source\biofix.for"
"build\Commas.o": ".\Source\Commas.for"
$(FC) -c -o "build\Commas.o" $(FFLAGS) ".\Source\Commas.for"
"build\config.o": ".\Source\config.for"
$(FC) -c -o "build\config.o" $(FFLAGS) ".\Source\config.for"
"build\Disp.o": ".\Source\Disp.for"
$(FC) -c -o "build\Disp.o" $(FFLAGS) ".\Source\Disp.for"
"build\Error.o": ".\Source\Error.for"
$(FC) -c -o "build\Error.o" $(FFLAGS) ".\Source\Error.for"
"build\ff.o": ".\Source\ff.for"
$(FC) -c -o "build\ff.o" $(FFLAGS) ".\Source\ff.for"
"build\FIF.o": ".\Source\FIF.for"
$(FC) -c -o "build\FIF.o" $(FFLAGS) ".\Source\FIF.for"
"build\FindChr.o": ".\Source\FindChr.for"
$(FC) -c -o "build\FindChr.o" $(FFLAGS) ".\Source\FindChr.for"
"build\I2Char.o": ".\Source\I2Char.for"
$(FC) -c -o "build\I2Char.o" $(FFLAGS) ".\Source\I2Char.for"
"build\IIF.o": ".\Source\IIF.for"
$(FC) -c -o "build\IIF.o" $(FFLAGS) ".\Source\IIF.for"
"build\IInput.o": ".\Source\IInput.for"
$(FC) -c -o "build\IInput.o" $(FFLAGS) ".\Source\IInput.for"
"build\Indent.o": ".\Source\Indent.for"
$(FC) -c -o "build\Indent.o" $(FFLAGS) ".\Source\Indent.for"
"build\LenStr.o": ".\Source\LenStr.for"
$(FC) -c -o "build\LenStr.o" $(FFLAGS) ".\Source\LenStr.for"
"build\LF.o": ".\Source\LF.for"
$(FC) -c -o "build\LF.o" $(FFLAGS) ".\Source\LF.for"
"build\LStri.o": ".\Source\LStri.for"
$(FC) -c -o "build\LStri.o" $(FFLAGS) ".\Source\LStri.for"
"build\LTrim.o": ".\Source\LTrim.for"
$(FC) -c -o "build\LTrim.o" $(FFLAGS) ".\Source\LTrim.for"
"build\OpenE.o": ".\Source\OpenE.for"
$(FC) -c -o "build\OpenE.o" $(FFLAGS) ".\Source\OpenE.for"
"build\Opener.o": ".\Source\Opener.for"
$(FC) -c -o "build\Opener.o" $(FFLAGS) ".\Source\Opener.for"
"build\OpenI.o": ".\Source\OpenI.for"
$(FC) -c -o "build\OpenI.o" $(FFLAGS) ".\Source\OpenI.for"
"build\OpenO.o": ".\Source\OpenO.for"
$(FC) -c -o "build\OpenO.o" $(FFLAGS) ".\Source\OpenO.for"
"build\PadStr.o": ".\Source\PadStr.for"
$(FC) -c -o "build\PadStr.o" $(FFLAGS) ".\Source\PadStr.for"
"build\page.o": ".\Source\page.for"
$(FC) -c -o "build\page.o" $(FFLAGS) ".\Source\page.for"
"build\Prompt.o": ".\Source\Prompt.for"
$(FC) -c -o "build\Prompt.o" $(FFLAGS) ".\Source\Prompt.for"
"build\R2Char.o": ".\Source\R2Char.for"
$(FC) -c -o "build\R2Char.o" $(FFLAGS) ".\Source\R2Char.for"
"build\RInput.o": ".\Source\RInput.for"
$(FC) -c -o "build\RInput.o" $(FFLAGS) ".\Source\RInput.for"
"build\RStri.o": ".\Source\RStri.for"
$(FC) -c -o "build\RStri.o" $(FFLAGS) ".\Source\RStri.for"
"build\Send.o": ".\Source\Send.for"
$(FC) -c -o "build\Send.o" $(FFLAGS) ".\Source\Send.for"
"build\SkipChr.o": ".\Source\SkipChr.for"
$(FC) -c -o "build\SkipChr.o" $(FFLAGS) ".\Source\SkipChr.for"
"build\UndLin.o": ".\Source\UndLin.for"
$(FC) -c -o "build\UndLin.o" $(FFLAGS) ".\Source\UndLin.for"
"build\VerLib.o": ".\Source\VerLib.for"
$(FC) -c -o "build\VerLib.o" $(FFLAGS) ".\Source\VerLib.for"
"build\write.o": ".\Source\write.for"
$(FC) -c -o "build\write.o" $(FFLAGS) ".\Source\write.for"
clean: .SYMBOLIC
$(RM) "build\AInput.o"
$(RM) "build\Banner.o"
$(RM) "build\biofix.o"
$(RM) "build\Commas.o"
$(RM) "build\config.o"
$(RM) "build\Disp.o"
$(RM) "build\Error.o"
$(RM) "build\ff.o"
$(RM) "build\FIF.o"
$(RM) "build\FindChr.o"
$(RM) "build\I2Char.o"
$(RM) "build\IIF.o"
$(RM) "build\IInput.o"
$(RM) "build\Indent.o"
$(RM) "build\LenStr.o"
$(RM) "build\LF.o"
$(RM) "build\LStri.o"
$(RM) "build\LTrim.o"
$(RM) "build\OpenE.o"
$(RM) "build\Opener.o"
$(RM) "build\OpenI.o"
$(RM) "build\OpenO.o"
$(RM) "build\PadStr.o"
$(RM) "build\page.o"
$(RM) "build\Prompt.o"
$(RM) "build\R2Char.o"
$(RM) "build\RInput.o"
$(RM) "build\RStri.o"
$(RM) "build\Send.o"
$(RM) "build\SkipChr.o"
$(RM) "build\UndLin.o"
$(RM) "build\VerLib.o"
$(RM) "build\write.o"
$(RM) "..\Libs\ioLib32.a"
"..\Libs\ioLib32.a": "build\AInput.o" "build\Banner.o" "build\biofix.o" "build\Commas.o" "build\config.o" "build\Disp.o" "build\Error.o" "build\ff.o" "build\FIF.o" "build\FindChr.o" "build\I2Char.o" "build\IIF.o" "build\IInput.o" "build\Indent.o" "build\LenStr.o" "build\LF.o" "build\LStri.o" "build\LTrim.o" "build\OpenE.o" "build\Opener.o" "build\OpenI.o" "build\OpenO.o" "build\PadStr.o" "build\page.o" "build\Prompt.o" "build\R2Char.o" "build\RInput.o" "build\RStri.o" "build\Send.o" "build\SkipChr.o" "build\UndLin.o" "build\VerLib.o" "build\write.o" "..\LIBS\disgf.a"
$(AR)rcs "..\Libs\ioLib32.a" "build\AInput.o" "build\Banner.o" "build\biofix.o" "build\Commas.o" "build\config.o" "build\Disp.o" "build\Error.o" "build\ff.o" "build\FIF.o" "build\FindChr.o" "build\I2Char.o" "build\IIF.o" "build\IInput.o" "build\Indent.o" "build\LenStr.o" "build\LF.o" "build\LStri.o" "build\LTrim.o" "build\OpenE.o" "build\Opener.o" "build\OpenI.o" "build\OpenO.o" "build\PadStr.o" "build\page.o" "build\Prompt.o" "build\R2Char.o" "build\RInput.o" "build\RStri.o" "build\Send.o" "build\SkipChr.o" "build\UndLin.o" "build\VerLib.o" "build\write.o" "..\LIBS\disgf.a" $(PRJ_LFLAGS)
all: "..\Libs\ioLib32.a" .SYMBOLIC
---------------end-----------------
I noticed it has this in it, near the top:
IDIR=-IG:/IoLib/../INCLUDE -IG:/IoLib/../MODULES
# -I error: Directory C:\Program Files (x86)\Fortran\SF\mingw-w64\include\ does not exist
I therefore looked at the directory structure.
I should explain that
(i) I always install Simply Fortran in this location:
c:\Program Files (x86)\FORTRAN\SF\{all the simply fortran subdirectories}
(ii) I map this pathname to what I call my F:\ drive to .
(iii) I map my project directories to what I call my G:\ drive.
When I looked inside the SF subdirectories, I noticed that the error message appearing in the makefile was indeed correct.
That is to say, Directory C:\Program Files (x86)\Fortran\SF\mingw-w64\include\ does not exist
I dug deeper, and found that there IS an 'incllude' subdirectory, but one layer deeper.
There are two, in fact:
c:\Program Files (x86)\FORTRAN\SF\mingw-w64\mingw\include\
c:\Program Files (x86)\FORTRAN\SF\mingw-w64\x86_64-w64-mingw32\include\
I got no further.
---
John