Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.port.subdir.mk
Show All 33 Lines | |||||
# tags | # tags | ||||
# | # | ||||
# search: | # search: | ||||
# Search for ports using either 'make search key=<keyword>' | # Search for ports using either 'make search key=<keyword>' | ||||
# or 'make search name=<keyword>'. | # or 'make search name=<keyword>'. | ||||
PORTSDIR?= /usr/ports | PORTSDIR?= /usr/ports | ||||
TEMPLATES?= ${PORTSDIR}/Templates | TEMPLATES?= ${PORTSDIR}/Templates | ||||
.if defined(PORTSTOP) | README= ${TEMPLATES}/README.${PORTSTOP:?top:category} | ||||
README= ${TEMPLATES}/README.top | |||||
.else | |||||
README= ${TEMPLATES}/README.category | |||||
.endif | |||||
MOVEDDIR?= ${PORTSDIR} | MOVEDDIR?= ${PORTSDIR} | ||||
MOVEDFILE?= MOVED | MOVEDFILE?= MOVED | ||||
# Ensure .CURDIR contains an absolute path without a trailing slash. Failed | # Ensure .CURDIR contains an absolute path without a trailing slash. Failed | ||||
# builds can occur when PORTSDIR is a symbolic link, or with something like | # builds can occur when PORTSDIR is a symbolic link, or with something like | ||||
# make -C /usr/ports/category/port/. | # make -C /usr/ports/category/port/. | ||||
.CURDIR:= ${.CURDIR:tA} | .CURDIR:= ${.CURDIR:tA} | ||||
▲ Show 20 Lines • Show All 172 Lines • ▼ Show 20 Lines | |||||
install: afterinstall | install: afterinstall | ||||
afterinstall: realinstall | afterinstall: realinstall | ||||
realinstall: beforeinstall ${SUBDIR:S/^/_/:S/$/.realinstall/} | realinstall: beforeinstall ${SUBDIR:S/^/_/:S/$/.realinstall/} | ||||
.endif | .endif | ||||
IGNOREDIR= Mk Templates Tools distfiles packages pkg Keywords | IGNOREDIR= Mk Templates Tools distfiles packages pkg Keywords | ||||
.if !target(checksubdirs) | .if !target(checksubdirs) | ||||
.if defined(PORTSTOP) | checksubdirs: checksubdir ${PORTSTOP:D${SUBDIR:S/^/_/:S/$/.checksubdirs/}} | ||||
checksubdirs: checksubdir ${SUBDIR:S/^/_/:S/$/.checksubdirs/} | |||||
.else | |||||
checksubdirs: checksubdir | |||||
.endif | |||||
.endif | .endif | ||||
.if !target(checksubdir) | .if !target(checksubdir) | ||||
checksubdir: | checksubdir: | ||||
@for d in *; do \ | @for d in *; do \ | ||||
if [ -d "$$d" ]; then \ | if [ -d "$$d" ]; then \ | ||||
found=0; \ | found=0; \ | ||||
for s in ${SUBDIR} ${IGNOREDIR}; do \ | for s in ${SUBDIR} ${IGNOREDIR}; do \ | ||||
▲ Show 20 Lines • Show All 269 Lines • Show Last 20 Lines |