Browse code

Accelerate the dependency generation by not using files

Lorenz Hüdepohl authored on03/05/2017 14:35:42
Showing1 changed files
... ...
@@ -96,19 +96,10 @@ ifneq ($(call is_clean),1)
96 96
 include $(_f90_depfile)
97 97
 endif
98 98
 
99
-# $1 string
100
-# $2 file
101
-define append_to
102
-	$(_f90_only_verbose)echo '$1' >> $2
103
-
104
-endef
105
-
106 99
 # $1 program
107 100
 define program_dependencies
108
-	$(_f90_only_verbose)rm -f .$p.dep.args
109
-	$(foreach argument,$(_$p_use_mods) $(_$p_def_mods) $(foreach l,$(call recursive_lib_deps,$p),$(_$l_use_mods) $(_$l_def_mods)),$(call append_to,$(argument),.$p.dep.args))
110
-	$(_f90_only_verbose)$(top_srcdir)/fdep/fortran_dependencies.pl $p < .$p.dep.args >> $@ || { rm $@; exit 1; }
111
-	$(_f90_only_verbose)rm -f .$p.dep.args
101
+	$(_f90_only_verbose){ $(foreach argument,$(_$p_use_mods) $(_$p_def_mods) $(foreach l,$(call recursive_lib_deps,$p),$(_$l_use_mods) $(_$l_def_mods)),echo $(argument); ) } | \
102
+	$(top_srcdir)/fdep/fortran_dependencies.pl $p >> $@ || { rm $@; exit 1; }
112 103
 
113 104
 endef
114 105