maint.mk: import improvements from m4