From fecbf507cc15989bf0fe36a5a1a889eda1bad72c Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 15 Jul 2009 19:40:15 +0000 Subject: [PATCH] 2009-07-15 21:35 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/rules.cf * config/darwin/gcc.cf * config/hpux/gcc.cf * config/dos/dir.cf * config/dos/global.cf * config/dos/install.cf * config/global.cf * config/win/global.cf * config/win/install.cf * config/win/dir.cf * config/bin.cf * config/linux/gcc.cf * config/linux/dir.cf * config/linux/icc.cf * config/linux/global.cf * config/linux/install.cf * config/os2/dir.cf * config/os2/global.cf * config/os2/install.cf * config/dir.cf * config/sunos/gcc.cf * config/bsd/gcc.cf * config/c.cf * config/wce/dir.cf * config/wce/global.cf * config/wce/install.cf * Formatting (whitespaces, indentation). * utils/hbtest/Makefile * Moved setting before including central make files. * config/global.cf + COMSPEC detection completed. --- harbour/ChangeLog | 35 +++++++++++++++++++++++++++++++++ harbour/config/bin.cf | 16 +++++++-------- harbour/config/bsd/gcc.cf | 2 +- harbour/config/c.cf | 28 +++++++++++++------------- harbour/config/darwin/gcc.cf | 2 +- harbour/config/dir.cf | 8 ++++---- harbour/config/dos/dir.cf | 9 ++++++--- harbour/config/dos/global.cf | 5 +++-- harbour/config/dos/install.cf | 2 +- harbour/config/global.cf | 6 +++++- harbour/config/hpux/gcc.cf | 2 +- harbour/config/linux/dir.cf | 9 ++++++--- harbour/config/linux/gcc.cf | 2 +- harbour/config/linux/global.cf | 9 +++++---- harbour/config/linux/icc.cf | 2 +- harbour/config/linux/install.cf | 2 +- harbour/config/os2/dir.cf | 9 ++++++--- harbour/config/os2/global.cf | 9 +++++---- harbour/config/os2/install.cf | 2 +- harbour/config/rules.cf | 18 ++++++++--------- harbour/config/sunos/gcc.cf | 2 +- harbour/config/wce/dir.cf | 9 ++++++--- harbour/config/wce/global.cf | 9 +++++---- harbour/config/wce/install.cf | 2 +- harbour/config/win/dir.cf | 9 ++++++--- harbour/config/win/global.cf | 7 ++++--- harbour/config/win/install.cf | 2 +- harbour/utils/hbtest/Makefile | 4 ++-- 28 files changed, 140 insertions(+), 81 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 903ee5fc6b..6e27940987 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,41 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-07-15 21:35 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/rules.cf + * config/darwin/gcc.cf + * config/hpux/gcc.cf + * config/dos/dir.cf + * config/dos/global.cf + * config/dos/install.cf + * config/global.cf + * config/win/global.cf + * config/win/install.cf + * config/win/dir.cf + * config/bin.cf + * config/linux/gcc.cf + * config/linux/dir.cf + * config/linux/icc.cf + * config/linux/global.cf + * config/linux/install.cf + * config/os2/dir.cf + * config/os2/global.cf + * config/os2/install.cf + * config/dir.cf + * config/sunos/gcc.cf + * config/bsd/gcc.cf + * config/c.cf + * config/wce/dir.cf + * config/wce/global.cf + * config/wce/install.cf + * Formatting (whitespaces, indentation). + + * utils/hbtest/Makefile + * Moved setting before including central make files. + + * config/global.cf + + COMSPEC detection completed. + 2009-07-15 20:02 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/harbour.spec ! fixed RPM building after recent modification in Makefiles diff --git a/harbour/config/bin.cf b/harbour/config/bin.cf index ce1085abfc..e060f23a4b 100644 --- a/harbour/config/bin.cf +++ b/harbour/config/bin.cf @@ -14,20 +14,20 @@ include $(TOP)$(ROOT)config/global.cf include $(TOP)$(ROOT)config/c.cf include $(TOP)$(ROOT)config/prg.cf -HB_GCMODE=0 +HB_GCMODE = 0 -EXE_NAME= +EXE_NAME = ifneq ($(C_MAIN),) -ifeq ($(EXE_NAME),) -EXE_NAME = $(C_MAIN:.c=$(EXE_EXT)) -endif + ifeq ($(EXE_NAME),) + EXE_NAME = $(C_MAIN:.c=$(EXE_EXT)) + endif endif ifneq ($(PRG_MAIN),) -ifeq ($(EXE_NAME),) -EXE_NAME = $(PRG_MAIN:.prg=$(EXE_EXT)) -endif + ifeq ($(EXE_NAME),) + EXE_NAME = $(PRG_MAIN:.prg=$(EXE_EXT)) + endif endif EXE_FILE := $(EXE_DIR)/$(EXE_NAME) diff --git a/harbour/config/bsd/gcc.cf b/harbour/config/bsd/gcc.cf index 8dcba325f2..954d2b8e8d 100644 --- a/harbour/config/bsd/gcc.cf +++ b/harbour/config/bsd/gcc.cf @@ -52,7 +52,7 @@ LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) # screen driver libraries ifeq ($(HB_CRS_LIB),) -HB_CRS_LIB=ncurses +HB_CRS_LIB = ncurses endif ifneq ($(findstring gtcrs, $(HB_GT_LIBS)),) diff --git a/harbour/config/c.cf b/harbour/config/c.cf index 483c84309f..afa44c8e07 100644 --- a/harbour/config/c.cf +++ b/harbour/config/c.cf @@ -7,23 +7,23 @@ C_OBJS = $(C_SOURCES:.c=$(OBJ_EXT)) $(CPP_SOURCES:.cpp=$(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_H = y_tab.h -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) -endif + 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_HB_H := $(foreach h, $(YACC_HEADERS), $(HB_INC_COMPILE)/$(h)) + ifneq ($(YACC_DEPEND),) + $(foreach f, $(YACC_DEPEND), $(f:.c=$(OBJ_EXT))) : $(YACC_C) + endif endif ifdef LEX_SOURCE -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)) + 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) diff --git a/harbour/config/darwin/gcc.cf b/harbour/config/darwin/gcc.cf index 107970839b..49aff6e294 100644 --- a/harbour/config/darwin/gcc.cf +++ b/harbour/config/darwin/gcc.cf @@ -64,7 +64,7 @@ LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl # screen driver libraries ifeq ($(HB_CRS_LIB),) -HB_CRS_LIB=ncurses +HB_CRS_LIB = ncurses endif ifneq ($(findstring gtcrs, $(HB_GT_LIBS)),) diff --git a/harbour/config/dir.cf b/harbour/config/dir.cf index 2a6e7eda37..5f4eae53d9 100644 --- a/harbour/config/dir.cf +++ b/harbour/config/dir.cf @@ -9,11 +9,11 @@ include $(TOP)$(ROOT)config/global.cf # these make versions does not work correctly with # parallel execution rules below -OLD_MAKE:=$(MAKE_VERSION:3.7%=YES) -OLD_MAKE:=$(OLD_MAKE:3.80%=YES) +OLD_MAKE := $(MAKE_VERSION:3.7%=YES) +OLD_MAKE := $(OLD_MAKE:3.80%=YES) ifeq ($(OLD_MAKE),YES) -include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/dir.cf + include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/dir.cf endif ifeq ($(DIR_RULE),) @@ -28,7 +28,7 @@ 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)) +DIR_RULE = $(foreach dir, $(DIRS_MK), $(dir_mk)) MULTI_DEPS = yes else diff --git a/harbour/config/dos/dir.cf b/harbour/config/dos/dir.cf index d5c47cd1ce..1c0c7ea2c7 100644 --- a/harbour/config/dos/dir.cf +++ b/harbour/config/dos/dir.cf @@ -6,7 +6,8 @@ ifeq ($(PM),) # Only traverse directories if not compiling a specific module ifeq ($(DIRS),) # Empty directory list -DIR_RULE = @echo Done +DIR_RULE =\ + @echo Done else @@ -22,9 +23,11 @@ endef DIRS_OS = $(subst /,\,$(DIRS)) MK_OS = $(subst /,\,$(MK)) -DIR_RULE = $(foreach file, $(DIRS_OS), $(dir_mk)) -else # bash +DIR_RULE =\ + $(foreach file, $(DIRS_OS), $(dir_mk)) + +else # bash DIRS_OS = $(subst \,/,$(DIRS)) DIR_RULE =\ diff --git a/harbour/config/dos/global.cf b/harbour/config/dos/global.cf index 241b06fbf5..fb9d793de1 100644 --- a/harbour/config/dos/global.cf +++ b/harbour/config/dos/global.cf @@ -14,6 +14,8 @@ HB_GT_LIBS=\ ifeq ($(SHLVL),) # non-bash +DIRSEP = $(subst /,\,\) + # There is a conflict with the use of '\' and '/' characters # The MAKE requires '/' in filenames (OBJ_DIR) however some compilers # and some DOS commands require '\' (OBJ_DIR_OS) @@ -25,7 +27,6 @@ LIB_FILE_OS = $(subst /,\,$(LIB_FILE)) EXE_DIR_OS = $(subst /,\,$(EXE_DIR)) EXE_ARCH_DIR_OS = $(subst /,\,$(EXE_ARCH_DIR)) EXE_FILE_OS = $(subst /,\,$(EXE_FILE)) -DIRSEP = $(subst /,\,\) MK := $(subst \,/,$(subst \~,~,$(MAKE))) @@ -60,7 +61,7 @@ clean:: $(if $(LIB_FILE_OS),-@$(COMSPEC) /Cif exist $(LIB_FILE_OS) $(RM) $(LIB_FILE_OS),) $(if $(EXE_FILE_OS),-@$(COMSPEC) /Cif exist $(EXE_FILE_OS) $(RM) $(EXE_FILE_OS),) -else # bash +else # bash MK = $(MAKE) RM = rm -f diff --git a/harbour/config/dos/install.cf b/harbour/config/dos/install.cf index d04869d5db..66f9f0aa5c 100644 --- a/harbour/config/dos/install.cf +++ b/harbour/config/dos/install.cf @@ -25,7 +25,7 @@ INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) INSTALL_RULE =\ $(foreach file, $(INSTALL_FILES_OS), $(inst_file)) -else # bash +else # bash INSTALL_DIR_OS = $(subst \,/,$(INSTALL_DIR)) INSTALL_FILES_OS = $(subst \,/,$(INSTALL_FILES)) diff --git a/harbour/config/global.cf b/harbour/config/global.cf index 441fa47d2e..1c0d512da1 100644 --- a/harbour/config/global.cf +++ b/harbour/config/global.cf @@ -23,8 +23,8 @@ all: ; @echo Error: GNU Make version $(MAKE_VERSION) found, $(need) or upper nee else GRANDP = ../../../ -OBJ_BASE := obj ARCH_COMP := $(HB_ARCHITECTURE)/$(HB_COMPILER) +OBJ_BASE := obj OBJ_DIR := $(OBJ_BASE)/$(ARCH_COMP) OBJ_ARCH_DIR := $(OBJ_BASE)/$(HB_ARCHITECTURE) @@ -81,6 +81,10 @@ else ifeq ($(OS),Windows_NT) ifneq ($(ComSpec),) COMSPEC := $(ComSpec) + else + ifeq ($(COMSPEC),) + COMSPEC := cmd.exe + endif endif HB_SHELL := nt else diff --git a/harbour/config/hpux/gcc.cf b/harbour/config/hpux/gcc.cf index 958181d17b..957f4c376b 100644 --- a/harbour/config/hpux/gcc.cf +++ b/harbour/config/hpux/gcc.cf @@ -58,7 +58,7 @@ LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl # screen driver libraries ifeq ($(HB_CRS_LIB),) -HB_CRS_LIB=ncurses +HB_CRS_LIB = ncurses endif ifneq ($(findstring gtcrs, $(HB_GT_LIBS)),) LINKLIBS += -l$(HB_CRS_LIB) diff --git a/harbour/config/linux/dir.cf b/harbour/config/linux/dir.cf index 179d9f7b6f..986129bef5 100644 --- a/harbour/config/linux/dir.cf +++ b/harbour/config/linux/dir.cf @@ -6,7 +6,8 @@ ifeq ($(PM),) # Only traverse directories if not compiling a specific module ifeq ($(DIRS),) # Empty directory list -DIR_RULE = @echo Done +DIR_RULE =\ + @echo Done else @@ -14,9 +15,11 @@ ifeq ($(SHLVL),) # non-bash MK_OS = $(subst /,\,$(MK)) DIRS_OS = $(subst /,\,$(DIRS)) -DIR_RULE = $(COMSPEC) /C for %d in ($(DIRS_OS)) do $(MK_OS) -C %d $@ -else # bash +DIR_RULE =\ + $(COMSPEC) /C for %d in ($(DIRS_OS)) do $(MK_OS) -C %d $@ + +else # bash DIR_RULE =\ @for d in $(DIRS); do \ diff --git a/harbour/config/linux/gcc.cf b/harbour/config/linux/gcc.cf index fa3e77af8c..f1a6d8ff03 100644 --- a/harbour/config/linux/gcc.cf +++ b/harbour/config/linux/gcc.cf @@ -70,7 +70,7 @@ LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) # screen driver libraries ifeq ($(HB_CRS_LIB),) -HB_CRS_LIB=ncurses +HB_CRS_LIB = ncurses endif ifneq ($(findstring gtcrs, $(HB_GT_LIBS)),) LINKLIBS += -l$(HB_CRS_LIB) diff --git a/harbour/config/linux/global.cf b/harbour/config/linux/global.cf index 5fec30f926..79504debdc 100644 --- a/harbour/config/linux/global.cf +++ b/harbour/config/linux/global.cf @@ -12,15 +12,16 @@ HB_GT_LIBS=\ ifeq ($(SHLVL),) # non-bash +DIRSEP = $(subst /,\,\) + OBJ_DIR_OS = $(subst /,\,$(OBJ_DIR)) OBJ_ARCH_DIR_OS = $(subst /,\,$(OBJ_ARCH_DIR)) -LIB_DIR_OS = $(subst /,\,$(LIB_DIR)) +LIB_DIR_OS = $(subst /,\,$(LIB_DIR)) LIB_ARCH_DIR_OS = $(subst /,\,$(LIB_ARCH_DIR)) LIB_FILE_OS = $(subst /,\,$(LIB_FILE)) -EXE_DIR_OS = $(subst /,\,$(EXE_DIR)) +EXE_DIR_OS = $(subst /,\,$(EXE_DIR)) EXE_ARCH_DIR_OS = $(subst /,\,$(EXE_ARCH_DIR)) EXE_FILE_OS = $(subst /,\,$(EXE_FILE)) -DIRSEP = $(subst /,\,\) MK = $(subst /,\,$(subst \~,~,$(MAKE))) @@ -69,7 +70,7 @@ clean:: endif -else # bash +else # bash MK = $(MAKE) RM = rm -f diff --git a/harbour/config/linux/icc.cf b/harbour/config/linux/icc.cf index d81ed36625..e3143a84de 100644 --- a/harbour/config/linux/icc.cf +++ b/harbour/config/linux/icc.cf @@ -64,7 +64,7 @@ LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) # screen driver libraries ifeq ($(HB_CRS_LIB),) -HB_CRS_LIB=ncurses +HB_CRS_LIB = ncurses endif ifneq ($(findstring gtcrs, $(HB_GT_LIBS)),) LINKLIBS += -l$(HB_CRS_LIB) diff --git a/harbour/config/linux/install.cf b/harbour/config/linux/install.cf index cd1b58df8d..f4d3d8f769 100644 --- a/harbour/config/linux/install.cf +++ b/harbour/config/linux/install.cf @@ -36,7 +36,7 @@ INSTALL_RULE =\ endif -else # bash +else # bash INSTALL_RULE =\ @if [ -z $(INSTALL_DIR) ] || [ ! -d $(INSTALL_DIR) ]; \ diff --git a/harbour/config/os2/dir.cf b/harbour/config/os2/dir.cf index 179d9f7b6f..986129bef5 100644 --- a/harbour/config/os2/dir.cf +++ b/harbour/config/os2/dir.cf @@ -6,7 +6,8 @@ ifeq ($(PM),) # Only traverse directories if not compiling a specific module ifeq ($(DIRS),) # Empty directory list -DIR_RULE = @echo Done +DIR_RULE =\ + @echo Done else @@ -14,9 +15,11 @@ ifeq ($(SHLVL),) # non-bash MK_OS = $(subst /,\,$(MK)) DIRS_OS = $(subst /,\,$(DIRS)) -DIR_RULE = $(COMSPEC) /C for %d in ($(DIRS_OS)) do $(MK_OS) -C %d $@ -else # bash +DIR_RULE =\ + $(COMSPEC) /C for %d in ($(DIRS_OS)) do $(MK_OS) -C %d $@ + +else # bash DIR_RULE =\ @for d in $(DIRS); do \ diff --git a/harbour/config/os2/global.cf b/harbour/config/os2/global.cf index c8677fc4da..9c144f9d74 100644 --- a/harbour/config/os2/global.cf +++ b/harbour/config/os2/global.cf @@ -12,15 +12,16 @@ HB_GT_LIBS=\ ifeq ($(SHLVL),) # non-bash +DIRSEP = $(subst /,\,\) + OBJ_DIR_OS = $(subst /,\,$(OBJ_DIR)) OBJ_ARCH_DIR_OS = $(subst /,\,$(OBJ_ARCH_DIR)) -LIB_DIR_OS = $(subst /,\,$(LIB_DIR)) +LIB_DIR_OS = $(subst /,\,$(LIB_DIR)) LIB_ARCH_DIR_OS = $(subst /,\,$(LIB_ARCH_DIR)) LIB_FILE_OS = $(subst /,\,$(LIB_FILE)) -EXE_DIR_OS = $(subst /,\,$(EXE_DIR)) +EXE_DIR_OS = $(subst /,\,$(EXE_DIR)) EXE_ARCH_DIR_OS = $(subst /,\,$(EXE_ARCH_DIR)) EXE_FILE_OS = $(subst /,\,$(EXE_FILE)) -DIRSEP = $(subst /,\,\) MK := $(subst /,\,$(subst \~,~,$(MAKE))) @@ -69,7 +70,7 @@ clean:: endif -else # bash +else # bash MK = $(MAKE) RM = rm -f diff --git a/harbour/config/os2/install.cf b/harbour/config/os2/install.cf index cd1b58df8d..f4d3d8f769 100644 --- a/harbour/config/os2/install.cf +++ b/harbour/config/os2/install.cf @@ -36,7 +36,7 @@ INSTALL_RULE =\ endif -else # bash +else # bash INSTALL_RULE =\ @if [ -z $(INSTALL_DIR) ] || [ ! -d $(INSTALL_DIR) ]; \ diff --git a/harbour/config/rules.cf b/harbour/config/rules.cf index 03bf4a3998..5683f82343 100644 --- a/harbour/config/rules.cf +++ b/harbour/config/rules.cf @@ -11,9 +11,9 @@ LEX = flex LEX_FLAGS := -i -8 $(LEX_FLAGS) ifeq ($(HB_BUILD_DEBUG),yes) -HB_CDBG = -DHB_TR_LEVEL_DEBUG + HB_CDBG = -DHB_TR_LEVEL_DEBUG else -HB_PDBG = -l + HB_PDBG = -l endif # @@ -22,27 +22,27 @@ endif HB := $(HB_BIN_COMPILE)/harbour$(HB_HOST_BIN_EXT) ifeq ($(HB_GCMODE),) - HB_GCMODE=0 + HB_GCMODE = 0 endif HB_FLAGS := -i$(HB_INC_COMPILE) -q0 -w3 -es2 -kmo $(HB_PDBG) HB_RULE = $(HB) $? -n1 $(HB_FLAGS) -gc$(HB_GCMODE) $(HB_FLAGSEXTRA) $(HB_USER_PRGFLAGS) # The rule to compile a C source file. ifeq ($(CC_RULE),) -# Use default rule if architecture/compiler specific rule is not defined -CC_RULE = $(CC) $(CPPFLAGS) $(CFLAGS) $(HB_CDBG) $(HB_USER_CFLAGS) $(HB_CDYNLIB) $(CC_IN) $< $(CC_OUT)$(