maint.mk: improve "can not" detection and generalize rule name