Files
harbour-core/harbour/config/dir.mk
Viktor Szakats 92c93fdc95 2009-08-23 17:55 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* doc/linux1st.txt
    - Deleted Linux build instructions no more relevant.
    * Formatting. Probably this file should be moved into INSTALL.

  * doc/gmake.txt
    * Little updates.

  * harbour-win-spec
  * doc/gmake.txt
  * doc/linux1st.txt
  * doc/whatsnew.txt
  * harbour-wce-spec
  * INSTALL
  * bin/hb-mkdyn.sh
  * bin/postinst.cmd
  * bin/postinst.bat
  * bin/hb-func.sh
  * bin/postinst.sh
  * external/sqlite3/Makefile
  * external/libhpdf/Makefile
  * external/libpng/Makefile
  * mpkg_tgz.sh
  * harbour.spec
  * source/pp/hbpp.c
  * source/pp/Makefile
  * source/vm/Makefile
  * source/vm/cmdarg.c
  * source/vm/vmmt/Makefile
  * source/main/harbour.c
  * source/rtl/gtdos/Makefile
  * source/rtl/gtwin/Makefile
  * source/rtl/gtcrs/Makefile
  * source/rtl/gttrm/Makefile
  * source/rtl/Makefile
  * source/rtl/gtos2/Makefile
  * source/rtl/gtgui/Makefile
  * source/rtl/gtwvt/Makefile
  * source/rdd/Makefile
  * source/Makefile
  * contrib/hbodbc/Makefile
  * contrib/hbsqlit3/Makefile
  * contrib/hbblat/Makefile
  * contrib/hbqt/Makefile
  * contrib/hbxbp/Makefile
  * contrib/hbcurl/Makefile
  * contrib/gtqtc/Makefile
  * contrib/rddsql/sddodbc/Makefile
  * contrib/rddado/Makefile
  * contrib/gtwvg/Makefile
  * contrib/rddads/Makefile
  * contrib/hbfimage/Makefile
  * contrib/hbtip/Makefile
  * contrib/hbwin/Makefile
  * contrib/hbssl/Makefile
  * utils/hbmk2/hbmk2.pt_BR.po
  * utils/hbmk2/hbmk2.hu_HU.po
  * config/none.mk
  * config/global.mk
  * config/lib.mk
  * config/wce/mingw.mk
  * config/bin.mk
  * config/dir.mk
  * config/common/watcom.mk
  * config/win/msvc64.mk
  * config/win/iccia64.mk
  * config/win/mingw64.mk
  * config/win/gcc.mk
  * config/win/msvcia64.mk
  * config/win/pocc64.mk
  * config/header.mk
  * config/dyn.mk
  * config/doc.mk
    * HB_ARCHITECTURE -> HB_PLATFORM
    * hb_arch -> hb_plat (internal script variable)
    * ARCH_COMP -> PLAT_COMP (internal make variable)
    ; INCOMPATIBLE: Please update your environment, if you used this setting.
    ; NOTE: So now Harbour uses only two names for platforms: 'OS' and 'platform'.
            'Architecture' is nowhere used to refer to as an operating system
            anymore. 'Architecture' is only used to refer to CPU/hardware
            architecture.
2009-08-23 15:58:51 +00:00

81 lines
1.7 KiB
Makefile

#
# $Id$
#
include $(TOP)$(ROOT)config/global.mk
ifneq ($(HB_PLATFORM),)
ifneq ($(HB_COMPILER),)
ifeq ($(HB_HOST_PLAT),dos)
# do not use rules for parallel processing in DOS
JOB_SRV := NO
else
# these make versions does not work correctly with
# parallel execution rules below
JOB_SRV := $(MAKE_VERSION:3.7%=NO)
JOB_SRV := $(JOB_SRV:3.80%=NO)
endif
ifeq ($(JOB_SRV),NO)
DIRS := $(filter-out {%},$(subst {, {,$(DIRS)))
include $(TOP)$(ROOT)config/dirsh.mk
else
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every command will be separated by LF
define dir_mk
@$(MK) $(MKFLAGS) -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))
endif
all : first
ifeq ($(JOB_SRV),NO)
first clean install::
+$(DIR_RULE)
else
DIRS_CLEAN := $(foreach dir, $(DIRS_MK), $(dir).clean)
DIRS_INST := $(foreach dir, $(DIRS_MK), $(dir).inst)
ifneq ($(_HB_BLD),yes)
first :: $(DIRS_MK)
endif
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) $(MKFLAGS) -C $(@:.clean=) clean
$(DIRS_INST) ::
+@$(MK) $(MKFLAGS) -C $(@:.inst=) install _HB_BLD=yes
$(DIRS_MK) ::
+@$(MK) $(MKFLAGS) -C $(@)
endif
endif
endif