Finally, by creating a small external tool to convert
the list of .prg files to .c files in the object directory,
it's now possible to use the batch rules with MSVC.

It speeded up build creation quite noticeably, and
made the output much cleaner (one harbour, one C
compiler, one linker and one resource linker call, that's
4 calls altogether).

Build speed is about 10%-40% quicker depending on
circumstances like -gc0 vs. -gc3 and other factors.
Typically for -gc0, it's 20%-40% here.

Brgds,
Viktor

On 2008.10.08., at 3:41, Przemyslaw Czerpak wrote:

On Tue, 07 Oct 2008, Szak�ts Viktor wrote:

Hi Viktor,

I'd imaging two ways to achieve that:
1) To have a batch rule with two steps.
  .prg -> .obj rules, with two command,
  Harbour getting all .prg as input, creating .c files, then
  cl.exe getting all .c files as input.
  This seems impossible as nmake doesn't allow to
  manipulate the dependency list in any ways, which
  would be needed to pass a .c file list to cl.exe.

Have you tried sth like:

  set HB_CFG_FILE=hb_bld.cfg
  echo CC=$(CC) > %HB_CFG_FILE%
  echo CFLAGS=$(CLIBFLAGS) -Fo$(OBJ_DIR)\ >> %HB_CFG_FILE%
  echo VERBOSE=YES >> %HB_CFG_FILE%
  echo DELTMP=YES >> %HB_CFG_FILE%

and then:

  {$(RTL_DIR)}.prg{$(OBJ_DIR)}$(OBJEXT)::
     $(HB) $(HARBOURFLAGS) -go0 -o$(OBJ_DIR)\ $<

Though it will also call MSVC many times.

BTW what happens with this:

  {$(RTL_DIR)}.prg{$(OBJ_DIR)}$(OBJEXT)::
      $(HB) $(HARBOURFLAGS) -o$(OBJ_DIR)\ $<
      $(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $(*B:$(OBJEXT)=.c)

$(*B:$(OBJEXT)=.c) will probably give wrong path so please try to
substitute also path.

best regards,
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to