Skip to content

Add checkmake support

Ash McKenzie requested to merge ashmckenzie/add-checkmake-support into main

What does this Merge Request do and why?

This MR adds checkmake support into GDK via a new make checkmake and test:checkmake CI job to ensure our Makefile is in good health 🙂

Example when there are Makefile violations:

$ git diff Makefile
diff --git a/Makefile b/Makefile
index a30b5b74..ff876972 100644
--- a/Makefile
+++ b/Makefile
@@ -81,7 +81,6 @@ endif

 # This is used by `gdk install` and `gdk reconfigure`
 #
-.PHONY: all
 all: preflight-checks \
 gitlab-setup \
 gitlab-shell-setup \

$ make checkmake
Checkmake:
      RULE                 DESCRIPTION             LINE NUMBER

  minphony        Missing required phony target           1165
                  "all"
  phonydeclared   Target "all" should be           84
                  declared PHONY.

make: *** [checkmake] Error 2

Merge Request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise Issue to follow-up.
  • Documentation added/updated, if needed.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Ash McKenzie

Merge request reports