On Sat, 06 Dec 2008, Kevin Monceaux wrote: Hi Kevin,
> Well, this seemed like a good excuse to expand my knowledge. I hadn't > tried to do anything more adventurous to a FreeBSD port then adding a > patch, etc. After some tinkering I now have a Harbour 1.0.1 FreeBSD port > that's working well enough for my needs. With a little more polishing I > might even be brave enough to try submitting it to FreeBSD. :-) In the past I was building few times Harbour on {Free,NET,Open}BSD systems but I've never used Harbour FreeBSD ports. AFAIR it was created by David Holm. > Whoever created the 0.44.0 port added an additional Makefile and script. > The port's Makefile executed the added Makefile, which in turn called the > added script. That script set several Harbour environment variables to > control the build, changed to the source dir, and finally executed > Harbour's Makefile, via gmake. I've stripped out the unneeded layers of > confusion, removed the added Makefile and script, set all the environment > variables in the port's Makefile and let it execute Harbour's Makefile > directly. Can you send this makefile and script to this list? Maybe I'll be able to help you. > So, anyway, I have a few questions that might aid me in the polishing of > the port. Has the Harbour development team ever considered using a > ./configure script instead of various environment variables? It would > greatly simplify creating Harbour packages on source based, and a few > binary based, Linux distros, not to mention FreeBSD, etc. Most distros > with automated build systems prefer building via: > ./configure -> make -> make install We do not use autoconf yet. Sooner or later we will have but without bigger user list which will build and test Harbour in different *nixes it will not be easy to keep it alive and well tuned. Please also remember that autoconf in practice cannot be used for cross builds and it's not supported in all environments so we will still need alternative form. > Where can I find documentation on all the environment variables available > to control building Harbour? I found some in make_gcc.mak but it doesn't > appear to be a complete list. HB_WITHOUT_X11, for example, isn't > documented there. I discovered HB_WITHOUT_X11 in an xHarbour Gentoo > ebuild. Probably no one have collected all of them so far. Just from memory: HB_ARCHITECTURE HB_COMPILER HB_GPM_MOUSE=yes # enable GPM support in GTSLN, GTCRS, GTTRM HB_WITHOUT_GTSLN=yes # disable GTSLN and code which needs slang library HB_WITHOUT_GTCRS=yes # disable GTCRS and code which needs [n]curses library HB_WITHOUT_X11=yes # disable GTXWC and code which needs X11 support HB_COMMERCE=yes # disable code which needs pure GPL libraries # (now GTSLN, GPM) The above is for core code. For contribs we have: HB_CONTRIBLIBS="lib1 lib2 ..." # list of contrib libraries which should # be compiled instead of default list HB_CONTRIB_ADDONS"lib1 lib2 ..." # additional contrib libraries which # are not compiled by default additionally each contrib library may have its own variables used to tests if header files exists. > The various *.txt files under doc and the Makefiles under doc appear to be > out of sync. Some docs get omitted if I set HB_DOC_INSTALL. Is there an > environment variable to enable installing the man pages? I don't even see > a Makefile in doc/man. For the moment I'm just installing the docs and man > pages via the port's Makefile. No there is nothing for automatic man files installation. Personally I do not see any easy way to create sth for this what can work well in different *nixes and customized builds so we probably left it for final binary package build scripts. > I'm currently testing the port under a FreeBSD install I have running under > vmware, which doesn't have X installed. If I leave HB_WITHOUT_X11 unset, > Harbour tries to build its X related bits, which all fail with Error 1 or > Error 2 errors. Those errors should cause the overall build to fail but > don't. Any idea why that's happening? They shouldn't. Harbour make files allow to continue compilation even if some library cannot be created. When error appears the build process is interrupted only given library and its sublibraries. > I have my FreeBSD ports system set up to use ccache. It does so by setting > CC before executing ./configure and/or make in the package's source tree. > After much head scratching trying to figure out why ccache wasn't being > used when building Harbour, I finally found CC was being blindly set to gcc > in config/bsd/gcc.cf. Could that perhaps be changed to only set CC to GCC > if it's not already set? For the moment I'm removing that setting via a > patch before the build starts and Harbour builds correctly with ccache. This could be a problem because Harbour can be compiled using different C compilers. HB_COMPILER points to C compiler and corresponding config/$HB_ARCHITECTURE/$HB_COMPILER.cf file which have such definitions. It's not guarantied that CC will be set to GCC and such modification will break all builds when it isn't, f.e. system uses different default compiler. In other systems we have: CC = $(HB_CCACHE) gcc LD = $(HB_CCACHE) gcc but looks that in bsd/gcc.sf this is missing. I'll add it ASAP. best regards, Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour