Hi, > I don't know if it is technically easy or even possible to implemented, but i > think it might be very handy to have inside main .prg one (or more) make-time > directive(s) instructing hbmk2, about desired compiler options and/or > libraries inclusion.
Harbour compiler options can be controlled using #pragmas inside source code. The rest would need hbmk2 to parse all source files for make options, which would in turn have a rather huge speed penalty. Plus it'd need a 3rd kind of option syntax to maintain (above existing .hbp and .hbc). It would also be very easy to create ambiguous configurations this way, since each source file might contains contradicting options meant to control the whole build. The only part which could IMO make sense is autodetection of package dependencies, f.e. based on header usage, or special #pragma. Here the problem to deal with is the need for a central repository of available packages, and maybe a new .hbc variable to specify "trigger" header names (or even this could be made automatic with even more speed penalty, by scanning package header dirs first). Once we solve the .hbc "repository" problem in a multiplatform way (I still cannot see who this can be done properly on *nix systems), this can be solved. This logic would require to parse all source files even in non-incremental mode, plus extend/implement source parsing for the rest of the -head modes, causing further drop in build-speed. So unless someone has a good idea to avoid that, this feature will have to be off by default. So for me the whole complication and extra development requirements don't seem to be justified by the benefits. > Something like: > > #makeoption "/switch1", "/switch2", ... "/switchN" > and > #libinclude "libhb1", "libhb2", ... "libhbN" > or > #using "/switch1", "/switch2", "libhb1", "libhb2", ... "libhbN" > It could save us (the commandliners particularly) some time and stress-full > typing of hard to remember switches and lib names. Just a thought.. We have .hbp and .hbc files for this purpose. With optimal usage of these files, build configuration can be rather easy, almost "no-conf", or at least "configure-once". Brgds, Viktor _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour