On Wed, 04 Nov 2009, Szak�ts Viktor wrote: Hi,
> If this is the only reason you use it, just rename > all those .clp files to .hbm and problems will go away. > Again, I'm no .clp user, but the point of .clp seems > to be that listed .prgs will be compiled into one > object, which may be important in some situations, > f.e. STATIC functions are visible between .prgs files. No they aren't but there are some other things like automatically included files or indirect dependencies which may cause that .clp modules cannot be divided into separate files without source code modification. Anyhow it's unimportant for programs like hbmk2. It only have to know that for each @<name>.clp file single output file is generated <name>.<ext> where <ext> depends on type of output file. Using -debuginc with hbmk2 files I see two problems: 1. it does not strip '@' from destination file name when checks dependencies so it cannot locate it and always tries to create new one, i.e.: hbmk2: debuginc: PRG @tt1.clp .hbmk/linux/gcc/@tt1.c hbmk2: debuginc: PRG @tt2.clp .hbmk/linux/gcc/@tt2.c hbmk2: debuginc: PRG t21.prg .hbmk/linux/gcc/t21.c This is the problem reported by Alex. 2. when -head=native option is used it does not process .clp files to extract dependencies list, i.e.: hbmk2: Processing configuration: /usr/bin/hbmk.cfg hbmk2: debuginc: PRG @tt1.clp .hbmk/linux/gcc/@tt1.c hbmk2: debuginc: PRG @tt2.clp .hbmk/linux/gcc/@tt2.c hbmk2: debuginc: PRG t21.prg .hbmk/linux/gcc/t21.c hbmk2: debuginc: HEADER t21.prg hbmk2: debuginc: Calling Harbour compiler to detect dependencies of t21.prg hbmk2: debuginc: PRG t22.prg .hbmk/linux/gcc/t22.c hbmk2: debuginc: HEADER t22.prg hbmk2: debuginc: Calling Harbour compiler to detect dependencies of t22.prg hbmk2: Compiling Harbour sources... [...] I hope that both problems should be easy to fix for someone who well know hbmk2 code ;) I also think that it will be good to extract file list from .clp file in the 1-st case when dependencies list is not generated automatically by harbour compiler (-head=native) but maybe hbmk2 already does it - I do not know. I can try to make it myself but I you can do that then I believe that you will make it much faster because you know hbmk2 code much better. Below is a small function which extracts .prg file names from .clp file which may help. best regards, Przemek STATIC FUNCTION READ_CLPFILE( cFileName ) LOCAL cFileBody := MemoRead( cFileName ) LOCAL aFiles LOCAL cFile cFileBody := StrTran( cFileBody, Chr( 13 ) ) cFileBody := StrTran( cFileBody, Chr( 10 ), " " ) cFileBody := StrTran( cFileBody, Chr( 9 ), " " ) aFiles := hb_aTokens( cFileBody,, .t. ) FOR EACH cFile IN aFiles cFile := FN_ExtSet( StrTran( cFile, '"' ), ".prg" ) NEXT RETURN aFiles _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour