* bin/hb-mkdyn.bat
+ Moving .lib and .exp (if they are generated) files
to LIB dir.
* source/vm/maindllp.c
+ Added owatcom flavour of .dll name.
* contrib/hbwin/win_misc.c
+ Added WAPI_GETLASTERROR(), WAPI_SETLASTERROR(), WAPI_SETERRORMODE().
* utils/hbmk2/hbmk2.prg
+ Added TODO to create temp .c files in temp location.
Looks this can create a few problems (-hbcc, .ppo output
location when -p is used by user).
+ '/o' flavour of -o option is now ignored on non-*nix
systems to make sure users cannot mess up the hbmk process
flow.
* -o option modified to reset any previous explicit -o settings.
* Some minor internal renames, comments.
+ Added new hbmk.cfg / .hbp option: 'shareddef='. This can
change the default state of shared/static setting, so it
can be used by installers or user to override default
behaviour. NOTE: HB_SHARED envvar can also be used.
* Changed hbmk.cfg lookup preferences to this:
1. $HOME/.harbour
2. /etc/harbour
3. <hbmkdir>/../etc/harbour
4. <hbmkdir>/../etc
5. <hbmkdir>
(NOTE: I've deleted /etc as etc/harbour seems superior
and we already store a .def file there.
I've also deleted /usr/local/etc)
* utils/hbmk2/hbmk2.prg
! Refined autodetection of msvc to not be confused by
watcom binary dir in the path.
! Refined autodetection of owatcom by also checking for
WATCOM envvar. Thanks Petr Chornyj for the hint.
% Removed hack to not prioritize MSVC compiler detection,
so it's now handled just like the others.
* bin/postinst.cmd
* bin/postinst.bat
* bin/hb-func.sh
+ Added arch= and comp= variables to hbmk.cfg.
I plan to use these for autoconfiguration.
* make_gnu_os2.cmd
* make_gnu.bat
- Removed built in output redirection to make them in sync
with the bash flavour. Users can easily redirect it themselves.
* utils/hbmk2/hbmk2.prg
+ Formally added icc.
* config/win/msvcce.cf
! Untested fixes for msvcce in GNU make.
* utils/hbmk2/hbmk2.prg
* On *nix platform hbmk.cfg is now first checked for
in /usr/local/etc, then in /etc and after that in
hbmk2's dir. Please advise if there are other such
global config dirs to check on different platforms.
* harbour-win-spec
* harbour-wce-spec
* harbour.spec
* bin/hb-func.sh
* utils/hbmk2/hbmk2.prg
* hbmkcfg.hbp file renamed to the clearer: hbmk.cfg
Same rules apply, the format is .hbp, which is also
made clear on the hbmk2 help screen.
hbmk2 and hbmk.cfg now effecticely replaces harbour.cfg,
which can now be considered obsolete, along with the
/go option. If someone knows some real-life tasks
which can be done with /go+harbour.cfg, but cannot
with hbmk2, please speak up.
* utils/hbmk2/hbmk2.prg
* utils/hbmk2/Makefile
* common.mak
+ Added -DHBMK_INTEGRATED_COMPILER compile time option
to enable integrated Harbour compiler. Experimental,
please test. This results is bigger executable (obviously)
but may be more efficient on some platforms.
% Using .exe extension for external commands on non-*nix.
* Using slightly different format to echo commands on
screen, they are now printed in a new line and they are
not put between quotes.
* bin/hb-mkdyn.bat
* make_gnu.bat
* make_gnu.sh
* utils/hbmk2/hbmk2.prg
* config/win/msvc.cf
+ config/win/msvc64.cf
+ Added separate HB_COMPILER for msvc x64 mode.
This allows to keep both the 32 and 64-bit builds
built in parallel.
NOTE: This is only supported with GNU Make.
* utils/hbmk2/hbmk2.prg
+ Added autodetection of msvc64.
+ Added pocc64 and msvc64 support in self-detection
code.
* bin/hbmk.bat
+ Added -n to stay compatible with former hbmk.bat.
* ChangeLog
* Updates.
! Correction made to entry:
2009-02-24 01:30 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* utils/hbmk2/hbmk2.prg
* Attempt to add .dll support for win/owatcom.
; TOFIX: This happens:
Warning! W1023: no starting address found, using 00401000
* utils/hbmk2/hbmk2.prg
! Tweaked to only include path in shared lib name on *nixes,
if Harbour is installed in a system location.
! Forgot to add bin dir to lib path in shared mode in gcc/*nix.
! Fixed macro substitution order for {DB}.
! Tweaks for library name forming on gcc family.
The applied rule is to prepend -l, delete lib prefix and extension,
when the libname doesn't have a path in it, if it has, the libname
will be passed as is (without -l, with lib prefix and extension).
* utils/hbmk2/hbmk2.prg
! Fixed bug in path normalization which stripped leading
(root) path separator. Guy, could you please retest now?
- bin/hb-mkdll.bat
+ bin/hb-mkdyn.bat
* bin/postinst.bat
* harbour-win-spec
* harbour-wce-spec
* harbour.spec
* bin/postinst.sh
* bin/hb-func.sh
- bin/hb-mkslib.sh
+ bin/hb-mkdyn.sh
* Synced the name of these tools with similar function,
name also converted to 8.3.
; NOTE: lib/dll creation functionality (which is the
difference now between .sh and .bat flavour) may
once in the future be implemented in hbmk2. See
existing TODO there.
* utils/hbmk2/hbmk2.prg
% Normalizing autodetected paths when system locations
are used on *nix and always for win/dos/os2.
! Fix to MSVC resource handling.
* utils/hbmk2/hbmk2.prg
+ Added support for resources on Windows platform.
mingw, owatcom, msvc, bcc32 are supported. mingw and
owatcom support single resources only.
* config/rules.cf
+ Added owatcom .err files to the clean list. Maybe there
is more appropriate place to put this. Please correct it.
* utils/hbmk2/hbmk2.prg
! Fixed bug which made gtwvt the default GT for mingw.
! Fixed to create final exe in current dir if no output
filename was specified and the first input file
contained a path.
* Changed to use version-less harbour shared lib names
on *nixes.
! Fixed to pass full path with harbour.so to gcc.
(even when Harbour isn't run from a system location)
! Fixed compilation/linking/cleanup if an input file
wasn't in current dir.
* Temp stub file is now created in system default temp dir,
instead of the current one.
+ Harbour shared lib path is normalized when Harbour
is found on system locations. (so '*/bin/../lib/' becomes
'*/lib')
* Better I hope handling of .so/.dylib/.sl/.dll files passed
on the command line.
* bin/hb-mkdll.bat
! Fixed typo in Borland MT .dll name.
! Fixed to not include maindll.obj, maindllp.obj in
Borland .dlls.
* Minor formatting and cleanup on internal names.
+ Added checking for source lib existence, showing
message if not found.
+ Better user feedback.
* bin/postinst.bat
+ Added running hb_mkdll.bat at the end of the build
process. For now users have to use 'set HB_DLL=yes'
to enable this features. It's experimental yet,
see previous comments.
* source/vm/Makefile
+ Now generating hbmainstd and hbmainwin for remaining
(non-mingw and non-mingwce) compilers. MSVC and BCC
need this for -shared linkage, I'm not sure about the
rest, anyhow we can disable it for other compilers
if it isn't needed in future.
* bin/hb-func.sh
% Refined hbmkcfg.hbp setup to better detect conditions.
* contrib/hbcurl/hbcurl.c
! Pacified this only one new gcc 4.3.3 warning.
* config/win/gcc.cf
* config/win/mingw.cf
+ Added -mtune=pentiumpro gcc optimization.
* bin/hb-func.sh
* utils/hbmk2/hbmk2.prg
+ Previous workaround changed to generic solution, keeping
all Harbour lib specific external lib knowledge inside
hbmk2.
Guy, if you can please retest.
* bin/hb-mkdll.bat
* Minor in comment.
* config/lib.cf
* config/bin.cf
+ Added -n to Harbour flags to bin.cf.
+ Added -n1 to Harbour flags to lib.cf.
; TOFIX: The former works, the latter doesn't.
Could someone please help why is this
happening?
* utils/hbmk2/hbmk2.prg
- Removed -n from default Harbour switches.
; TODO: Add prgflags=-n to all .hbp files.
; TODO: Add -n to all .hbm files.
; TODO: Add .hbp file to dirs where there are .prgs
needing -n flag.
+ bin/hb-mkdll.bat
+ Added .dll creation for GNU-make. Not yet enabled,
only MSVC supported, and by the nature of the
wonderful world of Microsoft, whole Harbour needs
to be compiled with HB_USER_CFLAGS=-DHB_DYNLIB to
make this work. -DHB_DYNLIB has some drawbacks
though: export table will be generated for all
executables made from these .libs, .exp/.lib will
also be generated for all executables.
; TODO: Solve to compile Harbour lib .prgs using
-n1 switch. (needed for .dll, and this
one has only befenefits for other scenarios)
; TODO: Add hb-mkdll.bat to postinst.bat.
; TODO: Add BCC support, if possible.
; TODO: Rename hb-mkslib.sh to 8.3 name and sync
name with the .bat version (not necessarily
mkdll, but something short.)
* bin/hb-func.sh
! Added system libs for optional components included
in the harbour dynlib. I plan to make some more
changes here, but this should fix missing system
libs with shared option enabled in hbmk2.
* contrib/examples/dbu/dbu.hbm
* contrib/examples/rl/rl.hbm
+ Added -n.
* utils/hbdoc/Makefile
* utils/hbmk2/Makefile
* utils/hbtest/Makefile
* utils/hbi18n/Makefile
* utils/hbrun/Makefile
- Removed explicit -gc0 -n override.
Should now be set automatically for all binaries.
* bin/hb-func.sh
* utils/hbmk2/hbmk2.prg
! Some three bad typos in recent commit.
! Fixed the way build-default GT is supplied via hbmkcfg file.
(via gtdef= line)
! Fixed to fill gtdef= line only if GT was overridden at
build time. Previously it was filled with gtstd, which
is wrong.
! Temporarily disabled automatic entry point detection,
as it needs more complicated management because there
needs to be a second C compiler pass. We should try
to use some other means to implement this feature IMO.
* utils/hbmk2/hbmk2.prg
+ Added internal function to check for linked GTs, so that
platform/compiler code can act accordingly.
+ Added required system libs and paths for gtsln, gtcrs
and gtxwc. So now it's 100% hbmk script compatible.
This effectively added support for gtsln and gtcrs
(for *nix only). ncur194 support is missing though,
plus maybe some build-time modifier switches aren't
honored (the WITHOUT* ones, but I'm not positive that
all of them have to be handled on hbmk2 level).
Probably some clever autodetection can be used on
hbmk2 level for such cases.
! Fixed to not be case-sensitive when dealing with GT names.
+ Added NOTE about 3rd party/contrib stuff handling.
* Minor formatting.
; NOTE: What remains is cross compilation support, which
is a new topic. -n support tweak, if needed.
And testing, adding missing compilers, fixing
existing ones if needed, syncing with build-time
switches, clean Win32 system libs.
* contrib/gtwvg/tests/gtwvg.hbp
+ Readded gui=yes to better separate compontents.
* ChangeLog
* Entry marked done.
* utils/hbmk2/hbmk2.prg
- Removed HBMK_NO_GTCGI macro.
* Cleanups and fixes to GT list handling after recent
changes.
* Minor rearrangement on help screen.
* utils/hbmk2/hbmk2.prg
+ Added automatic selection of GUI/non-GNU modes for
core/contrib GTs. This can be overridden by user by
putting -gui (and related switches) _after_ -gt switch.
In normal cases this isn't necessary.
+ Invalid GT names are ignored, instead of creating
compile error in the stub.
+ GTs and FM are now requested from C stub just like they
are in hbmk script. This makes it possible to override
GT even for apps that already uses an official method
to choose a GT. hbmk2 uses function call also to set GT.
- Removed .prg stub.
! Fixed recent potential RTE when using darwin.
* source/vm/hvm.c
+ Added hb_vmSetLinkedMain() function to replace direct
access to exported variable hb_vm_pszLinkedMain.
(it's not a public call and caller should always pass
a string literal).
* hb_vm_pszLinkedMain -> s_vm_pszLinkedMain and made static.
* utils/hbmk2/hbmk2.prg
! Not adding 'dllimport' for externs in C stub when
MSVC is used, to avoid compiler warning mentioned in
previous entry.
* utils/hbmk2/hbmk2.prg
* bin/hb-func.sh
* Updated for above change.
; TODO: Convert GT defaulting to function call too.
* source/compiler/hbusage.c
! Fixed to not show -n option as '(default)' on help screen.
-n isn't the default in Harbour, nor in Clipper.
Please review me.
* utils/hbmk2/hbmk2.prg
+ Added -main=<id> option to override starting function/procedure
name. Using the method from hbmk script, but made portable
to all compilers. Can we add somewhat more official method
to set this up? Preferably .prg level, but even a function
call seems better, as with current method, MSVC complains
with this warning:
"hbsc_2nwvzg.obj : warning LNK4217: locally defined symbol \
_hb_vm_pszLinkedMain imported in function __hb_hbmk_setdef_"
+ Added code to only accept valid Harbour identified as
-main= value.
+ Added first module detection.
+ Enabled code to automatically find entry function in first
module and make it the app entry point. This is very serious
hack dealing with lots of internals.
* source/compiler/cmdcheck.c
* Typo in comment.
* contrib/hbgd/gdwrp.c
! Fixed double implementation of GDIMAGEELLIPSE().
The so far inactive .c version got enabled by recently
making lib version detection automatic, which made it
collide with the existing .prg implementation.
Left the .prg one active because it works regardless
of the lib gd version. Francesco, please verify me.
- Deleted disabled, probably older copy of GDIMAGEELLIPSE()
from .c source.
* utils/hbmk2/hbmk2.prg
* Help screen update.
* bin/hb-func.sh
! Fixed gtalleg lib name.
% Removed explicit harbour -gc0 option. This is now the default.
* utils/hbmk2/hbmk2.prg
+ Added fmstat/nofmstat support.
! Minor fix to allow more freedom in formatting inside .hbp files.
! Fixed to delete prg stub file when using -hbcc option.
+ Added Copyright section for Przemek for the ideas I've
borrowed from hbmk script and contributed code.
+ Detect platform default GT and only create stub if the
user selected GT is different.
+ Now using versions shared libs on *nixes.
+ Mode detection now regards the ending or the beginning
of the original name, so prefixed or postfixed names will
also be recognized: xhbcmp, hbcmpx, myhbcmp.
! Fixed to multiple -gt options override each other so the
last one will be effective.
! Fixed error message text when stub cannot be created.
Furthermore in this case hbmk will now quit.
+ Also using '-Wl,--start-group' for bsd (from hbmk script).
+ Added '-bind_at_load', '-multiply_defined suppress' gcc
options for darwin shared mode (from hbmk script).
* Changed stub name to hbstub (from hbmkgt).
* pthread lib handling streamlined based on hbmk script,
but this probably needs further cleaning as the script
isn't clear to me here.
+ Added fmstat/nofmstat switch. It most probably needs some
tweaking, as the conditions seem rather sophisticated here.
TODO: For non-*nix/non-gcc platforms (msvc/bcc32/owatcom
most importantly).
+ Added system libs for darwin if gtcrs or gtsln are selected.
(nslang isn't a default lib here, so it won't work on plain
installations, slang however will).
+ Missed from previous commit: Fix so that -nohbp doesn't
prevent processing the global config .hbp file.
! Fixed typo in prev commit.
* utils/hbmk2/examples/contrib.hbp
- Removed hbtip as it's not fully portable (dos).
+ utils/hbmk2/examples/contribf.hbp
+ Added complete database of contrib, with
availability information.
* contrib/xhb/Makefile
* contrib/hbmsql/Makefile
* contrib/hbmzip/Makefile
* contrib/hbziparc/Makefile
* contrib/hbnf/Makefile
* contrib/hbmisc/Makefile
* contrib/hbvpdf/Makefile
* Formatting.
* bin/hb-func.sh
! Two typos.
- Disabled slang/ncurses lib stuff.
* utils/hbmk2/hbmk2.prg
! Fixed to put a space after -o gcc option for darwin.
; This makes hbmk2 work under darwin (for basic cases).
* utils/hbmk2/hbmk2.prg
* Removed -q0 default Harbour option.
* Turned off informational messages. (turn it on with -info)
* Help screen made shorter.
+ Added -help option to show the full help.
* Showing no logo for normal operation.
* bin/hb-func.sh
+ Added gpm lib to config file when mouse is enabled at build time.
* utils/hbmk2/hbmk2.prg
! Fixed not to use '$' sign in generated temp filename.
! Fixed recent typo causing RTE in *nix.
; After these changes linux/gcc works out of the box, but
it still needs tweaking (x11, other libs).
* bin/hb-func.sh
+ Added generation of hbmkcfg.hbp.
gt override, cflags, ldflags and slang/curses libs are
currently added.
; TODO: Add this file to distro packages.
* utils/hbmk2/hbmk2.prg
! Fixed handling of -DHB_EXT_ZLIB.
! Fixed handling of -DHB_PCRE_REGEX.
+ Added support for -DHB_POSIX_REGEX.
! Removed -mconsole from *nix gccs too.
+ Added new Linux targets mingw and mingwce for future
cross compiling support.
+ Added remaining system libs for linux, sunos and hpux.
+ Added a more complete set of win system libs for mingw.
TODO: Some more generic solution needs to be developed
because currently the win systems libs add by our
tools are pretty much random across the different
supported compilers.
+ Added system lib list for mingwce.
+ Path separator translation for mingwce.
* utils/hbmk2/hbmk2.prg
+ Added support for build level (or system level if that's
needed in the future) configuration file for hbmk. Currently
it will automatically pick the file named hbmkcfg.hbp from
the dir where hbmk is located. This file can be used to store
build settings so that they can later be used by hbmk,
automatically. IOW this is the communication medium
between the build process and hbmk. We can store here
the selected GT, extra libraries, PRG flags, C flags, linker
flags, while keeping hbmk executable free from such burnt-in
information. For this to work, the build process needs
to generate hbmkcfg.hbp with appropriate content, and this
file needs to be added to standard distribution packages.
The format is normal .hbp, described on the hbmk help screen.
* utils/hbmk2/hbmk2.prg
+ Added CCPATH + CCPREFIX support for *nix/gcc|gpp.
+ Reworked *nix alternative dir layout detection to be generic.
+ Generating '-Wl,-mwindows', '-Wl,-mconsole' options for gcc, mingw
(no -mconsole for mingw). Please review.
! Added missing gdi32 system lib for mingw when GTWVT is used.
! Added -shared support for mingw.
+ Added Przemek's code to detect entry function on gcc|gpp|mingw.
Code not used yet.
+ Added HBMK_NO_GTCGI macro to disable automatic GTCGI
selection for hbmk executable.
* utils/hbmk2/hbmk2.prg
+ Added autodetection of compiler based on build data on linux.
+ Added '-comp:bld' option to force autodetection based on build
data for all other platforms. This way the compiler will be
set to the same one as was used to build hbmk2 executable.
+ Added support to specify object output name using the -o
option in conjunction with the -hbcmp parameter. Single
and multiple input (c. and .prg->.c) files are also supported,
but that's compiler dependent, currently gcc/pocc/msvc/bcc32
supports single file and also msvc/bcc32 support multiple files.
* os2/icc libprefix reset and TODO added.
+ Added some cross-platform related markups (comments).
! Fixed not stripping 'lib' from libnames for linux/gpp.
* utils/Makefile
! Fixed broken GNU Make after recent directory rename.
* utils/hbmk/hbmk2.prg
* -q switch changed to -quiet to not collide with harbour option
of the same name.
+ Following C flags will automatically be inheried to
*nix/gcc|gpp compilers regardless of -bldf flag:
-mlp64, -mlp32, -m64, -m32, -fPIC, -fpic
+ Following C flags will be automatically processed and
relevent system libs added:
-DHB_PCRE_REGEX - pcre
-DHB_EXT_ZLIB - z
-DHAVE_GPM_H - gpm
! Stripping 'lib' prefix from lib names for gcc-family compilers.
! Stripping extension from lib names for gcc-family compilers.
; Please review.
* contrib/examples/uhttpd/hbmk.bat
* .lib extensions removed from HB_USER_LIBS.
* common.mak
* changed HBM_KDIR from "utils\hbmk" to "utils\hbmk2"
- utils/hbmk
+ utils/hbmk2
* renamed dir name to fix wrong dir change on gnu scripts: mpkg_tgz.sh
and the harbour.spec
! Fixed dir name error that avoided to build rpms and tgz files.
* utils/hbmk/hbmk2.prg
+ Added object archive support for (currently) gcc compilers.
.a file are gathered like .o files, and they can be added
to the internal command line templates using the {OA} macro.
I've added these after {O} macros in gcc cmdlines.
(Przemek's request #9. Please review.)
* Minor internal change to system location detection.
* harbour-win-spec
* harbour-wce-spec
* harbour.spec
* mpkg_tgz.sh
% Removed -r make flags. No longer needed.
* utils/hbmk/hbmk2.prg
+ Added new flags to replace -bldflags[-]:
-bldf[-] and -bldf=[p][c][l]. We can pass any combinations
to the latter. '-bldf=' is the same as '-bldf-'.
+ Added hbcplr to liblists (both static and shared).
+ Added infrastructure to allow for any kind of logic
to detect compilers (not just PATH search for .exe).
We should however very carefully use such methods
to keep detection precize, predictable. For now I'd like
to hear about misdetections using current system.
* utils/hbmk/hbmk2.prg
+ Added new TODOs.
+ Now using GTCGI as the GT.
+ Added -info option to enable informational output.
(currently this is the default for testing period)
+ Added -arch=<arch> command line option. Same as HB_ARCHITECTURE.
Added -comp=<comp> command line option. Same as HB_COMPILER.
envvars are kept for compatibility.
+ Added -hblnk option to give plave for hblnk script behaviour
emulation.
* Changed -cc, -cmp options to -hbcc, -hbcmp respecitvely.
+ Changed -hbcc, -hbcmp, -hblnk switches to turn off information
output and turn on quiet mode by default.
+ Added autodetection of architecture when unique to
architecture compiler is choosen manually. IOW, when
-comp=msvc|mingw|pocc|dmc|xcc is passed the architecture will
be set to win automatically. When -comp=djgpp is used,
dos will be selected.
! Fixed ordering of compiler autodetection because f.e. owatcom
bin dir holds a 'cl.exe', which made hbmk2 falsely detect msvc.
+ Added trick which I'm not sure I like, and may cause problems
and seemingly unpredictable behaviour, but could also help
in some environments where multiple compilers are setup in
parallel (this isn't a recommended scenario for various other
reasons, so maybe we shouldn't support it further). So from
now on the compiler autodetection will first look for the
compiler used to build hbmk2.exe, and check for the rest
afterwards. This feature is turned off for msvc builds of
hbmk2.exe because it breaks owatcom autodetection.
+ Added possibility to pass a plain dir by using -odir[\|/]
switch. The final name will be determined by first input
file name, if this one also has a dir, -o option will be
ignored. Added logic to handle separator differences, this
wasn't tested to a great deal.
+ Added -Wl,--start-group support for linux/gcc|gpp, win/mingw,
dos/djgpp.
! Fixed owatcom support to setup library paths.
! Fixed linux/owatcom to use link script.
* Some adjustments to win/owatcom C compiler settings. I guess
the ones in .cf should also need a cleanup.
* Few minor indentation problems fixed.
! C compiler and linker scripts now got an extension in
the generated temp filename to make some of them happy
(owatcom in this case). .cpl is used for compiler scripts,
.lnk for linker ones.
+ Compiler autodetection now also looks in hbmk2 executable
dir before looking into the PATH.
! Link script content was wrong due to typo.
! Fixed problem with library paths being wrong (doubly
decorated) in the link command. This may also fix some
problems with double extensions and final .c file cleanup.
! Fixed to add hbdebug lib when building in shared mode.
! Fixed typo in automatically adding './' on *nix systems.
; Please test, I definitely couldn't retest all scenaros
after all these changes.
* bin/postinst.bat
* Adapted change in mode modifier switches, also
added new -hblnk one.
* utils/hbmk/examples/winapi.hbp
+ Added mapi32.
+ utils/hbmk/examples/contrib.hbp
+ Added .hbp file for popular and portable only contribs.
* config/win/owatcom.cf
- Removed unnecessary system libs.
* contrib/hbvpdf/hbvpdft.prg
* hbwhat32 -> hbwhat in comment.
* contrib/hbwin/wapi_commctrl.c
* contrib/hbwin/wapi_winuser.c
! Fixed harbour-project page link in header.
* contrib/hbwin/hbwapi.h
* Formatting (indenting the whole file content inside
self-guard isn't necessary.)