diff --git a/harbour/ChangeLog b/harbour/ChangeLog
index 547bf393df..840030d062 100644
--- a/harbour/ChangeLog
+++ b/harbour/ChangeLog
@@ -16,6 +16,29 @@
The license applies to all entries newer than 2009-04-28.
*/
+2010-06-15 18:43 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
+ * INSTALL
+ * config/global.mk
+ * config/detfun.mk
+ * config/detect.mk
+ * external/sqlite3/Makefile
+ * external/png/Makefile
+ * external/jpeg/Makefile
+ * external/bzip2/Makefile
+ * external/libhpdf/Makefile
+ * contrib/hbsqlit3/Makefile
+ * contrib/hbmzip/Makefile
+ * contrib/hbbz2/Makefile
+ * contrib/hbhpdf/Makefile
+ * contrib/sddsqlt3/Makefile
+ * contrib/hbwin/Makefile
+ + Added HB_ROOT variable which can be used to specify Harbour
+ source tree root as an absolute directory, when using
+ older than 3.81 GNU Make version (f.e. on QNX).
+ + Changed the way locally hosted source directories are
+ specified for detection function, in order to support
+ HB_ROOT functionality.
+
2010-06-15 18:06 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* INSTALL
+ Added Mac OS X QT pkg recommended link.
diff --git a/harbour/INSTALL b/harbour/INSTALL
index 38d93e55ce..fec321fdd7 100644
--- a/harbour/INSTALL
+++ b/harbour/INSTALL
@@ -667,6 +667,12 @@ HARBOUR
Lib names should be without extension and path.
You only need this in special cases, like CodeGuard
build with bcc.
+ - HB_ROOT=
When using GNU Make older than 3.81, you shall set
+ the root directory of Harbour source tree as an
+ absolute path. If not set, some build functionality
+ may fail, like detection of 3rd party libraries with
+ locally hosted sources.
+ With newer make versions, this variable is ignored.
- HB_REBUILD_PARSER=yes Rebuild language parser sources. Typically
you only need this if your are Harbour core
developer modifying grammar rules (.y).
@@ -1407,7 +1413,7 @@ HARBOUR
HB_WITH_QT - Nokia QT (GUI) [win, wce, os2, darwin, linux, free, open-source]
http://qt.nokia.com/products/
http://get.qt.nokia.com/qt/source/
- Recommended OS X binary package:
+ Recommended Mac OS X binary package:
http://get.qt.nokia.com/qt/source/qt-mac-cocoa-opensource-4.6.3.dmg
Currently supported Windows binary package:
http://get.qt.nokia.com/qt/source/qt-win-opensource-4.5.3-mingw.exe
diff --git a/harbour/config/detect.mk b/harbour/config/detect.mk
index 5a910ac812..7efaf88e3a 100644
--- a/harbour/config/detect.mk
+++ b/harbour/config/detect.mk
@@ -48,7 +48,7 @@ _DET_VAR_HAS_ := HB_HAS_ZLIB
_DET_FLT_PLAT :=
_DET_FLT_COMP :=
_DET_INC_DEFP := /usr/include /usr/local/include /boot/develop/headers/3rdparty
-_DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/zlib)
+_DET_INC_LOCL := external/zlib
_DET_INC_HEAD := /zlib.h
include $(TOP)$(ROOT)config/detfun.mk
@@ -61,7 +61,7 @@ _DET_VAR_HAS_ := HB_HAS_PCRE
_DET_FLT_PLAT :=
_DET_FLT_COMP :=
_DET_INC_DEFP := /usr/include /usr/local/include /usr/pkg/include /opt/local/include
-_DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/pcre)
+_DET_INC_LOCL := external/pcre
_DET_INC_HEAD := /pcre.h
include $(TOP)$(ROOT)config/detfun.mk
diff --git a/harbour/config/detfun.mk b/harbour/config/detfun.mk
index e2bb00281a..cade14fe65 100644
--- a/harbour/config/detfun.mk
+++ b/harbour/config/detfun.mk
@@ -20,7 +20,7 @@
# _DET_INC_DEFP - default location to look at. Not effective in 'HB_BUILD_EXTDEF=no' mode.
# (you must use absolute paths only.)
# _DET_INC_LOCL - embedded location to look at.
-# (you must use absolute paths only.)
+# (you must use paths relative to Harbour source tree root.)
# _DET_INC_HEAD - header filename to look for. Unless looking for a directory, prefix with forward slash.
# - variable name specified by _DET_VAR_INC_ (typically "HB_WITH_*") containing:
# (empty) or yes - will enable external component if found on default locations.
@@ -53,6 +53,12 @@ ifneq ($($(subst HB_INC_,HB_WITH_,$(_DET_VAR_INC_))),)
$(_DET_VAR_INC_) := $($(subst HB_INC_,HB_WITH_,$(_DET_VAR_INC_)))
endif
+ifneq ($(HB_ROOT),)
+ _DET_INC_LOCL := $(HB_ROOT)/$(_DET_INC_LOCL)
+else
+ _DET_INC_LOCL := $(realpath $(TOP)$(ROOT)$(_DET_INC_LOCL))
+endif
+
_DET_RES_TEXT :=
ifeq ($($(_DET_VAR_HAS_)),)
diff --git a/harbour/config/global.mk b/harbour/config/global.mk
index bbcfdd74c2..c43c6b3219 100644
--- a/harbour/config/global.mk
+++ b/harbour/config/global.mk
@@ -63,6 +63,15 @@ endif
_make_ver_381 := 3.81
MAKE_381 := $(filter $(_make_ver_381),$(firstword $(sort $(MAKE_VERSION) $(_make_ver_381))))
+# Users must specify HB_ROOT only for pre-3.81 GNU Make versions
+# (without '$(realpath)' function). For newer ones we clear it
+# to avoid messing things up.
+ifneq ($(MAKE_381),)
+ HB_ROOT :=
+else
+ HB_ROOT := $(subst \,/,$(HB_ROOT))
+endif
+
find_in_path = $(strip $(subst $(substpat), ,$(firstword $(subst |, ,$(subst $(subst x, ,x),$(substpat),$(filter-out |,$(foreach dir, $(subst $(PTHSEP), ,$(subst $(subst x, ,x),$(substpat),$(PATH))),|$(wildcard $(subst //,/,$(subst $(substpat),\ ,$(subst \,/,$(dir)))/$(1))$(HB_HOST_BIN_EXT)))))))))
find_in_path_raw = $(strip $(subst $(substpat), ,$(firstword $(subst |, ,$(subst $(subst x, ,x),$(substpat),$(filter-out |,$(foreach dir, $(subst $(PTHSEP), ,$(subst $(subst x, ,x),$(substpat),$(PATH))),|$(wildcard $(subst //,/,$(subst $(substpat),\ ,$(subst \,/,$(dir)))/$(1))))))))))
find_in_path_par = $(strip $(subst $(substpat), ,$(firstword $(subst |, ,$(subst $(subst x, ,x),$(substpat),$(filter-out |,$(foreach dir, $(subst $(PTHSEP), ,$(subst $(subst x, ,x),$(substpat),$(2))),|$(wildcard $(subst //,/,$(subst $(substpat),\ ,$(subst \,/,$(dir)))/$(1))$(HB_HOST_BIN_EXT)))))))))
@@ -1489,7 +1498,11 @@ else
HB_INSTALL_PREFIX := /boot/common
else
ifeq ($(HB_PLATFORM_UNIX),)
- HB_INSTALL_PREFIX := $(realpath $(TOP)$(ROOT))
+ ifneq ($(HB_ROOT),)
+ HB_INSTALL_PREFIX := $(HB_ROOT)$(TOP)$(ROOT)
+ else
+ HB_INSTALL_PREFIX := $(realpath $(TOP)$(ROOT))
+ endif
else
ifneq ($(PREFIX),)
HB_INSTALL_PREFIX := $(PREFIX)
diff --git a/harbour/contrib/hbbz2/Makefile b/harbour/contrib/hbbz2/Makefile
index 3069586b91..5dfc95f9bf 100644
--- a/harbour/contrib/hbbz2/Makefile
+++ b/harbour/contrib/hbbz2/Makefile
@@ -20,7 +20,7 @@ _DET_VAR_HAS_ := HB_HAS_BZIP2
_DET_FLT_PLAT := !wce
_DET_FLT_COMP :=
_DET_INC_DEFP := /usr/include
-_DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/bzip2)
+_DET_INC_LOCL := external/bzip2
_DET_INC_HEAD := /bzlib.h
include $(TOP)$(ROOT)config/detfun.mk
diff --git a/harbour/contrib/hbhpdf/Makefile b/harbour/contrib/hbhpdf/Makefile
index 1e4a7a1fd8..cf23917b73 100644
--- a/harbour/contrib/hbhpdf/Makefile
+++ b/harbour/contrib/hbhpdf/Makefile
@@ -20,7 +20,7 @@ _DET_VAR_HAS_ := HB_HAS_LIBHARU
_DET_FLT_PLAT :=
_DET_FLT_COMP :=
_DET_INC_DEFP := /usr/include /usr/local/include
-_DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/libhpdf)
+_DET_INC_LOCL := external/libhpdf
_DET_INC_HEAD := /hpdf.h
include $(TOP)$(ROOT)config/detfun.mk
diff --git a/harbour/contrib/hbmzip/Makefile b/harbour/contrib/hbmzip/Makefile
index ea07eafe60..cf701eb8f8 100644
--- a/harbour/contrib/hbmzip/Makefile
+++ b/harbour/contrib/hbmzip/Makefile
@@ -24,7 +24,7 @@ ifneq ($(HB_HAS_ZLIB),)
_DET_FLT_PLAT :=
_DET_FLT_COMP :=
_DET_INC_DEFP := /usr/include /usr/local/include
- _DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/minizip)
+ _DET_INC_LOCL := external/minizip
_DET_INC_HEAD := /zip.h
include $(TOP)$(ROOT)config/detfun.mk
diff --git a/harbour/contrib/hbsqlit3/Makefile b/harbour/contrib/hbsqlit3/Makefile
index c0e8794eab..f8e0e65564 100644
--- a/harbour/contrib/hbsqlit3/Makefile
+++ b/harbour/contrib/hbsqlit3/Makefile
@@ -20,7 +20,7 @@ _DET_VAR_HAS_ := HB_HAS_SQLITE3
_DET_FLT_PLAT :=
_DET_FLT_COMP :=
_DET_INC_DEFP := /usr/include /boot/common/include
-_DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/sqlite3)
+_DET_INC_LOCL := external/sqlite3
_DET_INC_HEAD := /sqlite3.h
include $(TOP)$(ROOT)config/detfun.mk
diff --git a/harbour/contrib/hbwin/Makefile b/harbour/contrib/hbwin/Makefile
index 1908fe1398..2d201eee5d 100644
--- a/harbour/contrib/hbwin/Makefile
+++ b/harbour/contrib/hbwin/Makefile
@@ -71,7 +71,7 @@ ifneq ($(filter $(HB_PLATFORM),win wce),)
_DET_FLT_PLAT :=
_DET_FLT_COMP :=
_DET_INC_DEFP :=
- _DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/libpng)
+ _DET_INC_LOCL := external/libpng
_DET_INC_HEAD := /png.h
include $(TOP)$(ROOT)config/detfun.mk
diff --git a/harbour/contrib/sddsqlt3/Makefile b/harbour/contrib/sddsqlt3/Makefile
index 0ccc90c15c..bb07eb3626 100644
--- a/harbour/contrib/sddsqlt3/Makefile
+++ b/harbour/contrib/sddsqlt3/Makefile
@@ -17,7 +17,7 @@ _DET_VAR_HAS_ := HB_HAS_SQLITE3
_DET_FLT_PLAT :=
_DET_FLT_COMP :=
_DET_INC_DEFP := /usr/include /boot/common/include
-_DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/sqlite3)
+_DET_INC_LOCL := external/sqlite3
_DET_INC_HEAD := /sqlite3.h
include $(TOP)$(ROOT)config/detfun.mk
diff --git a/harbour/external/bzip2/Makefile b/harbour/external/bzip2/Makefile
index 2de39fc2c1..739b4b2908 100644
--- a/harbour/external/bzip2/Makefile
+++ b/harbour/external/bzip2/Makefile
@@ -26,7 +26,7 @@ _DET_VAR_HAS_ := HB_HAS_BZIP2
_DET_FLT_PLAT := !wce
_DET_FLT_COMP :=
_DET_INC_DEFP := /usr/include
-_DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/bzip2)
+_DET_INC_LOCL := external/bzip2
_DET_INC_HEAD := /bzlib.h
include $(TOP)$(ROOT)config/detfun.mk
diff --git a/harbour/external/jpeg/Makefile b/harbour/external/jpeg/Makefile
index 66a4eba3e3..1c43e1d10f 100644
--- a/harbour/external/jpeg/Makefile
+++ b/harbour/external/jpeg/Makefile
@@ -84,7 +84,7 @@ ifeq ($(filter $(HB_COMPILER),<>),)
_DET_FLT_PLAT :=
_DET_FLT_COMP :=
_DET_INC_DEFP := /usr/include
- _DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/jpeg)
+ _DET_INC_LOCL := external/jpeg
_DET_INC_HEAD := /jpeglib.h
include $(TOP)$(ROOT)config/detfun.mk
diff --git a/harbour/external/libhpdf/Makefile b/harbour/external/libhpdf/Makefile
index 76855cc7c5..03b82da364 100644
--- a/harbour/external/libhpdf/Makefile
+++ b/harbour/external/libhpdf/Makefile
@@ -88,7 +88,7 @@ ifeq ($(HB_SUPPORTED),yes)
_DET_FLT_PLAT :=
_DET_FLT_COMP :=
_DET_INC_DEFP := /usr/include /usr/local/include
- _DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/libhpdf)
+ _DET_INC_LOCL := external/libhpdf
_DET_INC_HEAD := /hpdf.h
include $(TOP)$(ROOT)config/detfun.mk
@@ -100,7 +100,7 @@ ifeq ($(HB_SUPPORTED),yes)
_DET_FLT_PLAT :=
_DET_FLT_COMP :=
_DET_INC_DEFP := /usr/include /opt/local/include
- _DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/png)
+ _DET_INC_LOCL := external/png
_DET_INC_HEAD := /png.h
include $(TOP)$(ROOT)config/detfun.mk
diff --git a/harbour/external/png/Makefile b/harbour/external/png/Makefile
index 5b69fde916..2accee7942 100644
--- a/harbour/external/png/Makefile
+++ b/harbour/external/png/Makefile
@@ -36,7 +36,7 @@ ifeq ($(filter $(HB_COMPILER),poccarm xcc),)
_DET_FLT_PLAT :=
_DET_FLT_COMP :=
_DET_INC_DEFP := /usr/include /boot/develop/headers/3rdparty
- _DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/png)
+ _DET_INC_LOCL := external/png
_DET_INC_HEAD := /png.h
include $(TOP)$(ROOT)config/detfun.mk
diff --git a/harbour/external/sqlite3/Makefile b/harbour/external/sqlite3/Makefile
index 4eb2a7cb30..5a0e8b7dff 100644
--- a/harbour/external/sqlite3/Makefile
+++ b/harbour/external/sqlite3/Makefile
@@ -44,7 +44,7 @@ ifeq ($(HB_SUPPORTED),yes)
_DET_FLT_PLAT :=
_DET_FLT_COMP :=
_DET_INC_DEFP := /usr/include
- _DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/sqlite3)
+ _DET_INC_LOCL := external/sqlite3
_DET_INC_HEAD := /sqlite3.h
include $(TOP)$(ROOT)config/detfun.mk