Files
harbour-core/harbour/config/instsh.mk
Viktor Szakats bd90e07276 2010-07-26 20:43 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* debian/rules
  * harbour.spec
  * config/instsh.mk
    * Do not use HB_INST_PKGPREF.

  * harbour.spec
    + Use HB_MAN_INSTALL

  * config/global.mk
    + Added HB_MAN_INSTALL and HB_ETC_INSTALL
    + PKG_NAME is now filled in little bit different way for
      *nix systems to emulate old mpkg_tgz.sh logic.

  * bin/postinst.sh
    - Deleted no more used subroutines.
    - Deleted mk_hblibso() function.
      - it maintained loca list of contribs which breaks the
        effort of contrib "plug-in" system
      - it contained lots of platform dependent build details in
        hard to maintain bash shell code.
      ; If someone needs this functionality pls try to integrate
        it in hbmk2 or write a .hbs script in modular fashion
        (not contrib names). I cannot tell what exactly was the functionality
        implemented there though. Maybe rewriting it locally is also an
        option.
    ! Do not use HB_INST_PKGPREF.

  * config/postinst.hbs
    + Rewritten mpkg_tgz.sh logic in .prg code. This logic is
      finally in it's proper place.
    + Implemented copying of man files on *nix systems.
    ; NOTE: Not tested at all, it was hard enough to rewrite it,
            pls help on finishing and debugging it. See TODOs in
            source. Previous replicated with some differences.

  - mpkg_tgz.sh
    - Deleted. Now implemented in postinst.sh.
      Build Harbour with HB_BUILD_PKG=yes to try it.

  * INSTALL
    + Added HB_MAN_INSTALL and HB_ETC_INSTALL
    + Updated .tgz binary instructions (now same on all platforms)

  * utils/hbrun/hbrun.prg
  * utils/hbrun/hbrun.hbp
  * utils/hbrun/Makefile
    * Renamed include dir control var.
    * Change so that now simple HB_INC_INSTALL value will
      trigger burn-in of header location.
    + Added logic to only use burnt-in header location if
      it is an absolute path.
    ! Synced .hbp file with this feature.
    ; NOTE: This is still non-portable and error
            prone solution. Pls see my thought on dev list
            about possible solutions to use precompiled
            Harbour headers compiled right into the executable.
2010-07-26 18:44:08 +00:00

111 lines
2.5 KiB
Makefile

#
# $Id$
#
INSTALL_RULE :=
INSTALL_FILES := $(strip $(INSTALL_FILES))
INSTALL_DIR := $(strip $(INSTALL_DIR))
ifneq ($(INSTALL_FILES),) # Empty install list
ifeq ($(INSTALL_DIR),) # Empty install dir
INSTALL_RULE := @$(ECHO) $(ECHOQUOTE)! Can't install, install dir isn't set$(ECHOQUOTE)
else
_SAME_DIR :=
# Check if $(abspath)/$(realpath) functions are supported
ifneq ($(abspath .),)
ifeq ($(realpath $(INSTALL_DIR)),$(realpath .))
_SAME_DIR := yes
endif
endif
ifeq ($(_SAME_DIR),yes)
INSTALL_RULE := @$(ECHO) $(ECHOQUOTE)! Skip install, destination dir '$(INSTALL_DIR)' is the same as source$(ECHOQUOTE)
else
ifneq ($(HB_SHELL),sh)
INSTALL_DIR_OS := $(subst /,\,$(INSTALL_DIR))
INSTALL_FILES_OS := $(subst /,\,$(INSTALL_FILES))
else
INSTALL_DIR_OS := $(subst \,/,$(INSTALL_DIR))
endif
ifeq ($(HB_SHELL),sh)
INSTALL_RULE := \
@$(MDP) $(INSTALL_DIR_OS); \
if [ ! -d "$(INSTALL_DIR_OS)" ]; \
then \
$(ECHO) "! Can't install, path not found: '$(INSTALL_DIR_OS)'" 1>&2; \
$(FALSE); \
else \
for i in $(INSTALL_FILES); \
do \
if [ -r "$$i" ]; \
then \
$(ECHO) "! Installing $$i on $(INSTALL_DIR_OS)"; \
$(CP) $$i $(INSTALL_DIR_OS); \
true; \
else \
$(ECHO) "! Can't install $$i, not found" 1>&2; \
fi \
done \
fi
endif
ifeq ($(HB_SHELL),nt)
define inst_file_all
-@if not exist "$(INSTALL_DIR_OS)" $(MDP) "$(INSTALL_DIR_OS)"
-@for %%f in ($(INSTALL_FILES_OS)) do $(CP) "%%f" "$(INSTALL_DIR_OS)"
endef
INSTALL_RULE := $(inst_file_all)
endif
ifeq ($(HB_SHELL),os2)
define inst_file_all
-@$(MDP) $(INSTALL_DIR_OS)
$(foreach file,$(INSTALL_FILES),$(inst_file))
endef
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every command will be separated by LF
define inst_file
-@$(CP) $(file) $(INSTALL_DIR_OS)
endef
INSTALL_RULE := $(inst_file_all)
endif
ifeq ($(HB_SHELL),dos)
define inst_file_all
-@$(MDP) $(INSTALL_DIR_OS)
$(foreach file,$(INSTALL_FILES_OS),$(inst_file))
endef
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every command will be separated by LF
define inst_file
-@$(CP) $(file) $(INSTALL_DIR_OS)
endef
INSTALL_RULE := $(inst_file_all)
endif
endif # Source and destination directories are equal
endif # Empty install dir
endif # Empty install list