diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5f78e4d6f4..ba465089b1 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,58 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-07-16 02:57 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + - config/hpux/dir.cf + * config/hpux/global.cf + - config/hpux/install.cf + - config/darwin/dir.cf + * config/darwin/global.cf + - config/darwin/install.cf + - config/dos/dir.cf + * config/dos/global.cf + - config/dos/install.cf + * config/win/global.cf + - config/win/install.cf + - config/win/dir.cf + - config/linux/dir.cf + * config/linux/global.cf + - config/linux/install.cf + - config/os2/dir.cf + * config/os2/global.cf + - config/os2/install.cf + - config/sunos/dir.cf + * config/sunos/global.cf + - config/sunos/install.cf + - config/bsd/dir.cf + * config/bsd/global.cf + - config/bsd/install.cf + - config/wce/dir.cf + * config/wce/global.cf + - config/wce/install.cf + * Minor change in dos specific dirbase:: checks. Should be + equivalent. + * darwin/gcc was running RANLIB on install. I've removed + this for now and if ranlib is required on Darwin, it + should be readded to gcc.cf. + + * config/os2/gcc.cf + * Changed to not rely on LIB_FILE_OS. + + * config/dir.cf + + config/dirsh.cf + * config/global.cf + + config/globsh.cf + * config/install.cf + + config/instsh.cf + ! Fixed NT vs dos shell detection. (hopefully) + + Shell dependent logic merged and moved into new *_sh.cf + files. The filename is ugly, but couldn't yet find a better one. + This means a great deal of redundancy is now removed, plus + now cross-platform combinations aren't limited by missing + shell support. New shells can now be added with much less work. + ; Please test, it's possible that I made some mistakes along the way, + and haven't tested bash yet. Nor OS/2 obviously. + 2009-07-16 01:11 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/global.cf * config/win/global.cf diff --git a/harbour/config/bsd/dir.cf b/harbour/config/bsd/dir.cf deleted file mode 100644 index 63132daa76..0000000000 --- a/harbour/config/bsd/dir.cf +++ /dev/null @@ -1,14 +0,0 @@ -# -# $Id$ -# - -ifeq ($(PM),) # Only traverse directories if not compiling a specific module - -DIR_RULE =\ - @for d in $(DIRS); do \ - if [ -d $$d ]; then \ - $(MAKE) -C $$d $@; \ - fi \ - done - -endif # ! compiling a specific program module diff --git a/harbour/config/bsd/global.cf b/harbour/config/bsd/global.cf index a63227ea2c..71ac82558e 100644 --- a/harbour/config/bsd/global.cf +++ b/harbour/config/bsd/global.cf @@ -4,27 +4,7 @@ all : first -HB_GT_LIBS=\ - gtcgi \ - gtpca \ - gtstd \ - gttrm \ +HB_GT_LIBS += gttrm MAKE = gmake - -MK = $(MAKE) -RM = rm -f -RD = rm -f -r -CP = cp -f -MV = mv -f -MD = mkdir -MDP = mkdir -p RANLIB = ranlib - -dirbase:: - @[ -d $(OBJ_DIR) ] || $(MDP) $(OBJ_DIR) - @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) - @[ -z $(EXE_DIR) ] || [ -d $(EXE_DIR) ] || $(MDP) $(EXE_DIR) - -clean:: - -$(RD) $(OBJ_DIR) $(LIB_FILE) $(EXE_FILE) diff --git a/harbour/config/bsd/install.cf b/harbour/config/bsd/install.cf deleted file mode 100644 index 33fe370655..0000000000 --- a/harbour/config/bsd/install.cf +++ /dev/null @@ -1,22 +0,0 @@ -# -# $Id$ -# - -INSTALL_RULE =\ - @if [ ! -d $(INSTALL_DIR) ]; \ - then \ - echo "! Can't install, path not found: '$(INSTALL_DIR)'" 1>&2; \ - false; \ - else \ - for i in $(INSTALL_FILES); \ - do \ - if [ -r $$i ]; \ - then \ - echo "! Installing $$i on $(INSTALL_DIR)"; \ - $(CP) $$i $(INSTALL_DIR); \ - true; \ - else \ - echo "! Can't install $$i, not found" 1>&2; \ - fi \ - done \ - fi diff --git a/harbour/config/darwin/dir.cf b/harbour/config/darwin/dir.cf deleted file mode 100644 index 63132daa76..0000000000 --- a/harbour/config/darwin/dir.cf +++ /dev/null @@ -1,14 +0,0 @@ -# -# $Id$ -# - -ifeq ($(PM),) # Only traverse directories if not compiling a specific module - -DIR_RULE =\ - @for d in $(DIRS); do \ - if [ -d $$d ]; then \ - $(MAKE) -C $$d $@; \ - fi \ - done - -endif # ! compiling a specific program module diff --git a/harbour/config/darwin/global.cf b/harbour/config/darwin/global.cf index 02a3327841..502d01b527 100644 --- a/harbour/config/darwin/global.cf +++ b/harbour/config/darwin/global.cf @@ -4,25 +4,6 @@ all : first -HB_GT_LIBS=\ - gtcgi \ - gtpca \ - gtstd \ - gttrm \ +HB_GT_LIBS += gttrm -MK = $(MAKE) -RM = rm -f -RD = rm -f -r -CP = cp -f -MV = mv -f -MD = mkdir -MDP = mkdir -p RANLIB = ranlib - -dirbase:: - @[ -d $(OBJ_DIR) ] || $(MDP) $(OBJ_DIR) - @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) - @[ -z $(EXE_DIR) ] || [ -d $(EXE_DIR) ] || $(MDP) $(EXE_DIR) - -clean:: - -$(RD) $(OBJ_DIR) $(LIB_FILE) $(EXE_FILE) diff --git a/harbour/config/darwin/install.cf b/harbour/config/darwin/install.cf deleted file mode 100644 index 5e91ffbe61..0000000000 --- a/harbour/config/darwin/install.cf +++ /dev/null @@ -1,26 +0,0 @@ -# -# $Id$ -# - -INSTALL_RULE =\ - @if [ ! -d $(INSTALL_DIR) ]; \ - then \ - echo "! Can't install, path not found: '$(INSTALL_DIR)'" 1>&2; \ - false; \ - else \ - for i in $(INSTALL_FILES); \ - do \ - if [ -r $$i ]; \ - then \ - echo "! Installing $$i on $(INSTALL_DIR)"; \ - $(CP) $$i $(INSTALL_DIR); \ - true; \ - else \ - echo "! Can't install $$i, not found" 1>&2; \ - fi \ - done; \ - if [ $(INSTALL_DIR) = $(HB_LIB_INSTALL) ]; \ - then \ - $(RANLIB) $(foreach file,$(notdir $(INSTALL_FILES)),$(INSTALL_DIR)/$(file)); \ - fi \ - fi diff --git a/harbour/config/dir.cf b/harbour/config/dir.cf index 5f4eae53d9..29f9a29147 100644 --- a/harbour/config/dir.cf +++ b/harbour/config/dir.cf @@ -13,7 +13,9 @@ 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 + ifeq ($(PM),) # Only traverse directories if not compiling a specific module + include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/dirsh.cf + endif endif ifeq ($(DIR_RULE),) diff --git a/harbour/config/dos/dir.cf b/harbour/config/dirsh.cf similarity index 57% rename from harbour/config/dos/dir.cf rename to harbour/config/dirsh.cf index 04fea6ab11..3d9261535a 100644 --- a/harbour/config/dos/dir.cf +++ b/harbour/config/dirsh.cf @@ -2,8 +2,6 @@ # $Id$ # -ifeq ($(PM),) # Only traverse directories if not compiling a specific module - ifeq ($(DIRS),) # Empty directory list DIR_RULE =\ @@ -11,7 +9,32 @@ DIR_RULE =\ else -ifneq ($(HB_SHELL),bash) +ifeq ($(HB_SHELL),bash) + +DIR_RULE =\ + @for d in $(DIRS); do \ + if [ -d $$d ]; then \ + $(MAKE) -C $$d $@; \ + fi \ + done + +else ifeq ($(HB_SHELL),nt) + +MK_OS = $(subst /,\,$(MK)) +DIRS_OS = $(subst /,\,$(DIRS)) + +DIR_RULE =\ + $(COMSPEC) /C for %d in ($(DIRS_OS)) do $(MK_OS) -C %d $@ + +else ifeq ($(HB_SHELL),os2) + +MK_OS = $(subst /,\,$(MK)) +DIRS_OS = $(subst /,\,$(DIRS)) + +DIR_RULE =\ + $(COMSPEC) /C for %d in ($(DIRS_OS)) do $(MK_OS) -C %d $@ + +else ifeq ($(HB_SHELL),dos) # We have to use script to overcome the DOS limit of max 128 characters # NOTE: The empty line directly before 'endef' HAVE TO exist! @@ -27,18 +50,6 @@ MK_OS = $(subst /,\,$(MK)) DIR_RULE =\ $(foreach file, $(DIRS_OS), $(dir_mk)) -else # bash - -DIRS_OS = $(subst \,/,$(DIRS)) -DIR_RULE =\ - @for d in $(DIRS_OS); do \ - if [ -d $$d ]; then \ - $(MAKE) -C $$d $@; \ - fi \ - done - -endif # ! non-bash +endif endif # ! Empty directory list - -endif # ! compiling a specific program module diff --git a/harbour/config/dos/global.cf b/harbour/config/dos/global.cf index c066b27b01..21ef374134 100644 --- a/harbour/config/dos/global.cf +++ b/harbour/config/dos/global.cf @@ -6,68 +6,6 @@ ifndef MK all : first -HB_GT_LIBS=\ - gtcgi \ - gtpca \ - gtstd \ - gtdos \ - -ifneq ($(HB_SHELL),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) -OBJ_DIR_OS = $(subst /,\,$(OBJ_DIR)) -OBJ_ARCH_DIR_OS = $(subst /,\,$(OBJ_ARCH_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_ARCH_DIR_OS = $(subst /,\,$(EXE_ARCH_DIR)) -EXE_FILE_OS = $(subst /,\,$(EXE_FILE)) - -# QUESTION: Anyone knows why is this needed? [vszakats] -ifeq ($(HB_COMPILER),watcom) - COMSPEC := $(subst \,/,$(COMSPEC)) -endif - -MK = $(subst \,/,$(subst \~,~,$(MAKE))) -RM = del -RD = rmdir -CP = $(COMSPEC) /Ccopy -MV = move -MD = md - -dirbase:: - -@$(COMSPEC) /Cfor %d in ($(OBJ_BASE) $(OBJ_ARCH_DIR_OS) $(OBJ_DIR_OS)) do if not exist %d\nul $(MD) %d - $(if $(LIB_ARCH_DIR_OS),-@$(COMSPEC) /Cfor %d in ($(LIB_ARCH_DIR_OS) $(LIB_DIR_OS)) do if not exist %d\nul $(MD) %d,) - $(if $(EXE_ARCH_DIR_OS),-@$(COMSPEC) /Cfor %d in ($(EXE_ARCH_DIR_OS) $(EXE_DIR_OS)) do if not exist %d\nul $(MD) %d,) - -clean:: - -@$(COMSPEC) /Cfor %f in ($(OBJ_DIR_OS)\*.* *.bak *.obj *.o *.tds) do $(RM) %f - -@$(COMSPEC) /Cfor %d in ($(OBJ_DIR_OS) $(OBJ_ARCH_DIR_OS) $(OBJ_BASE)) do if exist %d\nul $(RD) %d - $(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 - -MK = $(MAKE) -RM = rm -f -RD = rm -f -r -CP = cp -f -MV = mv -f -MD = mkdir -MDP = mkdir -p - -dirbase:: - @sh -c "[ -d $(OBJ_DIR) ] || $(MDP) $(OBJ_DIR)" - @sh -c "[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR)" - @sh -c "[ -z $(EXE_DIR) ] || [ -d $(EXE_DIR) ] || $(MDP) $(EXE_DIR)" - -clean:: - -$(RD) $(OBJ_DIR) $(LIB_FILE) $(EXE_FILE) +HB_GT_LIBS += gtdos endif -endif diff --git a/harbour/config/dos/install.cf b/harbour/config/dos/install.cf deleted file mode 100644 index 33acf01a96..0000000000 --- a/harbour/config/dos/install.cf +++ /dev/null @@ -1,53 +0,0 @@ -# -# $Id$ -# - -ifeq ($(INSTALL_FILES),) # Empty install list - -INSTALL_RULE =\ - @echo Done - -else - -ifneq ($(HB_SHELL),bash) - -# We have to use script to overcome the DOS limit of max 128 characters -# NOTE: The empty line directly before 'endef' HAVE TO exist! -# It causes that every commands will be separated by LF -define inst_file -$(COMSPEC) /Cxcopy /Y /I $(file) $(INSTALL_DIR_OS) - -endef - -INSTALL_DIR_OS = $(subst /,\,$(INSTALL_DIR)) -INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) - -INSTALL_RULE =\ - $(foreach file, $(INSTALL_FILES_OS), $(inst_file)) - -else # bash - -INSTALL_DIR_OS = $(subst \,/,$(INSTALL_DIR)) -INSTALL_FILES_OS = $(subst \,/,$(INSTALL_FILES)) - -INSTALL_RULE =\ - @sh -c 'if [ ! -d $(INSTALL_DIR_OS) ]; \ - then \ - echo "! Cannot install, path not found: $(INSTALL_DIR_OS)" 1>&2; \ - else \ - for i in $(INSTALL_FILES_OS); \ - do \ - if [ -r $$i ]; \ - then \ - echo "! Installing $$i on $(INSTALL_DIR_OS)"; \ - $(CP) $$i $(INSTALL_DIR_OS); \ - true; \ - else \ - echo "! Cannot install $$i, not found" 1>&2; \ - fi \ - done \ - fi' - -endif - -endif # Empty install list diff --git a/harbour/config/global.cf b/harbour/config/global.cf index 2330c41e89..90f131af01 100644 --- a/harbour/config/global.cf +++ b/harbour/config/global.cf @@ -78,22 +78,23 @@ else ifneq ($(OS2_SHELL),) HB_SHELL := os2 else - ifeq ($(OS),Windows_NT) - HB_SHELL := nt - ifneq ($(ComSpec),) - COMSPEC := $(ComSpec) + ifneq ($(ComSpec),) + COMSPEC := $(ComSpec) + endif + ifeq ($(COMSPEC),) + ifeq ($(OS),Windows_NT) + COMSPEC := cmd.exe else - ifeq ($(COMSPEC),) - COMSPEC := cmd.exe - endif - endif - else - # MS-DOS or Win9x - HB_SHELL := dos - ifeq ($(COMSPEC),) COMSPEC := command.com endif endif + ifneq ($(findstring COMMAND,$(COMSPEC)),) + HB_SHELL := dos + else ifneq ($(findstring command,$(COMSPEC)),) + HB_SHELL := dos + else + HB_SHELL := nt + endif endif endif @@ -220,6 +221,12 @@ ifneq ($(HB_HOST_ARCH)$(HB_HOST_CPU),$(HB_ARCHITECTURE)$(HB_CPU)) endif endif +# Names of portable GT drivers +HB_GT_LIBS=\ + gtcgi \ + gtpca \ + gtstd \ + # Names of valid RDD libraries HB_DB_DRIVERS=\ rddntx \ @@ -256,6 +263,7 @@ ifeq ($(HB_INC_COMPILE),) endif include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf +include $(TOP)$(ROOT)config/globsh.cf include $(TOP)$(ROOT)config/$(ARCH_COMP).cf endif diff --git a/harbour/config/globsh.cf b/harbour/config/globsh.cf new file mode 100644 index 0000000000..28529f88cd --- /dev/null +++ b/harbour/config/globsh.cf @@ -0,0 +1,117 @@ +# +# $Id$ +# + +ifeq ($(HB_SHELL),bash) + +MK = $(MAKE) +RM = rm -f +RD = rm -f -r +CP = cp -f +MV = mv -f +MD = mkdir +MDP = mkdir -p + +dirbase:: + @[ -d $(OBJ_DIR) ] || $(MDP) $(OBJ_DIR) + @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) + @[ -z $(EXE_DIR) ] || [ -d $(EXE_DIR) ] || $(MDP) $(EXE_DIR) + +clean:: + -$(RD) $(OBJ_DIR) $(LIB_FILE) $(EXE_FILE) + +else ifeq ($(HB_SHELL),nt) + +DIRSEP = $(subst /,\,\) + +OBJ_DIR_OS = $(subst /,\,$(OBJ_DIR)) +LIB_DIR_OS = $(subst /,\,$(LIB_DIR)) +LIB_FILE_OS = $(subst /,\,$(LIB_FILE)) +EXE_DIR_OS = $(subst /,\,$(EXE_DIR)) +EXE_FILE_OS = $(subst /,\,$(EXE_FILE)) + +MK = $(subst \,/,$(subst \~,~,$(MAKE))) +RM = del /q /f +RD = rmdir /q /s +CP = $(COMSPEC) /c copy +MV = move +MD = mkdir + +dirbase:: + -@$(COMSPEC) /c if not exist $(OBJ_DIR_OS) $(MD) $(OBJ_DIR_OS) + $(if $(LIB_DIR_OS),-@$(COMSPEC) /c if not exist $(LIB_DIR_OS) $(MD) $(LIB_DIR_OS),) + $(if $(EXE_DIR_OS),-@$(COMSPEC) /c if not exist $(EXE_DIR_OS) $(MD) $(EXE_DIR_OS),) + +clean:: + -@$(COMSPEC) /c if exist $(OBJ_DIR_OS) $(RD) $(OBJ_DIR_OS) + $(if $(LIB_FILE_OS),-@$(COMSPEC) /c if exist $(LIB_FILE_OS) $(RM) $(LIB_FILE_OS),) + $(if $(EXE_FILE_OS),-@$(COMSPEC) /c if exist $(EXE_FILE_OS) $(RM) $(EXE_FILE_OS),) + +else ifeq ($(HB_SHELL),os2) + +DIRSEP = $(subst /,\,\) + +OBJ_DIR_OS = $(subst /,\,$(OBJ_DIR)) +OBJ_ARCH_DIR_OS = $(subst /,\,$(OBJ_ARCH_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_ARCH_DIR_OS = $(subst /,\,$(EXE_ARCH_DIR)) +EXE_FILE_OS = $(subst /,\,$(EXE_FILE)) + +MK = $(subst /,\,$(subst \~,~,$(MAKE))) +RM = del /n +RD = rmdir +CP = copy +MV = move +MD = md + +dirbase:: + -for %d in ($(OBJ_BASE) $(OBJ_ARCH_DIR_OS) $(OBJ_DIR_OS)) do if not exist %d $(MD) %d + $(if $(LIB_FILE_OS),-for %d in ($(LIB_ARCH_DIR_OS) $(LIB_DIR_OS)) do if not exist %d $(MD) %d,) + $(if $(EXE_FILE_OS),-for %d in ($(EXE_ARCH_DIR_OS) $(EXE_DIR_OS)) do if not exist %d $(MD) %d,) + +clean:: + -if exist $(OBJ_DIR_OS)\*.* $(RM) $(OBJ_DIR_OS)\*.* + -for %d in ($(OBJ_DIR_OS) $(OBJ_ARCH_DIR_OS) $(OBJ_BASE)) do if exist %d $(RD) %d + $(if $(LIB_FILE_OS),-if exist $(LIB_FILE_OS) $(RM) $(LIB_FILE_OS),) + $(if $(EXE_FILE_OS),-if exist $(EXE_FILE_OS) $(RM) $(EXE_FILE_OS),) + +else ifeq ($(HB_SHELL),dos) + +DIRSEP = $(subst /,\,\) + +OBJ_DIR_OS = $(subst /,\,$(OBJ_DIR)) +OBJ_ARCH_DIR_OS = $(subst /,\,$(OBJ_ARCH_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_ARCH_DIR_OS = $(subst /,\,$(EXE_ARCH_DIR)) +EXE_FILE_OS = $(subst /,\,$(EXE_FILE)) + +# QUESTION: Anyone knows why is this needed? [vszakats] +ifeq ($(HB_COMPILER),watcom) + COMSPEC := $(subst \,/,$(COMSPEC)) +endif + +MK = $(subst \,/,$(subst \~,~,$(MAKE))) +RM = del +RD = rmdir +CP = $(COMSPEC) /Ccopy +MV = move +MD = md + +dirbase:: + -@$(COMSPEC) /Cfor %d in ($(OBJ_BASE) $(OBJ_ARCH_DIR_OS) $(OBJ_DIR_OS)) do if not exist %d\nul $(MD) %d + $(if $(LIB_FILE_OS),-@$(COMSPEC) /Cfor %d in ($(LIB_ARCH_DIR_OS) $(LIB_DIR_OS)) do if not exist %d\nul $(MD) %d,) + $(if $(EXE_FILE_OS),-@$(COMSPEC) /Cfor %d in ($(EXE_ARCH_DIR_OS) $(EXE_DIR_OS)) do if not exist %d\nul $(MD) %d,) + +clean:: + -@$(COMSPEC) /Cfor %f in ($(OBJ_DIR_OS)\*.* *.bak *.obj *.o *.tds) do $(RM) %f + -@$(COMSPEC) /Cfor %d in ($(OBJ_DIR_OS) $(OBJ_ARCH_DIR_OS) $(OBJ_BASE)) do if exist %d\nul $(RD) %d + $(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),) + +endif diff --git a/harbour/config/hpux/dir.cf b/harbour/config/hpux/dir.cf deleted file mode 100644 index 63132daa76..0000000000 --- a/harbour/config/hpux/dir.cf +++ /dev/null @@ -1,14 +0,0 @@ -# -# $Id$ -# - -ifeq ($(PM),) # Only traverse directories if not compiling a specific module - -DIR_RULE =\ - @for d in $(DIRS); do \ - if [ -d $$d ]; then \ - $(MAKE) -C $$d $@; \ - fi \ - done - -endif # ! compiling a specific program module diff --git a/harbour/config/hpux/global.cf b/harbour/config/hpux/global.cf index 1f8b55c745..77e7b9d421 100644 --- a/harbour/config/hpux/global.cf +++ b/harbour/config/hpux/global.cf @@ -4,24 +4,4 @@ all : first -HB_GT_LIBS=\ - gtcgi \ - gtpca \ - gtstd \ - gttrm \ - -MK = $(MAKE) -RM = rm -f -RD = rm -f -r -CP = cp -f -MV = mv -f -MD = mkdir -MDP = mkdir -p - -dirbase:: - @[ -d $(OBJ_DIR) ] || $(MDP) $(OBJ_DIR) - @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) - @[ -z $(EXE_DIR) ] || [ -d $(EXE_DIR) ] || $(MDP) $(EXE_DIR) - -clean:: - -$(RD) $(OBJ_DIR) $(LIB_FILE) $(EXE_FILE) +HB_GT_LIBS += gttrm diff --git a/harbour/config/hpux/install.cf b/harbour/config/hpux/install.cf deleted file mode 100644 index 33fe370655..0000000000 --- a/harbour/config/hpux/install.cf +++ /dev/null @@ -1,22 +0,0 @@ -# -# $Id$ -# - -INSTALL_RULE =\ - @if [ ! -d $(INSTALL_DIR) ]; \ - then \ - echo "! Can't install, path not found: '$(INSTALL_DIR)'" 1>&2; \ - false; \ - else \ - for i in $(INSTALL_FILES); \ - do \ - if [ -r $$i ]; \ - then \ - echo "! Installing $$i on $(INSTALL_DIR)"; \ - $(CP) $$i $(INSTALL_DIR); \ - true; \ - else \ - echo "! Can't install $$i, not found" 1>&2; \ - fi \ - done \ - fi diff --git a/harbour/config/install.cf b/harbour/config/install.cf index d40d54a05f..8244819d8c 100644 --- a/harbour/config/install.cf +++ b/harbour/config/install.cf @@ -2,7 +2,7 @@ # $Id$ # -include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/install.cf +include $(TOP)$(ROOT)config/instsh.cf ifneq ($(HB_INSTALL_DEF),yes) install:: first diff --git a/harbour/config/linux/install.cf b/harbour/config/instsh.cf similarity index 68% rename from harbour/config/linux/install.cf rename to harbour/config/instsh.cf index 253ea52fee..7446764489 100644 --- a/harbour/config/linux/install.cf +++ b/harbour/config/instsh.cf @@ -9,34 +9,7 @@ INSTALL_RULE =\ else -ifneq ($(HB_SHELL),bash) - -ifneq ($(HB_SHELL),os2) - -INSTALL_DIR_OS = $(subst /,\,$(INSTALL_DIR)) -INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) - -INSTALL_RULE =\ - -$(COMSPEC) /c for %%f in ($(INSTALL_FILES_OS)) do copy "%%f" "$(INSTALL_DIR_OS)" - -else # OS/2 - -# We have to use script to overcome the max command size limit -# NOTE: The empty line directly before 'endef' HAVE TO exist! -# It causes that every commands will be separated by LF -define inst_file -$(COMSPEC) /C $(CP) $(file) $(subst /,\,$(INSTALL_DIR)) - -endef - -INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) - -INSTALL_RULE =\ - $(foreach file, $(INSTALL_FILES_OS), $(inst_file)) - -endif - -else # bash +ifeq ($(HB_SHELL),bash) INSTALL_RULE =\ @if [ -z $(INSTALL_DIR) ] || [ ! -d $(INSTALL_DIR) ]; \ @@ -57,6 +30,45 @@ INSTALL_RULE =\ done \ fi +else ifeq ($(HB_SHELL),nt) + +INSTALL_DIR_OS = $(subst /,\,$(INSTALL_DIR)) +INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) + +INSTALL_RULE =\ + -$(COMSPEC) /c for %%f in ($(INSTALL_FILES_OS)) do copy "%%f" "$(INSTALL_DIR_OS)" + +else ifeq ($(HB_SHELL),os2) + +# We have to use script to overcome the max command size limit +# NOTE: The empty line directly before 'endef' HAVE TO exist! +# It causes that every commands will be separated by LF +define inst_file +$(COMSPEC) /C $(CP) $(file) $(subst /,\,$(INSTALL_DIR)) + +endef + +INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) + +INSTALL_RULE =\ + $(foreach file, $(INSTALL_FILES_OS), $(inst_file)) + +else ifeq ($(HB_SHELL),dos) + +# We have to use script to overcome the DOS limit of max 128 characters +# NOTE: The empty line directly before 'endef' HAVE TO exist! +# It causes that every commands will be separated by LF +define inst_file +$(COMSPEC) /Cxcopy /Y /I $(file) $(INSTALL_DIR_OS) + +endef + +INSTALL_DIR_OS = $(subst /,\,$(INSTALL_DIR)) +INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) + +INSTALL_RULE =\ + $(foreach file, $(INSTALL_FILES_OS), $(inst_file)) + endif endif # Empty install list diff --git a/harbour/config/linux/dir.cf b/harbour/config/linux/dir.cf deleted file mode 100644 index 89f03b94da..0000000000 --- a/harbour/config/linux/dir.cf +++ /dev/null @@ -1,35 +0,0 @@ -# -# $Id$ -# - -ifeq ($(PM),) # Only traverse directories if not compiling a specific module - -ifeq ($(DIRS),) # Empty directory list - -DIR_RULE =\ - @echo Done - -else - -ifneq ($(HB_SHELL),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 =\ - @for d in $(DIRS); do \ - if [ -d $$d ]; then \ - $(MAKE) -C $$d $@; \ - fi \ - done - -endif # ! non-bash - -endif # ! Empty directory list - -endif # ! compiling a specific program module diff --git a/harbour/config/linux/global.cf b/harbour/config/linux/global.cf index 7c71463fde..502d01b527 100644 --- a/harbour/config/linux/global.cf +++ b/harbour/config/linux/global.cf @@ -4,83 +4,6 @@ all : first -HB_GT_LIBS=\ - gtcgi \ - gtpca \ - gtstd \ - gttrm \ - -ifneq ($(HB_SHELL),bash) - -DIRSEP = $(subst /,\,\) - -OBJ_DIR_OS = $(subst /,\,$(OBJ_DIR)) -OBJ_ARCH_DIR_OS = $(subst /,\,$(OBJ_ARCH_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_ARCH_DIR_OS = $(subst /,\,$(EXE_ARCH_DIR)) -EXE_FILE_OS = $(subst /,\,$(EXE_FILE)) - -ifneq ($(HB_SHELL),os2) - - MK = $(subst /,\,$(subst \~,~,$(MAKE))) - RM = del /q /f - RD = rmdir /q /s - CP = $(COMSPEC) /c copy - MV = move - MD = mkdir - -dirbase:: - -@$(COMSPEC) /c if not exist $(OBJ_DIR_OS) $(MD) $(OBJ_DIR_OS) - $(if $(LIB_DIR_OS),-@$(COMSPEC) /c if not exist $(LIB_DIR_OS) $(MD) $(LIB_DIR_OS),) - $(if $(EXE_DIR_OS),-@$(COMSPEC) /c if not exist $(EXE_DIR_OS) $(MD) $(EXE_DIR_OS),) - -clean:: - -@$(COMSPEC) /c if exist $(OBJ_DIR_OS) $(RD) $(OBJ_DIR_OS) - $(if $(LIB_FILE_OS),-@$(COMSPEC) /c if exist $(LIB_FILE_OS) $(RM) $(LIB_FILE_OS),) - $(if $(EXE_FILE_OS),-@$(COMSPEC) /c if exist $(EXE_FILE_OS) $(RM) $(EXE_FILE_OS),) - -else # OS/2 - MK = $(subst /,\,$(subst \~,~,$(MAKE))) - RM = del /n - RD = rmdir - CP = copy - MV = move - MD = md - -dirbase:: - -for %d in ($(OBJ_BASE) $(OBJ_ARCH_DIR_OS) $(OBJ_DIR_OS)) do if not exist %d $(MD) %d - $(if $(LIB_FILE_OS),-for %d in ($(LIB_ARCH_DIR_OS) $(LIB_DIR_OS)) do if not exist %d $(MD) %d,) - $(if $(EXE_FILE_OS),-for %d in ($(EXE_ARCH_DIR_OS) $(EXE_DIR_OS)) do if not exist %d $(MD) %d,) - -clean:: - -if exist $(OBJ_DIR_OS)\*.* $(RM) $(OBJ_DIR_OS)\*.* - -for %d in ($(OBJ_DIR_OS) $(OBJ_ARCH_DIR_OS) $(OBJ_BASE)) do if exist %d $(RD) %d - $(if $(LIB_FILE_OS),-if exist $(LIB_FILE_OS) $(RM) $(LIB_FILE_OS),) - $(if $(EXE_FILE_OS),-if exist $(EXE_FILE_OS) $(RM) $(EXE_FILE_OS),) - -endif - -else # bash - -MK = $(MAKE) -RM = rm -f -RD = rm -f -r -CP = cp -f -MV = mv -f -MD = mkdir -MDP = mkdir -p +HB_GT_LIBS += gttrm RANLIB = ranlib - -dirbase:: - @[ -d $(OBJ_DIR) ] || $(MDP) $(OBJ_DIR) - @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) - @[ -z $(EXE_DIR) ] || [ -d $(EXE_DIR) ] || $(MDP) $(EXE_DIR) - -clean:: - -$(RD) $(OBJ_DIR) $(LIB_FILE) $(EXE_FILE) - -endif diff --git a/harbour/config/os2/dir.cf b/harbour/config/os2/dir.cf deleted file mode 100644 index 89f03b94da..0000000000 --- a/harbour/config/os2/dir.cf +++ /dev/null @@ -1,35 +0,0 @@ -# -# $Id$ -# - -ifeq ($(PM),) # Only traverse directories if not compiling a specific module - -ifeq ($(DIRS),) # Empty directory list - -DIR_RULE =\ - @echo Done - -else - -ifneq ($(HB_SHELL),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 =\ - @for d in $(DIRS); do \ - if [ -d $$d ]; then \ - $(MAKE) -C $$d $@; \ - fi \ - done - -endif # ! non-bash - -endif # ! Empty directory list - -endif # ! compiling a specific program module diff --git a/harbour/config/os2/gcc.cf b/harbour/config/os2/gcc.cf index 8a95109493..fff8d21e31 100644 --- a/harbour/config/os2/gcc.cf +++ b/harbour/config/os2/gcc.cf @@ -93,7 +93,7 @@ endif # We have to use a script to overcome the AR limit of max 850 characters # in commmand line define create_library -IF EXIST $(LIB_FILE_OS) $(RM) $(LIB_FILE_OS) +if exist $(subst /,$(DIRSEP),$(LIB_FILE)) $(RM) $(subst /,$(DIRSEP),$(LIB_FILE)) echo CREATE $(LIB_DIR)/$@ > __lib__.tmp for %i in ( *$(OBJ_EXT) ) do @echo ADDMOD %i >> __lib__.tmp echo SAVE >> __lib__.tmp diff --git a/harbour/config/os2/global.cf b/harbour/config/os2/global.cf index d4005af9d0..576faec28f 100644 --- a/harbour/config/os2/global.cf +++ b/harbour/config/os2/global.cf @@ -4,83 +4,4 @@ all : first -HB_GT_LIBS=\ - gtcgi \ - gtpca \ - gtstd \ - gtos2 \ - -ifneq ($(HB_SHELL),bash) - -DIRSEP = $(subst /,\,\) - -OBJ_DIR_OS = $(subst /,\,$(OBJ_DIR)) -OBJ_ARCH_DIR_OS = $(subst /,\,$(OBJ_ARCH_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_ARCH_DIR_OS = $(subst /,\,$(EXE_ARCH_DIR)) -EXE_FILE_OS = $(subst /,\,$(EXE_FILE)) - -ifneq ($(HB_SHELL),os2) - - MK = $(subst /,\,$(subst \~,~,$(MAKE))) - RM = del /q /f - RD = rmdir /q /s - CP = $(COMSPEC) /c copy - MV = move - MD = mkdir - -dirbase:: - -@$(COMSPEC) /c if not exist $(OBJ_DIR_OS) $(MD) $(OBJ_DIR_OS) - $(if $(LIB_DIR_OS),-@$(COMSPEC) /c if not exist $(LIB_DIR_OS) $(MD) $(LIB_DIR_OS),) - $(if $(EXE_DIR_OS),-@$(COMSPEC) /c if not exist $(EXE_DIR_OS) $(MD) $(EXE_DIR_OS),) - -clean:: - -@$(COMSPEC) /c if exist $(OBJ_DIR_OS) $(RD) $(OBJ_DIR_OS) - $(if $(LIB_FILE_OS),-@$(COMSPEC) /c if exist $(LIB_FILE_OS) $(RM) $(LIB_FILE_OS),) - $(if $(EXE_FILE_OS),-@$(COMSPEC) /c if exist $(EXE_FILE_OS) $(RM) $(EXE_FILE_OS),) - -else # OS/2 - MK = $(subst /,\,$(subst \~,~,$(MAKE))) - RM = del /n - RD = rmdir - CP = copy - MV = move - MD = md - -dirbase:: - -for %d in ($(OBJ_BASE) $(OBJ_ARCH_DIR_OS) $(OBJ_DIR_OS)) do if not exist %d $(MD) %d - $(if $(LIB_FILE_OS),-for %d in ($(LIB_ARCH_DIR_OS) $(LIB_DIR_OS)) do if not exist %d $(MD) %d,) - $(if $(EXE_FILE_OS),-for %d in ($(EXE_ARCH_DIR_OS) $(EXE_DIR_OS)) do if not exist %d $(MD) %d,) - -clean:: - -if exist $(OBJ_DIR_OS)\*.* $(RM) $(OBJ_DIR_OS)\*.* - -for %d in ($(OBJ_DIR_OS) $(OBJ_ARCH_DIR_OS) $(OBJ_BASE)) do if exist %d $(RD) %d - $(if $(LIB_FILE_OS),-if exist $(LIB_FILE_OS) $(RM) $(LIB_FILE_OS),) - $(if $(EXE_FILE_OS),-if exist $(EXE_FILE_OS) $(RM) $(EXE_FILE_OS),) - -endif - -else # bash - -MK = $(MAKE) -RM = rm -f -RD = rm -f -r -CP = cp -f -MV = mv -f -MD = mkdir -MDP = mkdir -p - -LIB_FILE_OS = $(LIB_FILE) - -dirbase:: - @[ -d $(OBJ_DIR) ] || $(MDP) $(OBJ_DIR) - @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) - @[ -z $(EXE_DIR) ] || [ -d $(EXE_DIR) ] || $(MDP) $(EXE_DIR) - -clean:: - -$(RD) $(OBJ_DIR) $(LIB_FILE) $(EXE_FILE) - -endif +HB_GT_LIBS += gtos2 diff --git a/harbour/config/os2/install.cf b/harbour/config/os2/install.cf deleted file mode 100644 index 253ea52fee..0000000000 --- a/harbour/config/os2/install.cf +++ /dev/null @@ -1,62 +0,0 @@ -# -# $Id$ -# - -ifeq ($(INSTALL_FILES),) # Empty install list - -INSTALL_RULE =\ - @echo Done - -else - -ifneq ($(HB_SHELL),bash) - -ifneq ($(HB_SHELL),os2) - -INSTALL_DIR_OS = $(subst /,\,$(INSTALL_DIR)) -INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) - -INSTALL_RULE =\ - -$(COMSPEC) /c for %%f in ($(INSTALL_FILES_OS)) do copy "%%f" "$(INSTALL_DIR_OS)" - -else # OS/2 - -# We have to use script to overcome the max command size limit -# NOTE: The empty line directly before 'endef' HAVE TO exist! -# It causes that every commands will be separated by LF -define inst_file -$(COMSPEC) /C $(CP) $(file) $(subst /,\,$(INSTALL_DIR)) - -endef - -INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) - -INSTALL_RULE =\ - $(foreach file, $(INSTALL_FILES_OS), $(inst_file)) - -endif - -else # bash - -INSTALL_RULE =\ - @if [ -z $(INSTALL_DIR) ] || [ ! -d $(INSTALL_DIR) ]; \ - then \ - echo "! Can't install, path not found: '$(INSTALL_DIR)'" 1>&2; \ - false; \ - else \ - for i in $(INSTALL_FILES); \ - do \ - if [ -r $$i ]; \ - then \ - echo "! Installing $$i on $(INSTALL_DIR)"; \ - $(CP) $$i $(INSTALL_DIR); \ - true; \ - else \ - echo "! Can't install $$i, not found" 1>&2; \ - fi \ - done \ - fi - -endif - -endif # Empty install list diff --git a/harbour/config/sunos/dir.cf b/harbour/config/sunos/dir.cf deleted file mode 100644 index 63132daa76..0000000000 --- a/harbour/config/sunos/dir.cf +++ /dev/null @@ -1,14 +0,0 @@ -# -# $Id$ -# - -ifeq ($(PM),) # Only traverse directories if not compiling a specific module - -DIR_RULE =\ - @for d in $(DIRS); do \ - if [ -d $$d ]; then \ - $(MAKE) -C $$d $@; \ - fi \ - done - -endif # ! compiling a specific program module diff --git a/harbour/config/sunos/global.cf b/harbour/config/sunos/global.cf index 1f8b55c745..77e7b9d421 100644 --- a/harbour/config/sunos/global.cf +++ b/harbour/config/sunos/global.cf @@ -4,24 +4,4 @@ all : first -HB_GT_LIBS=\ - gtcgi \ - gtpca \ - gtstd \ - gttrm \ - -MK = $(MAKE) -RM = rm -f -RD = rm -f -r -CP = cp -f -MV = mv -f -MD = mkdir -MDP = mkdir -p - -dirbase:: - @[ -d $(OBJ_DIR) ] || $(MDP) $(OBJ_DIR) - @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) - @[ -z $(EXE_DIR) ] || [ -d $(EXE_DIR) ] || $(MDP) $(EXE_DIR) - -clean:: - -$(RD) $(OBJ_DIR) $(LIB_FILE) $(EXE_FILE) +HB_GT_LIBS += gttrm diff --git a/harbour/config/sunos/install.cf b/harbour/config/sunos/install.cf deleted file mode 100644 index 33fe370655..0000000000 --- a/harbour/config/sunos/install.cf +++ /dev/null @@ -1,22 +0,0 @@ -# -# $Id$ -# - -INSTALL_RULE =\ - @if [ ! -d $(INSTALL_DIR) ]; \ - then \ - echo "! Can't install, path not found: '$(INSTALL_DIR)'" 1>&2; \ - false; \ - else \ - for i in $(INSTALL_FILES); \ - do \ - if [ -r $$i ]; \ - then \ - echo "! Installing $$i on $(INSTALL_DIR)"; \ - $(CP) $$i $(INSTALL_DIR); \ - true; \ - else \ - echo "! Can't install $$i, not found" 1>&2; \ - fi \ - done \ - fi diff --git a/harbour/config/wce/dir.cf b/harbour/config/wce/dir.cf deleted file mode 100644 index 89f03b94da..0000000000 --- a/harbour/config/wce/dir.cf +++ /dev/null @@ -1,35 +0,0 @@ -# -# $Id$ -# - -ifeq ($(PM),) # Only traverse directories if not compiling a specific module - -ifeq ($(DIRS),) # Empty directory list - -DIR_RULE =\ - @echo Done - -else - -ifneq ($(HB_SHELL),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 =\ - @for d in $(DIRS); do \ - if [ -d $$d ]; then \ - $(MAKE) -C $$d $@; \ - fi \ - done - -endif # ! non-bash - -endif # ! Empty directory list - -endif # ! compiling a specific program module diff --git a/harbour/config/wce/global.cf b/harbour/config/wce/global.cf index eeb0795ac6..01051c5623 100644 --- a/harbour/config/wce/global.cf +++ b/harbour/config/wce/global.cf @@ -4,12 +4,7 @@ all : first -HB_GT_LIBS=\ - gtcgi \ - gtpca \ - gtstd \ - gtwvt \ - gtgui \ +HB_GT_LIBS += gtwvt gtgui # Favor size for CE builds. HB_GCMODE = 0 @@ -19,53 +14,3 @@ HB_FLAGSEXTRA = -D__PLATFORM__WINCE ifeq ($(HB_DYNLIB),yes) HB_CDYNLIB = -DHB_DYNLIB endif - -ifneq ($(HB_SHELL),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) -OBJ_DIR_OS = $(subst /,\,$(OBJ_DIR)) -LIB_DIR_OS = $(subst /,\,$(LIB_DIR)) -LIB_FILE_OS = $(subst /,\,$(LIB_FILE)) -EXE_DIR_OS = $(subst /,\,$(EXE_DIR)) -EXE_FILE_OS = $(subst /,\,$(EXE_FILE)) - -MK = $(subst \,/,$(subst \~,~,$(MAKE))) -RM = del /q /f -RD = rmdir /q /s -CP = $(COMSPEC) /c copy -MV = move -MD = mkdir - -dirbase:: - -@$(COMSPEC) /c if not exist $(OBJ_DIR_OS) $(MD) $(OBJ_DIR_OS) - $(if $(LIB_DIR_OS),-@$(COMSPEC) /c if not exist $(LIB_DIR_OS) $(MD) $(LIB_DIR_OS),) - $(if $(EXE_DIR_OS),-@$(COMSPEC) /c if not exist $(EXE_DIR_OS) $(MD) $(EXE_DIR_OS),) - -clean:: - -@$(COMSPEC) /c if exist $(OBJ_DIR_OS) $(RD) $(OBJ_DIR_OS) - $(if $(LIB_FILE_OS),-@$(COMSPEC) /c if exist $(LIB_FILE_OS) $(RM) $(LIB_FILE_OS),) - $(if $(EXE_FILE_OS),-@$(COMSPEC) /c if exist $(EXE_FILE_OS) $(RM) $(EXE_FILE_OS),) - -else # bash - -MK = $(MAKE) -RM = rm -f -RD = rm -f -r -CP = cp -f -MV = mv -f -MD = mkdir -MDP = mkdir -p - -dirbase:: - @[ -d $(OBJ_DIR) ] || $(MDP) $(OBJ_DIR) - @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) - @[ -z $(EXE_DIR) ] || [ -d $(EXE_DIR) ] || $(MDP) $(EXE_DIR) - -clean:: - -$(RD) $(OBJ_DIR) $(LIB_FILE) $(EXE_FILE) - -endif diff --git a/harbour/config/wce/install.cf b/harbour/config/wce/install.cf deleted file mode 100644 index bc3cf91ca6..0000000000 --- a/harbour/config/wce/install.cf +++ /dev/null @@ -1,43 +0,0 @@ -# -# $Id$ -# - -ifeq ($(INSTALL_FILES),) # Empty install list - -INSTALL_RULE =\ - @echo Done - -else - -ifneq ($(HB_SHELL),bash) - -INSTALL_DIR_OS = $(subst /,\,$(INSTALL_DIR)) -INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) - -INSTALL_RULE =\ - -$(COMSPEC) /c for %%f in ($(INSTALL_FILES_OS)) do copy "%%f" "$(INSTALL_DIR_OS)" - -else # bash - -INSTALL_RULE =\ - @if [ -z $(INSTALL_DIR) ] || [ ! -d $(INSTALL_DIR) ]; \ - then \ - echo "! Can't install, path not found: '$(INSTALL_DIR)'" 1>&2; \ - false; \ - else \ - for i in $(INSTALL_FILES); \ - do \ - if [ -r $$i ]; \ - then \ - echo "! Installing $$i on $(INSTALL_DIR)"; \ - $(CP) $$i $(INSTALL_DIR); \ - true; \ - else \ - echo "! Can't install $$i, not found" 1>&2; \ - fi \ - done \ - fi - -endif - -endif # Empty install list diff --git a/harbour/config/win/dir.cf b/harbour/config/win/dir.cf deleted file mode 100644 index 89f03b94da..0000000000 --- a/harbour/config/win/dir.cf +++ /dev/null @@ -1,35 +0,0 @@ -# -# $Id$ -# - -ifeq ($(PM),) # Only traverse directories if not compiling a specific module - -ifeq ($(DIRS),) # Empty directory list - -DIR_RULE =\ - @echo Done - -else - -ifneq ($(HB_SHELL),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 =\ - @for d in $(DIRS); do \ - if [ -d $$d ]; then \ - $(MAKE) -C $$d $@; \ - fi \ - done - -endif # ! non-bash - -endif # ! Empty directory list - -endif # ! compiling a specific program module diff --git a/harbour/config/win/global.cf b/harbour/config/win/global.cf index 5241ed2578..3ab269f105 100644 --- a/harbour/config/win/global.cf +++ b/harbour/config/win/global.cf @@ -4,64 +4,8 @@ all : first -HB_GT_LIBS=\ - gtcgi \ - gtpca \ - gtstd \ - gtwvt \ - gtgui \ - gtwin \ +HB_GT_LIBS += gtwvt gtgui gtwin ifeq ($(HB_DYNLIB),yes) HB_CDYNLIB = -DHB_DYNLIB endif - -ifneq ($(HB_SHELL),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) -OBJ_DIR_OS = $(subst /,\,$(OBJ_DIR)) -LIB_DIR_OS = $(subst /,\,$(LIB_DIR)) -LIB_FILE_OS = $(subst /,\,$(LIB_FILE)) -EXE_DIR_OS = $(subst /,\,$(EXE_DIR)) -EXE_FILE_OS = $(subst /,\,$(EXE_FILE)) - -MK = $(subst \,/,$(subst \~,~,$(MAKE))) -RM = del /q /f -RD = rmdir /q /s -CP = $(COMSPEC) /c copy -MV = move -MD = mkdir - -dirbase:: - -@$(COMSPEC) /c if not exist $(OBJ_DIR_OS) $(MD) $(OBJ_DIR_OS) - $(if $(LIB_DIR_OS),-@$(COMSPEC) /c if not exist $(LIB_DIR_OS) $(MD) $(LIB_DIR_OS),) - $(if $(EXE_DIR_OS),-@$(COMSPEC) /c if not exist $(EXE_DIR_OS) $(MD) $(EXE_DIR_OS),) - -clean:: - -@$(COMSPEC) /c if exist $(OBJ_DIR_OS) $(RD) $(OBJ_DIR_OS) - $(if $(LIB_FILE_OS),-@$(COMSPEC) /c if exist $(LIB_FILE_OS) $(RM) $(LIB_FILE_OS),) - $(if $(EXE_FILE_OS),-@$(COMSPEC) /c if exist $(EXE_FILE_OS) $(RM) $(EXE_FILE_OS),) - -else # bash - -MK = $(MAKE) -RM = rm -f -RD = rm -f -r -CP = cp -f -MV = mv -f -MD = mkdir -MDP = mkdir -p - -dirbase:: - @[ -d $(OBJ_DIR) ] || $(MDP) $(OBJ_DIR) - @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) - @[ -z $(EXE_DIR) ] || [ -d $(EXE_DIR) ] || $(MDP) $(EXE_DIR) - -clean:: - -$(RD) $(OBJ_DIR) $(LIB_FILE) $(EXE_FILE) - -endif diff --git a/harbour/config/win/install.cf b/harbour/config/win/install.cf deleted file mode 100644 index bc3cf91ca6..0000000000 --- a/harbour/config/win/install.cf +++ /dev/null @@ -1,43 +0,0 @@ -# -# $Id$ -# - -ifeq ($(INSTALL_FILES),) # Empty install list - -INSTALL_RULE =\ - @echo Done - -else - -ifneq ($(HB_SHELL),bash) - -INSTALL_DIR_OS = $(subst /,\,$(INSTALL_DIR)) -INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) - -INSTALL_RULE =\ - -$(COMSPEC) /c for %%f in ($(INSTALL_FILES_OS)) do copy "%%f" "$(INSTALL_DIR_OS)" - -else # bash - -INSTALL_RULE =\ - @if [ -z $(INSTALL_DIR) ] || [ ! -d $(INSTALL_DIR) ]; \ - then \ - echo "! Can't install, path not found: '$(INSTALL_DIR)'" 1>&2; \ - false; \ - else \ - for i in $(INSTALL_FILES); \ - do \ - if [ -r $$i ]; \ - then \ - echo "! Installing $$i on $(INSTALL_DIR)"; \ - $(CP) $$i $(INSTALL_DIR); \ - true; \ - else \ - echo "! Can't install $$i, not found" 1>&2; \ - fi \ - done \ - fi - -endif - -endif # Empty install list