From 88b5742ffaf437c0104f6fbb1721148f1863ec8e Mon Sep 17 00:00:00 2001 From: Sergey Kosukhin Date: Fri, 26 Apr 2024 13:35:24 +0200 Subject: [PATCH] deplist.py: support dependency hints. --- deplist.config.in | 1 - mkhelper.mk.in | 4 ++-- mkhelper/deplist.py | 5 +++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deplist.config.in b/deplist.config.in index e3783d4..e5f9bb1 100644 --- a/deplist.config.in +++ b/deplist.config.in @@ -1,4 +1,3 @@ ---inc-oo --check-colour yellow # Check whether the dependency graph is acyclic: --check-cycles diff --git a/mkhelper.mk.in b/mkhelper.mk.in index b66f21d..fe6e64c 100644 --- a/mkhelper.mk.in +++ b/mkhelper.mk.in @@ -192,8 +192,8 @@ sanitize-mod-proxies: # Dependency generation rule for undetectable Fortran dependencies: extra_f90.d: mkhelper.mk $(silent_DEPGEN):;{ \ - echo 'src/program/main.o:| src/program/implicit_external.o'; \ - echo 'src/program/main.o:| src/modules/submo_test_submodule.o'; \ + echo '#-hint src/program/main.o: src/program/implicit_external.o'; \ + echo '#-hint src/program/main.o: src/modules/submo_test_submodule.o'; \ } >$@ # Configure delayed bundled libraries: diff --git a/mkhelper/deplist.py b/mkhelper/deplist.py index 198cdc9..c796b52 100755 --- a/mkhelper/deplist.py +++ b/mkhelper/deplist.py @@ -48,10 +48,11 @@ import sys _re_rule = re.compile( + r"^(?P#-hint )?" # targets - r"^[ ]*(?P[-+\w./]+(?:[ ]+[-+\w./]+)*)[ ]*" + r"[ ]*(?P[-+\w./]+(?:[ ]+[-+\w./]+)*)[ ]*" # normal prerequisites - r":(?:[ ]*(?P[-+\w./]+(?:[ ]+[-+\w./]+)*))?[ ]*" + r":[ ]*(?P[-+\w./]+(?:[ ]+[-+\w./]+)*)?[ ]*" # order-only prerequisites r"(?:\|[ ]*(?P[-+\w./]+(?:[ ]+[-+\w./]+)*))?" )