diff options
author | Raphael Manfredi <Raphael_Manfredi@pobox.com> | 2017-05-14 09:14:17 +0200 |
---|---|---|
committer | Raphael Manfredi <Raphael_Manfredi@pobox.com> | 2017-05-14 09:14:17 +0200 |
commit | 769f306c6c3fb3d5f39a1666932b71452879bdbc (patch) | |
tree | 750da0bae1b1a8fe1f69b9e72d46b988fd824a8e | |
parent | d527baa7163e2a896b69c9e7eff90607cc145059 (diff) |
Further enhanced ?MAKE: checks for pick to watch for %<.
The last argument of the pick command is the target, usually the current
unit name, or an explicit relative path. If it is the unit name, then
it is better represented by using the %< macro in case the unit file is
copied or renamed later.
-rwxr-xr-x | mcon/man/mlint.SH | 7 | ||||
-rw-r--r-- | mcon/pl/lint.pl | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/mcon/man/mlint.SH b/mcon/man/mlint.SH index 205a7c6..8910b88 100755 --- a/mcon/man/mlint.SH +++ b/mcon/man/mlint.SH @@ -119,6 +119,13 @@ Self explanatory. "(?MAKE) fourth pick argument is missing." Self explanatory. .TP +"(?MAKE) fourth pick argument should probably be the %< macro." +When the fourth argument is not a relative path, it is expected to be the +current unit name, which is best described using the "%<" string, a macro +handled by +.I metaconfig +and which is substituted with the current unit name. +.TP "(?MAKE) ignoring duplicate dependency listing line." More than one ?MAKE: line bearing dependencies was found in the unit. There may be only one such line, although multiple ?MAKE action lines may occur. diff --git a/mcon/pl/lint.pl b/mcon/pl/lint.pl index 3762e3d..5a70598 100644 --- a/mcon/pl/lint.pl +++ b/mcon/pl/lint.pl @@ -165,6 +165,8 @@ sub p_make_command { return if $target =~ m|^\./|; warn "$where: weird fourth argument '$target' to pick.\n" unless $target =~ /^\w+$/; + warn "$where: fourth pick argument should probably be the %< macro.\n" + unless $target eq $unit; } # Process the ?MAKE: line |