Commit cabaeb22 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

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
parent f81bd5c8
...@@ -84,11 +84,17 @@ define is_clean ...@@ -84,11 +84,17 @@ define is_clean
$(if $(filter-out mostlyclean clean distclean maintainer-clean,$(MAKECMDGOALS)),0,1) $(if $(filter-out mostlyclean clean distclean maintainer-clean,$(MAKECMDGOALS)),0,1)
endef endef
define newline
endef
ifneq ($(call is_clean),1) ifneq ($(call is_clean),1)
include $(_f90_depfile) include $(_f90_depfile)
endif endif
$(_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) $(_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)
$(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)) >> $@; ) $(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)) >> $@; $(newline))
$(_f90_depdir): $(_f90_depdir):
@mkdir $@ @mkdir $@
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment