summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/xharbour/files/xharbour-parallel-make.patch')
-rw-r--r--dev-lang/xharbour/files/xharbour-parallel-make.patch161
1 files changed, 161 insertions, 0 deletions
diff --git a/dev-lang/xharbour/files/xharbour-parallel-make.patch b/dev-lang/xharbour/files/xharbour-parallel-make.patch
new file mode 100644
index 000000000..e1c50a07e
--- /dev/null
+++ b/dev-lang/xharbour/files/xharbour-parallel-make.patch
@@ -0,0 +1,161 @@
+--- xharbour-1.0.0-beta1/config/bin.cf.orig 2001-12-21 13:47:57.000000000 +0300
++++ xharbour-1.0.0-beta1/config/bin.cf 2009-03-04 18:42:51.000000000 +0300
+@@ -35,8 +35,8 @@
+
+ first:: dirbase descend
+
+-descend :
+- @$(MK) -C $(ARCH_DIR) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(EXE_NAME)
++descend:: dirbase
++ +@$(MK) -C $(ARCH_DIR) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(EXE_NAME)
+
+ $(EXE_NAME) : $(ALL_OBJS)
+ $(LD_RULE)
+--- xharbour-1.0.0-beta1/config/lib.cf.orig 2003-08-25 20:24:52.000000000 +0400
++++ xharbour-1.0.0-beta1/config/lib.cf 2009-03-04 18:44:30.000000000 +0300
+@@ -44,11 +44,11 @@
+ endif
+ endif
+
+-descend :
+- @$(MK) -C $(ARCH_DIR) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' 'HB_LIBCOMP_MT=NO' $(LIB_NAME)
++descend:: dirbase
++ +@$(MK) -C $(ARCH_DIR) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' 'HB_LIBCOMP_MT=NO' $(LIB_NAME)
+
+-descend_mt:
+- @$(MK) -C $(ARCH_DIR)_mt -f $(GRANDP)Makefile 'TOP=$(GRANDP)' 'HB_LIBCOMP_MT=YES' $(MT_LIB_NAME)
++descend_mt:: dirbase_mt
++ +@$(MK) -C $(ARCH_DIR)_mt -f $(GRANDP)Makefile 'TOP=$(GRANDP)' 'HB_LIBCOMP_MT=YES' $(MT_LIB_NAME)
+
+ $(LIB_NAME) : $(ALL_OBJS)
+ $(AR_RULE)
+--- xharbour-1.0.0-beta1/config/dir.cf.orig 2009-03-04 18:58:03.000000000 +0300
++++ xharbour-1.0.0-beta1/config/dir.cf 2009-03-04 19:01:17.000000000 +0300
+@@ -6,16 +6,73 @@
+ ifneq ($(HB_COMPILER),)
+
+ include $(TOP)$(ROOT)config/global.cf
++# this make version does not work correctly parallel execution rules below
++ifeq ($(MAKE_VERSION),3.79.1)
+ include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/dir.cf
++endif
++
++ifeq ($(DIR_RULE),)
++
++# NOTE: The empty line directly before 'endef' HAVE TO exist!
++# It causes that every commands will be separated by LF
++define dir_mk
++$(MK) -C $(dir) $@
++
++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))
++MULTI_DEPS = yes
++
++else
++
++DIRS := $(filter-out {%},$(subst {, {,$(DIRS)))
++MULTI_DEPS = no
++
++endif
+
+ all : first
+
++ifneq ($(MULTI_DEPS),yes)
++
+ first clean install::
+- $(DIR_RULE)
++ +$(DIR_RULE)
++
++else
++
++DIRS_CLEAN = $(foreach dir, $(DIRS_MK), $(dir).clean)
++DIRS_INST = $(foreach dir, $(DIRS_MK), $(dir).inst)
++
++first :: $(DIRS_MK)
++install :: $(DIRS_INST)
++clean :: $(DIRS_CLEAN)
++
++comma=,
++define dep_rule
++$(subst $(comma),$(2) ,$(subst },$(2),$(subst {,$(2)::|,$(1))))
++endef
++
++$(foreach dep, $(DIRS_DEP), $(eval $(call dep_rule,$(dep),.clean)))
++$(foreach dep, $(DIRS_DEP), $(eval $(call dep_rule,$(dep),.inst)))
++$(foreach dep, $(DIRS_DEP), $(eval $(call dep_rule,$(dep),)))
++
++$(DIRS_CLEAN) ::
++ +$(MK) -C $(@:.clean=) clean
++
++$(DIRS_INST) ::
++ +$(MK) -C $(@:.inst=) install
++
++$(DIRS_MK) ::
++ +$(MK) -C $(@)
++
++endif
++
+
+ ifneq ($(HB_POSTINST),)
+ install::
+- $(HB_POSTINST)
++ +$(HB_POSTINST)
+ endif
+
+ endif
+--- xharbour-1.0.0-beta1/source/Makefile.orig 2009-03-04 19:23:38.000000000 +0300
++++ xharbour-1.0.0-beta1/source/Makefile 2009-03-04 19:27:42.000000000 +0300
+@@ -23,26 +23,28 @@
+
+ else
+
++HB_COMP_REF={compiler}
++
+ DIRS=\
+ common \
+- pp \
+- compiler \
+- rtl \
+- vm \
++ pp{common} \
++ compiler{pp} \
++ rtl$(HB_COMP_REF) \
++ vm$(HB_COMP_REF) \
+ macro \
+ codepage \
+ lang \
+- rdd \
+- debug \
+- odbc \
+- ct \
++ rdd$(HB_COMP_REF) \
++ debug$(HB_COMP_REF) \
++ odbc$(HB_COMP_REF) \
++ ct$(HB_COMP_REF) \
+ misc \
+- cgi
++ cgi$(HB_COMP_REF)
+
+ ifneq ($(HB_ARCHITECTURE),dos)
+
+ DIRS+=\
+- tip
++ tip$(HB_COMP_REF)
+
+ endif
+
+--- xharbour-1.0.0-beta1/Makefile.orig 2004-09-15 00:15:12.000000000 +0400
++++ xharbour-1.0.0-beta1/Makefile 2009-03-04 19:33:50.000000000 +0300
+@@ -7,7 +7,7 @@
+ DIRS=\
+ include \
+ source \
+- utils \
++ utils{source} \
+ # tests \
+ # samples \
+