Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support make check (the GNU conventions) #72

Open
rurban opened this issue Aug 15, 2022 · 2 comments
Open

Support make check (the GNU conventions) #72

rurban opened this issue Aug 15, 2022 · 2 comments

Comments

@rurban
Copy link

rurban commented Aug 15, 2022

Expected behaviour

Instead of warning a missing .PHONY test, check if a check target exists instead.

Actual behaviour

With GNU Makefiles it warns about a missing make test target.
minphony Missing required phony target 1222
"test"

Output of checkmake --version

checkmake 0.2.1 built at 2022-08-15T10:00:27Z by Reinhard Urban reinhard.urban@nubix.de with go version go1.18.1 linux/amd64

Output of checkmake --debug <your makefile>

...
      RULE                 DESCRIPTION             LINE NUMBER  
                                                                
  maxbodylength   Target body for "Makefile"               578  
                  exceeds allowed length of 5                   
                  (8).                                          
  maxbodylength   Target body for "distcheck"              988  
                  exceeds allowed length of 5                   
                  (57).                                         
  maxbodylength   Target body for                         1046  
                  "distcleancheck" exceeds                      
                  allowed length of 5 (8).                      
  maxbodylength   Target body for "unknown"               1230  
                  exceeds allowed length of 5                   
                  (14).                                         
  minphony        Missing required phony target           1222  
                  "clean"                                       
  minphony        Missing required phony target           1222  
                  "test"                                        
  phonydeclared   Target "tags" should be                  711  
                  declared PHONY.                               
  phonydeclared   Target "ctags" should be                 742  
                  declared PHONY.                               
  phonydeclared   Target "cscopelist" should be            761  
                  declared PHONY.                               
  phonydeclared   Target "installdirs" should be          1060  
                  declared PHONY.                               
  phonydeclared   Target "uninstall" should be            1070  
                  declared PHONY.                               
  phonydeclared   Target "installcheck" should            1075  
                  be declared PHONY.                            
  phonydeclared   Target "clean" should be                1121  
                  declared PHONY.                               
  phonydeclared   Target "dvi" should be                  1131  
                  declared PHONY.                               
  phonydeclared   Target "html" should be                 1135  
                  declared PHONY.                               
  phonydeclared   Target "info" should be                 1139  
                  declared PHONY.                               
  phonydeclared   Target "mostlyclean" should be          1178  
                  declared PHONY.                               
  phonydeclared   Target "pdf" should be                  1182  
                  declared PHONY.                               
  phonydeclared   Target "ps" should be declared          1186  
                  PHONY.                                        

Output of make --version

GNU Make 4.3

Sample Makefile to reproduce issue

Any autotools generated GNU Makefile

(some of these things might not apply but the more you can provide the easier
it will be to fix this bug. Thanks!)

@crazybolillo
Copy link

This not only happens on autotools Makefiles, but as far as I can see on any file that does not have .test under .PHONY

For example this Makefile also generates the warning:

.PHONY: all

all:
    printf "Hello\n"

The error goes away if you add the targets to PHONY, even if they do not exist:

.PHONY: all test clean

all:
    printf "Hello\n"

@cooljeanius
Copy link

dup of #15 I think
(bugs #86 and #87 are also related, as is PR #88)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants