* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/genhrb.c
+ added support for compiling multiple .prg modules into single
compilation unit with repeated static or init/exit functions
with the same name.
Now Harbour compiler compiling .prg code from different .prg modules
included by @<name>.clp or by SET PROCEDURE TO ... / DO ... [ WITH ... ]
works exactly like Clipper. It supports separated file wide definitions
for each compiled .prg module when -n switch is used and allows to
use static or init/exit functions/procedures with the same names but
in different modules.
It resolves incompatibility often reported by [x]Harbour users.
Now it's not longer necessary to update existing Clipper code.
@.clp files and SET PROCEDURE TO ... / DO ... [ WITH ... ] are
fully functional like in Clipper.
AFAIR it was the last unintentional incompatibility with Clipper.
TODO: add support for multiple static functions with the same name
in .HRB files - it's necessary to change used format so I'll
probably to that with .HRL support. Now when -gh switch is used
harbour and such functions exists then compiler generates:
Error E0002 Redefinition of procedure or function ...
TODO: modify hbmk2 to pass @<name>.clp files directly to Harbour
compiler so it can compile them just like Clipper does and
generate single output file: <name>.<ext>
* harbour/config/instsh.mk
* disabled install command echo
95 lines
2.1 KiB
Makefile
95 lines
2.1 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
|
|
|
|
ifneq ($(HB_SHELL),sh)
|
|
INSTALL_DIR_OS := $(subst /,\,$(INSTALL_DIR))
|
|
INSTALL_FILES_OS := $(subst /,\,$(INSTALL_FILES))
|
|
endif
|
|
|
|
ifeq ($(HB_SHELL),sh)
|
|
|
|
INSTALL_RULE := \
|
|
@$(MDP) $(subst \,/,$(INSTALL_DIR)); \
|
|
if [ ! -d "$(subst \,/,$(INSTALL_DIR))" ]; \
|
|
then \
|
|
$(ECHO) "! Can't install, path not found: '$(subst \,/,$(INSTALL_DIR))'" 1>&2; \
|
|
false; \
|
|
else \
|
|
for i in $(INSTALL_FILES); \
|
|
do \
|
|
if [ -r "$$i" ]; \
|
|
then \
|
|
$(ECHO) "! Installing $$i on $(subst \,/,$(INSTALL_DIR))"; \
|
|
$(CP) $$i $(subst \,/,$(INSTALL_DIR)); \
|
|
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)
|
|
$(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)
|
|
|
|
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 # Empty install dir
|
|
|
|
endif # Empty install list
|