On Wed, 19 Nov 2008, Pritpal Bedi wrote: Hi Pritpal,
> I am playing with MinGW with MSYS. > Everything is fine except few points below which > I suspect more belongs to my poor general-knowledge > and IQ. > 1) ./make_gnu.sh install creates hbmk.sh in bin folder, <hbwin> is not > included in the default library list. I tried to locate where I have to > update this information but am at a loss. It is important for demowvg.prg > to convert to executable. What I do that I change the lib list in hbmk.sh > manually after each build. Looks that not all Harbour parts were updated for modifications in environment variables and library names. Look at function mk_hbgetlibsctb() in bin/hb-func.sh It has list of contrib libraries. hbw32 should be changed to hbwin. > 2) What is the rule/procedure to build only a single contrib library? > Now I have to issue from the /c/harbour ./make_gnu.sh install everytime > I make a change to the source. Then I change hbmk.sh in bin folder. Then > I compile demowvg.prg. A long edit/compile/link/execute cycle. It's very easy. In GNU make you can work with single library only. It's one of the most important functionality for me which does not exists in other make files. Just simply set two environment variables: export HB_ARCHITECTURE=w32 export HB_COMPILER=mingw When they are set you can execute in each directory make command and modified files will be recompiled and new libraries will be created in harbour/lib/$HB_ARCHITECTURE/$HB_COMPILER without touching any other things. If you want to rebuild whole library then you can simply execute: make clean it will erase (clean) on files related to library in the directory you are working on without touch other code. If you want to also install new library in given place then you should set additional environment variable HB_LIB_INSTALL. If this variable has some header files then you should also set HB_INC_INSTALL and if some executable are also created and you want to install them then HB_BIN_INSTALL is necessary. Yo can simply set all 3 variables, f.e.: export HB_BIN_INSTALL="/c/harbour/mingw/bin" export HB_INC_INSTALL="/c/harbour/mingw/include" export HB_LIB_INSTALL="/c/harbour/mingw/lib" and then make install will work for any type of Harbour code. When you executed make command then it works for given directory and all subdirectoried. So when you execute it in harbour/source/rtl then he will operate on rtl library and all GTs libraries which are in harbour/source/rtl/gt* directoris, f.e.: make clean will clean rtl and all core GTs. make clean does not remove files from final destination directories pointed by HB_*_INSTALL envvars but only from Harbour source tree. You can put all these environment variables in single script which you may use to set you environment, f.e. in myhbsets.sh #!/bin/sh export HB_ARCHITECTURE=w32 export HB_COMPILER=mingw export HB_BIN_INSTALL="/c/harbour/mingw/bin" export HB_INC_INSTALL="/c/harbour/mingw/include" export HB_LIB_INSTALL="/c/harbour/mingw/lib" but please remember about one thing. In *nix like shells each script operates on its own environment inherited from parent process. It means that executing such scripts directly: ./myhbsets.sh will not change your environment variables. You have to "include" it to current shell. It can be done by adding dot (.) and space before script name, f.e.: . ./myhbsets.sh In such form the variables will be set in current shell instance. You can check it using simple 'set' command without parameters. People who used to work with DOS/Windows very often forget about the fact that *nix shells looks for programs to execute _ONLY_ in directories which are in PATH envvar. It's the reason why simply my_prog does not work when my_prog is located in current directory. If you do not like it then you can add current directory '.' to PATH envvar. It's not set by default for important security reasons so it's not good practice. For sure it should never be done in production environment on machine with multiuser access. If you want to make it for you own use then please add '.' at the end of path so programs in local directory will not have higher priority then system ones. You can make it by: export PATH="$PATH:." In *nixes path delimiter is ":" not ";" like in DOS/Windows. I hope that above information will help you to start working with *nix like shells and Harbour. There are also many other possibilities but too much information at once can cause that it may look more complicated then it really is. best regards, Przemek _______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
