mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
This is similar to efforts (Feb 2010) but using ragel (https://en.wikipedia.org/wiki/Ragel) instead of the now defunct coco/r. The modified commit message from 2010: ENH: add C++-based wmkdepend parser (uses ragel grammar). - This avoids dependency on lex/flex and provides better encapsulation for buffer switching. As a result, the maximum number of open files only corresponds to the include depth. -- Note that the flex source and rules are still available, but are not deactivate (see wmake/rules/General/transform)
38 lines
1005 B
Plaintext
38 lines
1005 B
Plaintext
#----------------------------*- makefile-gmake -*------------------------------
|
|
|
|
WMKDEP_FLAGS := -eWM_PROJECT_DIR -eWM_THIRD_PARTY_DIR
|
|
|
|
ifneq ("$(WM_QUIET)","")
|
|
E=@
|
|
define QUIET_MESSAGE
|
|
@echo " $1: $2";
|
|
endef
|
|
define VERBOSE_MESSAGE
|
|
endef
|
|
WMKDEP_FLAGS += -q
|
|
else
|
|
E=
|
|
define QUIET_MESSAGE
|
|
endef
|
|
define VERBOSE_MESSAGE
|
|
@echo "$1 $2";
|
|
endef
|
|
endif
|
|
|
|
define DEFINE_TRANSFORM
|
|
$(OBJECTS_DIR)/%.o : %$1
|
|
$(call QUIET_MESSAGE,$(subst .,,$(1))too,$(value <F))
|
|
$E $$($(subst .,,$(1))too)
|
|
endef
|
|
|
|
$(foreach s,$(SUFFIXES),$(eval $(call DEFINE_TRANSFORM,$(s))))
|
|
|
|
$(OBJECTS_DIR)/%.dep : %
|
|
$(call QUIET_MESSAGE,dep,$(<F))
|
|
$(call VERBOSE_MESSAGE,Making dependency list for source file,$(<F))
|
|
@$(WM_SCRIPTS)/makeTargetDir $@
|
|
@$(WMAKE_BIN)/wmkdepend $(WMKDEP_FLAGS) -o$@ -I$(*D) $(LIB_HEADER_DIRS) $<
|
|
#flex @$(WMAKE_BIN)/wmkdep $(WMKDEP_FLAGS) -o$@ -I$(*D) $(LIB_HEADER_DIRS) $<
|
|
|
|
#------------------------------------------------------------------------------
|