2009-09-20 16:31 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
* config/global.mk
+ Added beos system location detection.
+ Added system location detection based on [LD_]LIBRARY_PATH.
; Please review and even tweak code if needed. I didn't test these changes.
* utils/hbmk2/hbmk2.prg
% system location detection code disabled for non-*nix hbmk2 builds.
It's of no use there, as far as I can overview all scenrios.
* config/global.mk
* Restored default lib dir to simply lib on *nixes.
% Minor opt to system location detection.
! Fixed to only use 'harbour' lib/inc postfixes on beos
when installed on system location. Thanks Przemek for the patch.
This commit is contained in:
@@ -17,6 +17,23 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-09-20 16:31 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
* config/global.mk
|
||||
+ Added beos system location detection.
|
||||
+ Added system location detection based on [LD_]LIBRARY_PATH.
|
||||
; Please review and even tweak code if needed. I didn't test these changes.
|
||||
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
% system location detection code disabled for non-*nix hbmk2 builds.
|
||||
It's of no use there, as far as I can overview all scenrios.
|
||||
|
||||
* config/global.mk
|
||||
* Restored default lib dir to simply lib on *nixes.
|
||||
% Minor opt to system location detection.
|
||||
! Fixed to only use 'harbour' lib/inc postfixes on beos
|
||||
when installed on system location. Thanks Przemek for the patch.
|
||||
|
||||
2009-09-20 15:33 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* external/pcre/config.h
|
||||
* Restored original only differing in whitespace.
|
||||
|
||||
@@ -1209,14 +1209,14 @@ ifeq ($(HB_INIT_DONE),)
|
||||
endif
|
||||
|
||||
HB_SYSLOC :=
|
||||
ifneq ($(findstring |/usr/local/bin,|$(HB_INSTALL_PREFIX)),)
|
||||
HB_SYSLOC := yes
|
||||
else ifneq ($(findstring |/usr/bin,|$(HB_INSTALL_PREFIX)),)
|
||||
HB_SYSLOC := yes
|
||||
else ifneq ($(findstring |/opt/harbour,|$(HB_INSTALL_PREFIX)),)
|
||||
HB_SYSLOC := yes
|
||||
else ifneq ($(findstring |/opt/bin,|$(HB_INSTALL_PREFIX)),)
|
||||
HB_SYSLOC := yes
|
||||
ifeq ($(HB_PLATFORM),beos)
|
||||
ifneq ($(foreach dir,/boot/common /boot/system /boot/home/config $(subst :, ,$(LIBRARY_PATH)),$(findstring |$(dir),|$(HB_INSTALL_PREFIX))),)
|
||||
HB_SYSLOC := yes
|
||||
endif
|
||||
else ifneq ($(HB_PLATFORM_UNIX),)
|
||||
ifneq ($(foreach dir,/usr/local/bin /usr/bin /opt/harbour /opt/bin $(subst :, ,$(LD_LIBRARY_PATH)),$(findstring |$(dir),|$(HB_INSTALL_PREFIX))),)
|
||||
HB_SYSLOC := yes
|
||||
endif
|
||||
endif
|
||||
export HB_SYSLOC
|
||||
|
||||
@@ -1228,9 +1228,13 @@ ifneq ($(HB_INSTALL_PREFIX),)
|
||||
endif
|
||||
endif
|
||||
|
||||
LIBPOSTFIX :=
|
||||
INCPOSTFIX :=
|
||||
ifeq ($(HB_PLATFORM),beos)
|
||||
LIBPOSTFIX := $(DIRSEP)harbour
|
||||
INCPOSTFIX := $(DIRSEP)harbour
|
||||
ifeq ($(HB_SYSLOC),yes)
|
||||
LIBPOSTFIX := $(DIRSEP)harbour
|
||||
INCPOSTFIX := $(DIRSEP)harbour
|
||||
endif
|
||||
else ifeq ($(HB_PLATFORM_UNIX),)
|
||||
LIBPOSTFIX := $(DIRSEP)$(subst /,$(DIRSEP),$(PLAT_COMP))
|
||||
else
|
||||
@@ -1252,7 +1256,7 @@ ifneq ($(HB_INSTALL_PREFIX),)
|
||||
LIBPOSTFIX := $(LIBPOSTFIX)$(DIRSEP)harbour
|
||||
INCPOSTFIX := $(DIRSEP)harbour
|
||||
else
|
||||
LIBPOSTFIX := $(DIRSEP)$(subst /,$(DIRSEP),$(PLAT_COMP))
|
||||
LIBPOSTFIX :=
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -1024,12 +1024,6 @@ FUNCTION hbmk( aArgs, /* @ */ lPause )
|
||||
|
||||
IF hbmk[ _HBMK_nHBMODE ] != _HBMODE_RAW_C
|
||||
|
||||
/* Detect system locations to enable shared library option by default */
|
||||
lSysLoc := hb_DirBase() == "/usr/local/bin/" .OR. ;
|
||||
hb_DirBase() == "/usr/bin/" .OR. ;
|
||||
hb_DirBase() == "/opt/harbour/" .OR. ;
|
||||
hb_DirBase() == "/opt/bin/"
|
||||
|
||||
l_cHB_BIN_INSTALL := PathSepToSelf( GetEnv( "HB_BIN_INSTALL" ) )
|
||||
l_cHB_LIB_INSTALL := PathSepToSelf( GetEnv( "HB_LIB_INSTALL" ) )
|
||||
l_cHB_INC_INSTALL := PathSepToSelf( GetEnv( "HB_INC_INSTALL" ) )
|
||||
@@ -1075,6 +1069,24 @@ FUNCTION hbmk( aArgs, /* @ */ lPause )
|
||||
l_cHB_INC_INSTALL := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + "include" + hb_osPathSeparator() + iif( hbmk[ _HBMK_nHBMODE ] == _HBMODE_XHB, "xharbour", "harbour" ) )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
#if defined( __PLATFORM__UNIX )
|
||||
/* Detect system locations to enable shared library option by default */
|
||||
IF hbmk[ _HBMK_cPLAT ] == "beos"
|
||||
lSysLoc := LEFTEQUAL( l_cHB_BIN_INSTALL, "/boot/common" ) .OR. ;
|
||||
LEFTEQUAL( l_cHB_BIN_INSTALL, "/boot/system" ) .OR. ;
|
||||
LEFTEQUAL( l_cHB_BIN_INSTALL, "/boot/home/config" ) .OR. ;
|
||||
AScan( ListToArray( GetEnv( "LIBRARY_PATH" ), ":" ), {| tmp | LEFTEQUAL( l_cHB_LIB_INSTALL, tmp ) } ) > 0
|
||||
ELSE
|
||||
lSysLoc := LEFTEQUAL( l_cHB_BIN_INSTALL, "/usr/local/bin" ) .OR. ;
|
||||
LEFTEQUAL( l_cHB_BIN_INSTALL, "/usr/bin" ) .OR. ;
|
||||
LEFTEQUAL( l_cHB_BIN_INSTALL, "/opt/harbour" ) .OR. ;
|
||||
LEFTEQUAL( l_cHB_BIN_INSTALL, "/opt/bin" ) .OR. ;
|
||||
AScan( ListToArray( GetEnv( "LD_LIBRARY_PATH" ), ":" ), {| tmp | LEFTEQUAL( l_cHB_LIB_INSTALL, tmp ) } ) > 0
|
||||
ENDIF
|
||||
#else
|
||||
lSysLoc := .F.
|
||||
#endif
|
||||
ELSE
|
||||
lSysLoc := .F.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user