Makefile: ignore instrisic modules

This excludes intristic modules like `iso_fortran_env` from the
automatic generation of the prerequisites.
This commit is contained in:
Michele Guerini Rocco 2021-12-15 02:31:15 +01:00
parent 2bee7be103
commit 93d936ce24
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450

View File

@ -140,7 +140,9 @@ graph.svg: Makefile
# dependencies (ie. the dependency graph is a DAG); # dependencies (ie. the dependency graph is a DAG);
$(OBJDIR)/%.d: $(SRCDIR)/%.f90 | $(OBJDIR) $(OBJDIR)/%.d: $(SRCDIR)/%.f90 | $(OBJDIR)
@printf '$(@:d=o): $< \\\n' > $@ @printf '$(@:d=o): $< \\\n' > $@
@sed -n 's@^[^!].*use \([^,]\+\),.*@$(OBJDIR)/\1.o \\@p' '$<' | sort -u >> $@ @grep -v 'use iso_' '$<' | \
sed -n 's@^[^!].*use \([^,]\+\),.*@$(OBJDIR)/\1.o \\@p' | \
sort -u >> $@
# Load the generated rules # Load the generated rules
include $(DEPS) include $(DEPS)