Borland Make Utility Issues

User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Borland Make Utility Issues

Post by Antonio Linares »

James,

I did some little changes in your files and it is working fine now.

I just emailed them to you

Code: Select all

#Borland make sample, (c) FiveTech Software 2005-2009

HBDIR=c:\xharbour
BCDIR=c:\bcc7
FWDIR=c:\fwh

#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH  = $(FWDIR)\include;$(HBDIR)\include
.path.C   = .\
.path.rc  = .\

#important: Use Uppercase for filenames extensions, in the next two rules!

PRG =        \
alert.PRG    \
one.PRG

#C =          \
#two.C                 

PROJECT    : Alert.exe

Alert.exe  : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) 
   echo off
   echo $(BCDIR)\lib\c0w32.obj + > b32.bc
   echo obj\alert.obj obj\one.obj + >> b32.bc
   echo $(OBJS), + >> b32.bc
   echo alert.exe, + >> b32.bc
   echo alert.map, + >> b32.bc
   echo $(FWDIR)\lib\FiveHx.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
   echo $(HBDIR)\lib\rtl.lib + >> b32.bc
   echo $(HBDIR)\lib\vm.lib + >> b32.bc
   echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
   echo $(HBDIR)\lib\lang.lib + >> b32.bc
   echo $(HBDIR)\lib\macro.lib + >> b32.bc
   echo $(HBDIR)\lib\rdd.lib + >> b32.bc
   echo $(HBDIR)\lib\dbfntx.lib + >> b32.bc
   echo $(HBDIR)\lib\dbfcdx.lib + >> b32.bc
   echo $(HBDIR)\lib\dbffpt.lib + >> b32.bc
   echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
   echo $(HBDIR)\lib\debug.lib + >> b32.bc
   echo $(HBDIR)\lib\common.lib + >> b32.bc
   echo $(HBDIR)\lib\pp.lib + >> b32.bc
   echo $(HBDIR)\lib\pcrepos.lib + >> b32.bc
   echo $(HBDIR)\lib\ct.lib + >> b32.bc
   echo $(HBDIR)\lib\zlib.lib + >> b32.bc
   echo $(HBDIR)\lib\hbzip.lib + >> b32.bc
   echo $(HBDIR)\lib\libmisc.lib + >> b32.bc
   echo $(HBDIR)\lib\tip.lib + >> b32.bc
   echo $(HBDIR)\lib\png.lib + >> b32.bc

   rem Uncomment these two lines to use Advantage RDD
   rem echo $(HBDIR)\lib\rddads.lib + >> b32.bc
   rem echo $(HBDIR)\lib\Ace32.lib + >> b32.bc

   echo $(BCDIR)\lib\cw32.lib + >> b32.bc
   echo $(BCDIR)\lib\import32.lib + >> b32.bc
   echo $(BCDIR)\lib\uuid.lib + >> b32.bc
   echo $(BCDIR)\lib\ws2_32.lib + >> b32.bc   
   echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\rasapi32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\gdiplus.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\shell32.lib, >> b32.bc

   IF EXIST Alert.res echo Alert.res >> b32.bc
   $(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
   del b32.bc

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /L /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
  $(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c

.C.OBJ:
  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
  echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
  $(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
  del tmp

#Alert.res : Alert.rc
#  $(BCDIR)\bin\brc32.exe -r Alert.rc
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Borland Make Utility Issues

Post by James Bott »

Antonio,

Thanks for spotting the two Main() functions. I missed that because I was ignoring it in my main app. There a PRG was getting compiled into the app that wasn't supposed to be and the app was running fine, so I ignored it. It the test case it was significant.

The only change you made to the make file I note is that you changed the path for the C files from .\obj to .\ . However, I have my C files in .\obj so I get this error when the path is changed:

Fatal: '.\alert.c' does not exist - don't know how to make it

Of course this is expected.

So I changed it back and it compiles fine. However, there is still a problem and perhaps the location of the C files is related. I still do not get a recompile when any PRG is changed. I am guessing that this is the line that looks for changes:

Alert.exe : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ)

Perhaps this is a path issue? Do the paths need to be added to the above, or is the make file supposed to already know where the OBJs and C files are? It seems to know elsewhere in the make file.

Where are the C files normally stored, with the PRGs or with the OBJs. Or someplace else?

The old Clipper RMake.exe was so easy compared to Borland's Make. Sigh.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Borland Make Utility Issues

Post by Antonio Linares »

James,

The paths are specified here (in the make file):

#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH = $(FWDIR)\include;$(HBDIR)\include
.path.C = .\
.path.rc = .\
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Borland Make Utility Issues

Post by James Bott »

Antonio,

Yes, I know that. But the make file is not checking the dates and times of the OBJs and the Cs against the PRGs when a PRG is changed. So either it is trying and it can't find the files, or it is not checking at all. I am trying to figure out which and how to fix it.

Try editing the One.prg file (just change the message displayed) and then try running the make file again. The old message will still be displayed and if you look at the date and time of the Alert.exe it will not have changed even though the One.prg was changed.

I am beginning to think it would be easier to write my own make file utility rather than trying to figure out Borland's make.exe works.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Borland Make Utility Issues

Post by James Bott »

Antonio,
Try editing the One.prg file (just change the message displayed) and then try running the make file again. The old message will still be displayed and if you look at the date and time of the Alert.exe it will not have changed even though the One.prg was changed.
Actually, I said this wrong.

The Alert.exe will be updated (it is recompiled) but the one.c and one.obj files are not updated. So the new Alert.exe is the same as the last one even though it was recompiled. I just did this again and here are my file dates and times:

Code: Select all

Alert.exe       4/17/2017 3.04 PM
Alert.prg       4/17/2017 3.02 PM
One.prg         4/17/2017 3:04 PM
\obj\One.c      4/17/2017 8:08 AM
\obj\One.obj    4/17/2017 8:08 AM
 
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Borland Make Utility Issues

Post by Antonio Linares »

Please post here your current make file
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Borland Make Utility Issues

Post by James Bott »

Antonio,

This is probably the same one I sent you in a zip file a couple of days ago. I don't think I have made any changes since then. Well, I may have made some changes then changed them back. Anyway this is the most current one.

James

Code: Select all

#Borland make sample, (c) FiveTech Software 2005-2009

HBDIR=c:\xharbour
BCDIR=c:\bcc7
FWDIR=c:\fwh

#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH  = $(FWDIR)\include;$(HBDIR)\include
.path.C   = .\obj
.path.rc  = .\

#important: Use Uppercase for filenames extensions, in the next two rules!

PRG =        \
alert.PRG    \
one.PRG

C =     \
alert.c \
one.c 
#two.C                 

PROJECT    : Alert.exe

Alert.exe  : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) 
   echo off
   echo $(BCDIR)\lib\c0w32.obj + > b32.bc
   echo obj\alert.obj obj\one.obj, + >> b32.bc
   #echo $(OBJS), + >> b32.bc
   echo alert.exe, + >> b32.bc
   echo alert.map, + >> b32.bc
   echo $(FWDIR)\lib\FiveHx.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
   echo $(HBDIR)\lib\rtl.lib + >> b32.bc
   echo $(HBDIR)\lib\vm.lib + >> b32.bc
   echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
   echo $(HBDIR)\lib\lang.lib + >> b32.bc
   echo $(HBDIR)\lib\macro.lib + >> b32.bc
   echo $(HBDIR)\lib\rdd.lib + >> b32.bc
   echo $(HBDIR)\lib\dbfntx.lib + >> b32.bc
   echo $(HBDIR)\lib\dbfcdx.lib + >> b32.bc
   echo $(HBDIR)\lib\dbffpt.lib + >> b32.bc
   echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
   echo $(HBDIR)\lib\debug.lib + >> b32.bc
   echo $(HBDIR)\lib\common.lib + >> b32.bc
   echo $(HBDIR)\lib\pp.lib + >> b32.bc
   echo $(HBDIR)\lib\pcrepos.lib + >> b32.bc
   echo $(HBDIR)\lib\ct.lib + >> b32.bc
   echo $(HBDIR)\lib\zlib.lib + >> b32.bc
   echo $(HBDIR)\lib\hbzip.lib + >> b32.bc
   echo $(HBDIR)\lib\libmisc.lib + >> b32.bc
   echo $(HBDIR)\lib\tip.lib + >> b32.bc
   echo $(HBDIR)\lib\png.lib + >> b32.bc

   rem Uncomment these two lines to use Advantage RDD
   rem echo $(HBDIR)\lib\rddads.lib + >> b32.bc
   rem echo $(HBDIR)\lib\Ace32.lib + >> b32.bc

   echo $(BCDIR)\lib\cw32.lib + >> b32.bc
   echo $(BCDIR)\lib\import32.lib + >> b32.bc
   echo $(BCDIR)\lib\uuid.lib + >> b32.bc
   echo $(BCDIR)\lib\ws2_32.lib + >> b32.bc   
   echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\rasapi32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\gdiplus.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\shell32.lib, >> b32.bc

   IF EXIST Alert.res echo Alert.res >> b32.bc
   $(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
   #del b32.bc

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /L /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
  $(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c

.C.OBJ:
  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
  echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
  $(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
  del tmp

#Alert.res : Alert.rc
#  $(BCDIR)\bin\brc32.exe -r Alert.rc
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
alerchster
Posts: 31
Joined: Mon Oct 22, 2012 4:43 pm

Re: Borland Make Utility Issues

Post by alerchster »

Hello James

You should change in your mak-file!

Code: Select all

.path.OBJ = .\obj
.path.PRG = .\
.path.CH  = $(FWDIR)\include;$(HBDIR)\include
#.path.C   = .\obj  thats is wrong, see  next line
.path.C   = .\
.path.rc  = .\

#important: Use Uppercase for filenames extensions, in the next two rules!

PRG =        \
alert.PRG    \
one.PRG

C =     \
#there you have note only files which source is in C-Code delete your lines alert.c and one.c
#two.C                 

PROJECT    : Alert.exe
# and rest of your mak-file
 
that's all - it will run fine!
Regards

Ing. Anton Lerchster
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Borland Make Utility Issues

Post by James Bott »

Anton,

Putting the C files in or not makes no difference. If a PRG is edited and saved, the C and OBJs are not regenerated. It just relinks the EXE without the changes using the old OBJs.

I can't figure out how to force the make file to check the date-time stamps and then recompile if needed.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Borland Make Utility Issues

Post by Antonio Linares »

James,

Please remove this:

C = \
alert.c \
one.c
#two.C

and this also:

Alert.exe : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Borland Make Utility Issues

Post by James Bott »

Antonio,

I had already tried that, but I just did it again and there is no difference.

I have tried each one of these variations:

Alert.exe : $(OBJS)
Alert.exe : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ)
Alert.exe : $(PRG:.PRG=.OBJ)

And I tried it without any of the above and none of those tests force recompiling of the OJBs and Cs.

Is it working for you?

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Borland Make Utility Issues

Post by Antonio Linares »

James,

These are working perfectly fine:

go.bat

Code: Select all

@if not exist obj mkdir obj
c:\bcc7\bin\make -f test.mak
test.mak

Code: Select all

#Borland make sample, (c) FiveTech Software 2005-2017

HBDIR=c:\xharbour
BCDIR=c:\bcc7
FWDIR=c:\fwh

#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH  = $(FWDIR)\include;$(HBDIR)\include
.path.C   = .\obj
.path.rc  = .\

PRG =        \
alert.prg    \
one.prg

PROJECT    : Alert.exe

Alert.exe  : $(PRG:.prg=.obj)
   echo off
   echo $(BCDIR)\lib\c0w32.obj + > b32.bc
   echo obj\alert.obj obj\one.obj, + >> b32.bc
   #echo $(OBJS), + >> b32.bc
   echo alert.exe, + >> b32.bc
   echo alert.map, + >> b32.bc
   echo $(FWDIR)\lib\FiveHx.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
   echo $(HBDIR)\lib\rtl.lib + >> b32.bc
   echo $(HBDIR)\lib\vm.lib + >> b32.bc
   echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
   echo $(HBDIR)\lib\lang.lib + >> b32.bc
   echo $(HBDIR)\lib\macro.lib + >> b32.bc
   echo $(HBDIR)\lib\rdd.lib + >> b32.bc
   echo $(HBDIR)\lib\dbfntx.lib + >> b32.bc
   echo $(HBDIR)\lib\dbfcdx.lib + >> b32.bc
   echo $(HBDIR)\lib\dbffpt.lib + >> b32.bc
   echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
   echo $(HBDIR)\lib\debug.lib + >> b32.bc
   echo $(HBDIR)\lib\common.lib + >> b32.bc
   echo $(HBDIR)\lib\pp.lib + >> b32.bc
   echo $(HBDIR)\lib\pcrepos.lib + >> b32.bc
   echo $(HBDIR)\lib\ct.lib + >> b32.bc
   echo $(HBDIR)\lib\zlib.lib + >> b32.bc
   echo $(HBDIR)\lib\hbzip.lib + >> b32.bc
   echo $(HBDIR)\lib\libmisc.lib + >> b32.bc
   echo $(HBDIR)\lib\tip.lib + >> b32.bc
   echo $(HBDIR)\lib\png.lib + >> b32.bc

   rem Uncomment these two lines to use Advantage RDD
   rem echo $(HBDIR)\lib\rddads.lib + >> b32.bc
   rem echo $(HBDIR)\lib\Ace32.lib + >> b32.bc

   echo $(BCDIR)\lib\cw32.lib + >> b32.bc
   echo $(BCDIR)\lib\import32.lib + >> b32.bc
   echo $(BCDIR)\lib\uuid.lib + >> b32.bc
   echo $(BCDIR)\lib\ws2_32.lib + >> b32.bc   
   echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\rasapi32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\gdiplus.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\shell32.lib, >> b32.bc

   IF EXIST Alert.res echo Alert.res >> b32.bc
   $(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
   #del b32.bc

.prg.obj:
  $(HBDIR)\bin\harbour $< /L /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
  $(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c

alert.res : alert.rc
#  $(BCDIR)\bin\brc32.exe -r Alert.rc
alert.prg

Code: Select all

#include "FiveWin.ch"

function Main()

   One()

return nil
one.prg

Code: Select all

#include "FiveWin.ch"

function One()

   MsgInfo( "ok" )

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Borland Make Utility Issues

Post by James Bott »

Antonio,

I had all kinds of trouble after copying all your files from your previous message. Mostly they were due to the fact that the forum replaces tabs with spaces. Now I am still getting this error:

Code: Select all

C:\Users\James\Documents\Projects\Make\Antonio>c:\bcc7\bin\make -f test.mak 
MAKE Version 5.41  Copyright (c) 1987, 2014 Embarcadero Technologies, Inc.
Fatal: ' ' does not exist - don't know how to make it

Process completed, Exit Code 1.
Execution time: 00:00.217
Which, of course, is not helpful at all. I do note that only the alert.obj and alert.c files were generated, not the files for One.prg.

Will you please send me all the files in a zip (no need to rename "zip").

Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Borland Make Utility Issues

Post by James Bott »

Antonio,

Also, I keep getting this error:

Code: Select all

Fatal: Too many DEF file names: c:\bcc7\lib\psdk\rasapi32.lib
I have never seen that before, and I don't know what it means.

If I leave that LIB out, then I get the same error at the next LIB in the list. I can't imagine that six lines of code would cause this, so the problem seems like it is not in the code.

I found an explanation on the Embarcadero site, but it doesn't help much:

http://docwiki.embarcadero.com/RADStudi ... ntifier%27

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Borland Make Utility Issues

Post by James Bott »

Antonio,

When you say:
These are working perfectly fine:
Do you mean also that the OBJs and Cs are getting recompiled when any change is made to a PRG? Or, just that it compiles without error?

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Post Reply