Browse code

Mitigate E2BIG/"Argument list too long"

For programs with lots of files with very long names it could happend
that the shell commands assembled by make failed with E2BIG. By
inserting some newlines into the commands we can mitigate this for now.

A general solution would probably only be to save the argument one at a
time into a file and read this file from fortran_dependencies.pl

Lorenz Hüdepohl authored on25/05/2016 10:28:08
Showing1 changed files
... ...
@@ -84,11 +84,17 @@ define is_clean
84 84
 $(if $(filter-out mostlyclean clean distclean maintainer-clean,$(MAKECMDGOALS)),0,1)
85 85
 endef
86 86
 
87
+define newline
88
+
89
+
90
+endef
91
+
87 92
 ifneq ($(call is_clean),1)
88 93
 include $(_f90_depfile)
89 94
 endif
90 95
 $(_f90_depfile): $(top_srcdir)/fdep/fortran_dependencies.pl $(foreach p,$(_f90_targets),$(_$p_use_mods) $(_$p_def_mods)) | $(foreach p,$(_f90_targets),$(_f90_depdir)/$p)
91
-	$(call _f90_verbose,F90 DEPS $@)echo > $@; $(foreach p,$(_f90_targets),$(top_srcdir)/fdep/fortran_dependencies.pl $p $(_$p_use_mods) $(_$p_def_mods) $(foreach l,$(call recursive_lib_deps,$p),$(_$l_use_mods) $(_$l_def_mods)) >> $@; )
96
+	$(call _f90_verbose,F90 DEPS $@)echo > $@;
97
+	$(foreach p,$(_f90_targets),$(top_srcdir)/fdep/fortran_dependencies.pl $p $(_$p_use_mods) $(_$p_def_mods) $(foreach l,$(call recursive_lib_deps,$p),$(_$l_use_mods) $(_$l_def_mods)) >> $@; $(newline))
92 98
 
93 99
 $(_f90_depdir):
94 100
 	@mkdir $@