[Bug 297456] ports-mgmt/portlint: portlint doesn't complain when the line '.include <bsd.port.mk>' is not in the end of Makefile

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 11 Aug 2026 22:17:37 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297456

            Bug ID: 297456
           Summary: ports-mgmt/portlint: portlint doesn't complain when
                    the line '.include <bsd.port.mk>' is not in the end of
                    Makefile
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: marcus@FreeBSD.org
          Reporter: yuri@freebsd.org
             Flags: maintainer-feedback?(marcus@FreeBSD.org)
          Assignee: marcus@FreeBSD.org

This line should always be the last line, if present.
Alternatively, '.include <bsd.port.post.mk>' should be treated the same way
when present.


Testcase (Makefile):

PORTNAME=       x
DISTVERSION=    1.0
CATEGORIES=     databases

MAINTAINER=     yuri@FreeBSD.org
COMMENT=        X
WWW=            https://x.com/

LICENSE=        MIT
LICENSE_FILE=   ${WRKSRC}/LICENSE

USES=           llvm:build zug

USE_GITHUB=     yes

.include <bsd.port.mk>

PLIST_FILES=    bin/x

ZIG_ARGS=       -Dllvm-objcopy=${LLVM_PREFIX}/bin/llvm-objcopy

.if defined(WITH_DEBUG)
DO_MAKE_BUILD=  ${SETENVI} ${WRK_ENV} ${ZIG_ENV} ${ZIG_CMD} build \
                ${_MAKE_JOBS} --prefix ${PREFIX} --system ${ZIG_DEPSDIR} \
                --verbose ${ZIG_ARGS}
.else
DO_MAKE_BUILD=  ${SETENVI} ${WRK_ENV} ${ZIG_ENV} ${ZIG_CMD} build \
                ${_MAKE_JOBS} --prefix ${PREFIX} --system ${ZIG_DEPSDIR} \
                --verbose --release=fast ${ZIG_ARGS}
.endif

-- 
You are receiving this mail because:
You are the assignee for the bug.