From 6969cc01233c19178c2cb7c52f44dd7e8b7f8867 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 15 Aug 2009 09:37:39 +0000 Subject: [PATCH] 2009-08-15 11:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) - make_gnu.sh * config/linux/global.cf - Deleted. The -fPIC logic is moved to linux/global.cf but it's incomplete yet, some comments were added there. * contrib/hbcurl/hbcurl.hbc + contrib/hbcurl/hbcurls.hbc + Added separate .hbc file for static mode hbcurl lib. This replaces former HB_CURL_STATIC setting. * contrib/hbcurl/Makefile * external/Makefile * contrib/Makefile % Minor optimization to DIRS var. (in few cases it wasn't init to empty with := operator) + contrib/hbtip/hbtipssl.hbc + contrib/hbtip/hbtipssl + contrib/hbtip/hbtipssl/Makefile * contrib/hbtip/Makefile + Now building separate SSL enabled hbtip lib in case HB_HAS_OPENSSL. + Added separate .hbc file for SSL enabled hbtip lib, which also pulls hbssl libs and dependencies. * config/prg.cf * config/lib.cf * config/bin.cf * config/globsh.cf * config/dir.cf * config/c.cf * config/header.cf * config/doc.cf * config/instsh.cf * config/dirsh.cf % Optimized remaining (more delicate) logic to use := instead of = assigment operator. At this point there is nothing left to optimize in this regard. ; I didn't restest parallel build and BISON related rules, please do so, I hope they aren't broken. Or in case you notice anything strange please shout. * config/global.cf + Added link to GNU Make NEWS files which describes at which release some features were added. * config/dos/watcom.cf * config/win/watcom.cf * config/os2/watcom.cf ! Synced special watcom CC_RULEs with recent changes to global CC_RULE. --- harbour/ChangeLog | 52 ++++++++ harbour/config/bin.cf | 6 +- harbour/config/c.cf | 22 ++-- harbour/config/dir.cf | 12 +- harbour/config/dirsh.cf | 12 +- harbour/config/doc.cf | 4 +- harbour/config/dos/watcom.cf | 4 +- harbour/config/global.cf | 7 +- harbour/config/globsh.cf | 1 + harbour/config/header.cf | 4 +- harbour/config/instsh.cf | 12 +- harbour/config/lib.cf | 6 +- harbour/config/linux/global.cf | 3 +- harbour/config/os2/watcom.cf | 2 +- harbour/config/prg.cf | 10 +- harbour/config/win/watcom.cf | 2 +- harbour/contrib/Makefile | 2 + harbour/contrib/hbcurl/Makefile | 1 + harbour/contrib/hbcurl/hbcurl.hbc | 9 +- harbour/contrib/hbcurl/hbcurls.hbc | 12 ++ harbour/contrib/hbtip/Makefile | 14 +- harbour/contrib/hbtip/hbtipssl.hbc | 10 ++ harbour/contrib/hbtip/hbtipssl/Makefile | 44 +++++++ harbour/external/Makefile | 2 + harbour/make_gnu.sh | 162 ------------------------ 25 files changed, 190 insertions(+), 225 deletions(-) create mode 100644 harbour/contrib/hbcurl/hbcurls.hbc create mode 100644 harbour/contrib/hbtip/hbtipssl.hbc create mode 100644 harbour/contrib/hbtip/hbtipssl/Makefile delete mode 100755 harbour/make_gnu.sh diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6ba6423329..c92bc3a270 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,58 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-15 11:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + - make_gnu.sh + * config/linux/global.cf + - Deleted. The -fPIC logic is moved to linux/global.cf but it's + incomplete yet, some comments were added there. + + * contrib/hbcurl/hbcurl.hbc + + contrib/hbcurl/hbcurls.hbc + + Added separate .hbc file for static mode hbcurl lib. + This replaces former HB_CURL_STATIC setting. + + * contrib/hbcurl/Makefile + * external/Makefile + * contrib/Makefile + % Minor optimization to DIRS var. + (in few cases it wasn't init to empty with := operator) + + + contrib/hbtip/hbtipssl.hbc + + contrib/hbtip/hbtipssl + + contrib/hbtip/hbtipssl/Makefile + * contrib/hbtip/Makefile + + Now building separate SSL enabled hbtip lib in case HB_HAS_OPENSSL. + + Added separate .hbc file for SSL enabled hbtip lib, which also + pulls hbssl libs and dependencies. + + * config/prg.cf + * config/lib.cf + * config/bin.cf + * config/globsh.cf + * config/dir.cf + * config/c.cf + * config/header.cf + * config/doc.cf + * config/instsh.cf + * config/dirsh.cf + % Optimized remaining (more delicate) logic to use := + instead of = assigment operator. + At this point there is nothing left to optimize in this + regard. + ; I didn't restest parallel build and BISON related rules, + please do so, I hope they aren't broken. Or in case you + notice anything strange please shout. + + * config/global.cf + + Added link to GNU Make NEWS files which describes at which release + some features were added. + + * config/dos/watcom.cf + * config/win/watcom.cf + * config/os2/watcom.cf + ! Synced special watcom CC_RULEs with recent changes to global CC_RULE. + 2009-08-15 00:40 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL * make_gnu.sh diff --git a/harbour/config/bin.cf b/harbour/config/bin.cf index e9cefc862e..97aae6276c 100644 --- a/harbour/config/bin.cf +++ b/harbour/config/bin.cf @@ -74,7 +74,7 @@ endif BIN_FILE := $(BIN_DIR)/$(BIN_NAME) -ALL_OBJS = $(ALL_C_OBJS) $(ALL_PRG_OBJS) +ALL_OBJS := $(ALL_C_OBJS) $(ALL_PRG_OBJS) first:: dirbase descend @@ -85,8 +85,8 @@ vpath $(BIN_NAME) $(BIN_DIR) $(BIN_NAME) : $(ALL_OBJS) $(LD_RULE) -INSTALL_FILES = $(BIN_FILE) -INSTALL_DIR = $(HB_BIN_INSTALL) +INSTALL_FILES := $(BIN_FILE) +INSTALL_DIR := $(HB_BIN_INSTALL) include $(TOP)$(ROOT)config/install.cf diff --git a/harbour/config/c.cf b/harbour/config/c.cf index e592be9afb..108adfcb4a 100644 --- a/harbour/config/c.cf +++ b/harbour/config/c.cf @@ -2,17 +2,17 @@ # $Id$ # -C_OBJS = $(C_SOURCES:.c=$(OBJ_EXT)) $(CPP_SOURCES:.cpp=$(OBJ_EXT)) +C_OBJS := $(C_SOURCES:.c=$(OBJ_EXT)) $(CPP_SOURCES:.cpp=$(OBJ_EXT)) -C_MAIN_OBJ = $(C_MAIN:.c=$(OBJ_EXT)) +C_MAIN_OBJ := $(C_MAIN:.c=$(OBJ_EXT)) ifdef YACC_SOURCE - YACC_BASE = $(YACC_SOURCE:.y=) - YACC_C = $(YACC_BASE)y.c - YACC_H_TMP = $(YACC_C:.c=.h) + YACC_BASE := $(YACC_SOURCE:.y=) + YACC_C := $(YACC_BASE)y.c + YACC_H_TMP := $(YACC_C:.c=.h) YACC_H := y_tab.h - YACC_OUTPUT = $(YACC_C:.c=.out) - YACC_OBJ = $(YACC_C:.c=$(OBJ_EXT)) + YACC_OUTPUT := $(YACC_C:.c=.out) + YACC_OBJ := $(YACC_C:.c=$(OBJ_EXT)) YACC_HB_H := $(foreach h, $(YACC_HEADERS), $(HB_INC_COMPILE)/$(h)) ifneq ($(YACC_DEPEND),) $(foreach f, $(YACC_DEPEND), $(f:.c=$(OBJ_EXT))) : $(YACC_C) @@ -20,13 +20,13 @@ ifdef YACC_SOURCE endif ifdef LEX_SOURCE - LEX_BASE = $(LEX_SOURCE:.l=) - LEX_C = $(LEX_BASE)l.c - LEX_OBJ = $(LEX_C:.c=$(OBJ_EXT)) + LEX_BASE := $(LEX_SOURCE:.l=) + LEX_C := $(LEX_BASE)l.c + LEX_OBJ := $(LEX_C:.c=$(OBJ_EXT)) LEX_HB_H := $(foreach h, $(LEX_HEADERS), $(HB_INC_COMPILE)/$(h)) endif -ALL_C_OBJS = $(YACC_OBJ) $(LEX_OBJ) $(C_OBJS) $(C_MAIN_OBJ) +ALL_C_OBJS := $(YACC_OBJ) $(LEX_OBJ) $(C_OBJS) $(C_MAIN_OBJ) $(YACC_OBJ) : $(YACC_C) diff --git a/harbour/config/dir.cf b/harbour/config/dir.cf index 724d862cfc..a9353c7bab 100644 --- a/harbour/config/dir.cf +++ b/harbour/config/dir.cf @@ -30,10 +30,10 @@ ifeq ($(DIR_RULE),) endef - DIRS_PURE = $(filter-out {%},$(subst {, {,$(DIRS))) - DIRS_DEP = $(filter-out $(DIRS_PURE),$(DIRS)) - DIRS_MK = $(foreach d, $(DIRS_PURE), $(if $(wildcard $(d)/Makefile),$(d),)) - DIR_RULE = $(foreach dir, $(DIRS_MK), $(dir_mk)) + DIRS_PURE := $(filter-out {%},$(subst {, {,$(DIRS))) + DIRS_DEP := $(filter-out $(DIRS_PURE),$(DIRS)) + DIRS_MK := $(foreach d, $(DIRS_PURE), $(if $(wildcard $(d)/Makefile),$(d),)) + DIR_RULE := $(foreach dir, $(DIRS_MK), $(dir_mk)) MULTI_DEPS := yes else @@ -52,8 +52,8 @@ first clean install:: else -DIRS_CLEAN = $(foreach dir, $(DIRS_MK), $(dir).clean) -DIRS_INST = $(foreach dir, $(DIRS_MK), $(dir).inst) +DIRS_CLEAN := $(foreach dir, $(DIRS_MK), $(dir).clean) +DIRS_INST := $(foreach dir, $(DIRS_MK), $(dir).inst) ifneq ($(_HB_BLD),yes) first :: $(DIRS_MK) diff --git a/harbour/config/dirsh.cf b/harbour/config/dirsh.cf index aa692228b7..502abbb6b8 100644 --- a/harbour/config/dirsh.cf +++ b/harbour/config/dirsh.cf @@ -3,8 +3,8 @@ # ifneq ($(HB_SHELL),sh) - MK_OS = $(subst /,\,$(MK)) - DIRS_OS = $(subst /,\,$(DIRS)) + MK_OS := $(subst /,\,$(MK)) + DIRS_OS := $(subst /,\,$(DIRS)) endif ifeq ($(DIRS),) # Empty directory list @@ -12,7 +12,7 @@ ifeq ($(DIRS),) # Empty directory list else ifeq ($(HB_SHELL),sh) - DIR_RULE = \ + DIR_RULE := \ @for d in $(DIRS); do \ if [ -d "$$d" ]; then \ $(MK) $(MKFLAGS) -C $$d $@; \ @@ -21,11 +21,11 @@ ifeq ($(HB_SHELL),sh) endif ifeq ($(HB_SHELL),nt) - DIR_RULE = for %%d in ($(DIRS_OS)) do $(MK_OS) $(MKFLAGS) -C %%d $@ + DIR_RULE := for %%d in ($(DIRS_OS)) do $(MK_OS) $(MKFLAGS) -C %%d $@ endif ifeq ($(HB_SHELL),os2) - DIR_RULE = for %d in ($(DIRS_OS)) do $(MK_OS) $(MKFLAGS) -C %d $@ + DIR_RULE := for %d in ($(DIRS_OS)) do $(MK_OS) $(MKFLAGS) -C %d $@ endif ifeq ($(HB_SHELL),dos) @@ -38,7 +38,7 @@ define dir_mk endef -DIR_RULE = $(foreach file,$(DIRS_OS),$(dir_mk)) +DIR_RULE := $(foreach file,$(DIRS_OS),$(dir_mk)) endif diff --git a/harbour/config/doc.cf b/harbour/config/doc.cf index 4e3eaeef64..6057194623 100644 --- a/harbour/config/doc.cf +++ b/harbour/config/doc.cf @@ -13,8 +13,8 @@ ifeq ($(HB_DOC_INSTALL),) install:: else -INSTALL_FILES = $(DOC_FILES) -INSTALL_DIR = $(HB_DOC_INSTALL)$(DOC_SUBDIR) +INSTALL_FILES := $(DOC_FILES) +INSTALL_DIR := $(HB_DOC_INSTALL)$(DOC_SUBDIR) include $(TOP)$(ROOT)config/install.cf endif diff --git a/harbour/config/dos/watcom.cf b/harbour/config/dos/watcom.cf index ae0d4b4e13..0e38493cc9 100644 --- a/harbour/config/dos/watcom.cf +++ b/harbour/config/dos/watcom.cf @@ -60,7 +60,7 @@ endif ifeq ($(CC),wcc386) ifneq ($(HB_HOST_ARCH),linux) CPPFLAGS := $(subst /,\,$(CPPFLAGS)) - CC_RULE = $(CC) $(CPPFLAGS) $(subst /,\,$(CFLAGS)) $(HB_CDBG) $(subst /,\,$(HB_USER_CFLAGS)) $(HB_CUNICODE) $(CC_IN)$(subst /,\,$<) $(CC_OUT)$(/dev/null` - case "$hb_arch" in - *windows*|*mingw32*|msys*) hb_arch="win" ;; - cygwin*) hb_arch="cyg" ;; - *os/2*) hb_arch="os2" ;; - *dos) hb_arch="dos" ;; - *bsd) hb_arch="bsd" ;; - esac - fi - export HB_ARCHITECTURE="$hb_arch" -fi - -if [ -z "$HB_COMPILER" ]; then - case "$HB_ARCHITECTURE" in - win) HB_COMPILER="mingw" ;; - cyg) HB_COMPILER="cygwin" ;; - dos) HB_COMPILER="djgpp" ;; - *) HB_COMPILER="gcc" ;; - esac - export HB_COMPILER -fi - -if [ "$HB_ARCHITECTURE" = "cyg" ] -then - export HB_ARCHITECTURE=win -fi - -if [ -z "$HB_GPM_MOUSE" ]; then - if [ "$HB_ARCHITECTURE" = "linux" ] && \ - ( [ -f /usr/include/gpm.h ] || [ -f /usr/local/include/gpm.h ]); then - HB_GPM_MOUSE=yes - else - HB_GPM_MOUSE=no - fi - export HB_GPM_MOUSE -fi - -if [ "$HB_ARCHITECTURE" = "linux" ] && \ - [ "$HB_COMPILER" != "sunpro" ] -then - if [ "${HB_USER_CFLAGS}" = "${HB_USER_CFLAGS//-fPIC/}" ] - then - HB_CPU=`uname -m` - case "$HB_CPU" in - *[@_]64) - export HB_USER_CFLAGS="$HB_USER_CFLAGS -fPIC" - ;; - *[ix]*86) - ;; - *[ix]*86[^0-9]*) - ;; - *) - export HB_USER_CFLAGS="$HB_USER_CFLAGS -fPIC" - ;; - esac - fi -fi - -if [ "$HB_ARCHITECTURE" = "win" ] || \ - [ "$HB_ARCHITECTURE" = "wce" ] || \ - [ "$HB_ARCHITECTURE" = "dos" ] || \ - [ "$HB_ARCHITECTURE" = "os2" ]; then - if [ -n "$HB_INSTALL_PREFIX" ]; then - export HB_INSTALL_PREFIX="${HB_INSTALL_PREFIX//\\//}" - fi - if [ -n "$HB_BIN_INSTALL" ]; then - export HB_BIN_INSTALL="${HB_BIN_INSTALL//\\//}" - fi - if [ -n "$HB_LIB_INSTALL" ]; then - export HB_LIB_INSTALL="${HB_LIB_INSTALL//\\//}" - fi - if [ -n "$HB_INC_INSTALL" ]; then - export HB_INC_INSTALL="${HB_INC_INSTALL//\\//}" - fi - if [ -n "$HB_DOC_INSTALL" ]; then - export HB_DOC_INSTALL="${HB_DOC_INSTALL//\\//}" - fi -fi - -[ -z "$HB_INSTALL_PREFIX" ] && [ -n "$PREFIX" ] && export HB_INSTALL_PREFIX="$PREFIX" -[ -z "$HB_INSTALL_PREFIX" ] && export HB_INSTALL_PREFIX="/usr/local" - -# Set to constant value to be consistent with the non-GNU make files. - -case "$HB_INSTALL_PREFIX" in - /usr|/usr/local|/opt) - hb_instsubdir="/harbour" - ;; - *) - hb_instsubdir="" - ;; -esac - -if [ -z "$HB_BIN_INSTALL" ]; then export HB_BIN_INSTALL="$HB_INSTALL_PREFIX/bin"; fi -if [ -z "$HB_LIB_INSTALL" ]; then export HB_LIB_INSTALL="$HB_INSTALL_PREFIX/lib$hb_instsubdir"; fi -if [ -z "$HB_INC_INSTALL" ]; then export HB_INC_INSTALL="$HB_INSTALL_PREFIX/include$hb_instsubdir"; fi - -if [ "$HB_ARCHITECTURE" = "win" ] || \ - [ "$HB_ARCHITECTURE" = "wce" ] || \ - [ "$HB_ARCHITECTURE" = "dos" ] || \ - [ "$HB_ARCHITECTURE" = "os2" ]; then - if [ -z "$HB_DOC_INSTALL" ]; then export HB_DOC_INSTALL="$HB_INSTALL_PREFIX/doc"; fi -fi - -if [ -z "$HB_ARCHITECTURE" ]; then - echo "Error: HB_ARCHITECTURE is not set." -fi -if [ -z "$HB_COMPILER" ]; then - echo "Error: HB_COMPILER is not set." -fi - -if [ -z "$HB_ARCHITECTURE" ] || [ -z "$HB_COMPILER" ]; then - - echo - echo "Usage: make_gnu.sh [command]" - echo - echo "The following commands are supported:" - echo " - all (default)" - echo " - clean" - echo " - install" - echo - echo "Please read INSTALL for HOWTOs and description" - echo "of available options." - exit - -else - - # --------------------------------------------------------------- - # Start the GNU make system - - case "$HB_ARCHITECTURE" in - bsd|hpux|sunos) - gmake $* - ;; - *) - make $* - ;; - esac - - if [ "$*" = "clean" ]; then - find . -type d -name "$HB_ARCHITECTURE" | xargs rmdir 2> /dev/null - fi -fi