Hi Alex.

I'm trying to optimize MSVC non-GNU make, so that it
compiles .prg in one batch (== one harbour.exe call by
.lib), just like for .c files, as opposed to the current
one-by-one .prg file compilation approach.

Does anyone have an idea how to fix this? Marek, Paul?

I may not understand your exact requirement, but if (like me) you wanted to get rid of dependencies with the .c suffix (redundant) if there is a .prg dependency I did this (edited a little) in (say) heasipos.mak:

I wonder if that is something like what you are getting at :)

Maybe I don't read your make file well, but it
looks like what we have now, also in MSVC .mak
files.

What I'd like to do, is to optimize the .prg
build process, so that harbour.exe gets called
only once per target for all its .prg dependencies,
instead of being called separately for each .prg files.
I think nmake terminology calls this a "batch rule",
and it's specified using "::" instead of ":" in
the dependency list.

This would be a great way to enhance build speed,
and make the output smaller, leaner. This exact
method is already used for .c -> .obj compilation,
see rules starting in make_vc.mak @ line 259.

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.
2) To have an "indirect" rule. This is what I've
   tried in my posted example, but the best result
   still needs two passes, so it basically doesn't work.

Maybe it's not doable at all, yet it would be
very nice.

BTW, for a maybe easier problem, in the contrib make
files something is broken, as a modified .prg won't
trigger a recompile. Maybe you have an idea why.

Brgds,
Viktor

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

Reply via email to