From b3ed7c67f07c4cf5fa7839e2b63e0eb270e28cea Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 15 Jul 2009 10:27:40 +0000 Subject: [PATCH] 2009-07-15 12:23 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/darwin/install.cf * config/hpux/install.cf * config/dos/install.cf * config/install.cf * config/win/install.cf * config/linux/install.cf * config/os2/install.cf * config/sunos/install.cf * config/bsd/install.cf * config/wce/install.cf * Little tweak to install rules to allow multiline rules on non-bash shells. Maybe there is another way, but couldn't find it. ; This is a step towards moving install dir creation to GNU Make level. --- harbour/ChangeLog | 17 ++++++++++++++++ harbour/config/bsd/install.cf | 24 +++++++++++----------- harbour/config/darwin/install.cf | 34 ++++++++++++++++---------------- harbour/config/dos/install.cf | 10 +++++++--- harbour/config/hpux/install.cf | 24 +++++++++++----------- harbour/config/install.cf | 3 --- harbour/config/linux/install.cf | 11 +++++++---- harbour/config/os2/install.cf | 11 +++++++---- harbour/config/sunos/install.cf | 24 +++++++++++----------- harbour/config/wce/install.cf | 33 ++++++++++++++++--------------- harbour/config/win/install.cf | 33 ++++++++++++++++--------------- 11 files changed, 125 insertions(+), 99 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a95737c30b..7854efcfc0 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,23 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-07-15 12:23 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/darwin/install.cf + * config/hpux/install.cf + * config/dos/install.cf + * config/install.cf + * config/win/install.cf + * config/linux/install.cf + * config/os2/install.cf + * config/sunos/install.cf + * config/bsd/install.cf + * config/wce/install.cf + * Little tweak to install rules to allow multiline rules + on non-bash shells. + Maybe there is another way, but couldn't find it. + ; This is a step towards moving install dir creation to + GNU Make level. + 2009-07-15 11:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * source/rtl/hbinet.c * Formatting, cleanup. diff --git a/harbour/config/bsd/install.cf b/harbour/config/bsd/install.cf index f61059b4f6..0094d48ec5 100644 --- a/harbour/config/bsd/install.cf +++ b/harbour/config/bsd/install.cf @@ -2,19 +2,19 @@ # $Id$ # -INSTALL_RULE =\ +install:: first @if [ ! -d $(INSTALL_DIR) ]; \ then \ - echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \ + echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \ else \ - for i in $(INSTALL_FILES); \ - do \ - if [ -r $$i ]; \ - then \ - echo "! Installing $$i on $(INSTALL_DIR)"; \ - $(CP) $$i $(INSTALL_DIR); \ - else \ - echo "! Can't install $$i, not found" 1>&2; \ - fi \ - done \ + for i in $(INSTALL_FILES); \ + do \ + if [ -r $$i ]; \ + then \ + echo "! Installing $$i on $(INSTALL_DIR)"; \ + $(CP) $$i $(INSTALL_DIR); \ + else \ + echo "! Can't install $$i, not found" 1>&2; \ + fi \ + done \ fi diff --git a/harbour/config/darwin/install.cf b/harbour/config/darwin/install.cf index b3202d4954..671549d0ed 100644 --- a/harbour/config/darwin/install.cf +++ b/harbour/config/darwin/install.cf @@ -2,24 +2,24 @@ # $Id$ # -INSTALL_RULE =\ +install:: first @if [ ! -d $(INSTALL_DIR) ]; \ then \ - echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \ + echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \ 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 \ + 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/dos/install.cf b/harbour/config/dos/install.cf index c5a34d58db..0f45ff512e 100644 --- a/harbour/config/dos/install.cf +++ b/harbour/config/dos/install.cf @@ -4,7 +4,8 @@ ifeq ($(INSTALL_FILES),) # Empty install list -INSTALL_RULE = @echo Done +install:: first + @echo Done else @@ -20,13 +21,16 @@ endef INSTALL_DIR_OS = $(subst /,\,$(INSTALL_DIR)) INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) -INSTALL_RULE = $(foreach file, $(INSTALL_FILES_OS), $(inst_file)) + +install:: first + $(foreach file, $(INSTALL_FILES_OS), $(inst_file)) else # bash INSTALL_DIR_OS = $(subst \,/,$(INSTALL_DIR)) INSTALL_FILES_OS = $(subst \,/,$(INSTALL_FILES)) -INSTALL_RULE =\ + +install:: first @sh -c 'if [ ! -d $(INSTALL_DIR_OS) ]; \ then \ echo "! Cannot install, path not found: $(INSTALL_DIR_OS)" 1>&2; \ diff --git a/harbour/config/hpux/install.cf b/harbour/config/hpux/install.cf index 47dbdda067..0094d48ec5 100644 --- a/harbour/config/hpux/install.cf +++ b/harbour/config/hpux/install.cf @@ -2,19 +2,19 @@ # $Id$ # -INSTALL_RULE =\ +install:: first @if [ ! -d $(INSTALL_DIR) ]; \ then \ - echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \ + echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \ else \ - for i in $(INSTALL_OBJS); \ - do \ - if [ -r $$i ]; \ - then \ - echo "! Installing $$i on $(INSTALL_DIR)"; \ - $(CP) $$i $(INSTALL_DIR); \ - else \ - echo "! Can't install $$i, not found" 1>&2; \ - fi \ - done \ + for i in $(INSTALL_FILES); \ + do \ + if [ -r $$i ]; \ + then \ + echo "! Installing $$i on $(INSTALL_DIR)"; \ + $(CP) $$i $(INSTALL_DIR); \ + 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 a162a9ecc9..e8746fd128 100644 --- a/harbour/config/install.cf +++ b/harbour/config/install.cf @@ -6,7 +6,4 @@ ifneq ($(HB_INSTALL_DEF),yes) include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/install.cf -install:: first - $(INSTALL_RULE) - endif diff --git a/harbour/config/linux/install.cf b/harbour/config/linux/install.cf index 2629476f95..04050681b5 100644 --- a/harbour/config/linux/install.cf +++ b/harbour/config/linux/install.cf @@ -4,7 +4,8 @@ ifeq ($(INSTALL_FILES),) # Empty install list -INSTALL_RULE = @echo Done +install:: first + @echo Done else @@ -15,7 +16,7 @@ ifeq ($(OS2_SHELL),) # non-OS/2 INSTALL_DIR_OS = $(subst /,\,$(INSTALL_DIR)) INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) -INSTALL_RULE = \ +install:: first -$(COMSPEC) /c for %%f in ($(INSTALL_FILES_OS)) do copy "%%f" "$(INSTALL_DIR_OS)" else # OS/2 @@ -29,13 +30,15 @@ $(COMSPEC) /C $(CP) $(file) $(subst /,\,$(INSTALL_DIR)) endef INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) -INSTALL_RULE = $(foreach file, $(INSTALL_FILES_OS), $(inst_file)) + +install:: first + $(foreach file, $(INSTALL_FILES_OS), $(inst_file)) endif else # bash -INSTALL_RULE =\ +install:: first @if [ -z $(INSTALL_DIR) ] || [ ! -d $(INSTALL_DIR) ]; \ then \ echo "! Can't install, path not found: '$(INSTALL_DIR)'" 1>&2; \ diff --git a/harbour/config/os2/install.cf b/harbour/config/os2/install.cf index 2629476f95..04050681b5 100644 --- a/harbour/config/os2/install.cf +++ b/harbour/config/os2/install.cf @@ -4,7 +4,8 @@ ifeq ($(INSTALL_FILES),) # Empty install list -INSTALL_RULE = @echo Done +install:: first + @echo Done else @@ -15,7 +16,7 @@ ifeq ($(OS2_SHELL),) # non-OS/2 INSTALL_DIR_OS = $(subst /,\,$(INSTALL_DIR)) INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) -INSTALL_RULE = \ +install:: first -$(COMSPEC) /c for %%f in ($(INSTALL_FILES_OS)) do copy "%%f" "$(INSTALL_DIR_OS)" else # OS/2 @@ -29,13 +30,15 @@ $(COMSPEC) /C $(CP) $(file) $(subst /,\,$(INSTALL_DIR)) endef INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) -INSTALL_RULE = $(foreach file, $(INSTALL_FILES_OS), $(inst_file)) + +install:: first + $(foreach file, $(INSTALL_FILES_OS), $(inst_file)) endif else # bash -INSTALL_RULE =\ +install:: first @if [ -z $(INSTALL_DIR) ] || [ ! -d $(INSTALL_DIR) ]; \ then \ echo "! Can't install, path not found: '$(INSTALL_DIR)'" 1>&2; \ diff --git a/harbour/config/sunos/install.cf b/harbour/config/sunos/install.cf index f61059b4f6..0094d48ec5 100644 --- a/harbour/config/sunos/install.cf +++ b/harbour/config/sunos/install.cf @@ -2,19 +2,19 @@ # $Id$ # -INSTALL_RULE =\ +install:: first @if [ ! -d $(INSTALL_DIR) ]; \ then \ - echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \ + echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \ else \ - for i in $(INSTALL_FILES); \ - do \ - if [ -r $$i ]; \ - then \ - echo "! Installing $$i on $(INSTALL_DIR)"; \ - $(CP) $$i $(INSTALL_DIR); \ - else \ - echo "! Can't install $$i, not found" 1>&2; \ - fi \ - done \ + for i in $(INSTALL_FILES); \ + do \ + if [ -r $$i ]; \ + then \ + echo "! Installing $$i on $(INSTALL_DIR)"; \ + $(CP) $$i $(INSTALL_DIR); \ + else \ + echo "! Can't install $$i, not found" 1>&2; \ + fi \ + done \ fi diff --git a/harbour/config/wce/install.cf b/harbour/config/wce/install.cf index f238047dd3..be1c1a9b99 100644 --- a/harbour/config/wce/install.cf +++ b/harbour/config/wce/install.cf @@ -4,7 +4,8 @@ ifeq ($(INSTALL_FILES),) # Empty install list -INSTALL_RULE = @echo Done +install:: first + @echo Done else @@ -13,28 +14,28 @@ ifeq ($(SHLVL),) # non-bash INSTALL_DIR_OS = $(subst /,\,$(INSTALL_DIR)) INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) -INSTALL_RULE = \ +install:: first -$(COMSPEC) /c for %%f in ($(INSTALL_FILES_OS)) do copy "%%f" "$(INSTALL_DIR_OS)" else # bash -INSTALL_RULE =\ +install:: first @if [ -z $(INSTALL_DIR) ] || [ ! -d $(INSTALL_DIR) ]; \ then \ - echo "! Can't install, path not found: '$(INSTALL_DIR)'" 1>&2; \ - false; \ + 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 \ + 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 diff --git a/harbour/config/win/install.cf b/harbour/config/win/install.cf index f238047dd3..be1c1a9b99 100644 --- a/harbour/config/win/install.cf +++ b/harbour/config/win/install.cf @@ -4,7 +4,8 @@ ifeq ($(INSTALL_FILES),) # Empty install list -INSTALL_RULE = @echo Done +install:: first + @echo Done else @@ -13,28 +14,28 @@ ifeq ($(SHLVL),) # non-bash INSTALL_DIR_OS = $(subst /,\,$(INSTALL_DIR)) INSTALL_FILES_OS = $(subst /,\,$(INSTALL_FILES)) -INSTALL_RULE = \ +install:: first -$(COMSPEC) /c for %%f in ($(INSTALL_FILES_OS)) do copy "%%f" "$(INSTALL_DIR_OS)" else # bash -INSTALL_RULE =\ +install:: first @if [ -z $(INSTALL_DIR) ] || [ ! -d $(INSTALL_DIR) ]; \ then \ - echo "! Can't install, path not found: '$(INSTALL_DIR)'" 1>&2; \ - false; \ + 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 \ + 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