Annotation of ports/Makefile, Revision 1.87
1.87 ! rsadowsk 1: # $OpenBSD: Makefile,v 1.86 2018/12/14 18:57:58 espie Exp $
1.74 espie 2:
3: .if !defined(BSD_OWN_MK)
4: . include <bsd.own.mk>
5: .endif
1.1 niklas 6:
1.54 espie 7: PKGPATH =
8: DISTFILES_DB ?= ${.CURDIR}/infrastructure/db/locate.database
1.82 espie 9: INDEX = ${LOCALBASE}/share/ports-INDEX
1.54 espie 10:
1.46 espie 11: .if defined(SUBDIR)
12: # nothing to do
1.82 espie 13: .elif !make(search) && (defined(key) || defined(name) || defined(category) || defined(author))
1.23 espie 14: # set up subdirs from the index, assume it's up-to-date
1.81 espie 15: _CMD = perl ${.CURDIR}/infrastructure/bin/port-search-helper index='${INDEX}'
1.54 espie 16: . if defined(key)
17: _CMD += key='${key}'
18: . endif
19: . if defined(name)
20: _CMD += maintainer='${name}'
21: . endif
22: . if defined(category)
23: _CMD += category='${category}'
24: . endif
25: . if defined(maintainer)
26: _CMD += maintainer='${maintainer}'
27: . endif
1.23 espie 28: SUBDIR != ${_CMD}
1.28 espie 29: .elif defined(SUBDIRLIST)
30: SUBDIR != sed -e 's,[ ]*\#.*,,' -e '/^[ ]*$$/d' ${SUBDIRLIST}
1.23 espie 31: .else
1.1 niklas 32: SUBDIR += archivers
1.2 angelos 33: SUBDIR += astro
1.3 niklas 34: SUBDIR += audio
1.1 niklas 35: SUBDIR += benchmarks
1.44 xsa 36: SUBDIR += biology
1.41 avsm 37: SUBDIR += books
1.11 marc 38: SUBDIR += cad
1.1 niklas 39: SUBDIR += chinese
40: SUBDIR += comms
1.9 angelos 41: SUBDIR += converters
1.1 niklas 42: SUBDIR += databases
43: SUBDIR += devel
44: SUBDIR += editors
1.31 naddy 45: SUBDIR += education
1.1 niklas 46: SUBDIR += emulators
1.66 jasper 47: SUBDIR += fonts
1.1 niklas 48: SUBDIR += games
1.53 ckuethe 49: SUBDIR += geo
1.1 niklas 50: SUBDIR += graphics
1.52 espie 51: SUBDIR += inputmethods
1.13 marc 52: SUBDIR += japanese
1.32 kevlo 53: SUBDIR += java
1.29 dugsong 54: SUBDIR += korean
1.6 niklas 55: SUBDIR += lang
1.1 niklas 56: SUBDIR += mail
1.10 angelos 57: SUBDIR += math
1.67 ajacouto 58: SUBDIR += meta
1.1 niklas 59: SUBDIR += misc
1.45 xsa 60: SUBDIR += multimedia
1.1 niklas 61: SUBDIR += net
62: SUBDIR += news
1.4 niklas 63: SUBDIR += plan9
1.7 angelos 64: SUBDIR += print
1.27 espie 65: SUBDIR += productivity
1.1 niklas 66: SUBDIR += security
67: SUBDIR += shells
68: SUBDIR += sysutils
1.47 jolan 69: SUBDIR += telephony
1.1 niklas 70: SUBDIR += textproc
1.87 ! rsadowsk 71: SUBDIR += wayland
1.1 niklas 72: SUBDIR += www
1.5 niklas 73: SUBDIR += x11
1.23 espie 74: .endif
1.1 niklas 75:
76: .include <bsd.port.subdir.mk>
77:
1.82 espie 78: ${INDEX}:
1.86 espie 79: @if pkg_info -q -e 'portslist-<6.10'; then \
80: echo "Old portslist found"; \
81: echo "Don't mix -current and 6.4"; \
82: fi
1.82 espie 83: @echo "Please install portslist"
84: @echo "${SUDO} pkg_add portslist"
85: @exit 1
86:
1.1 niklas 87:
1.81 espie 88: print-index: ${INDEX}
89: @awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nL-deps:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10); }' < ${INDEX}
1.17 turan 90:
1.81 espie 91: print-licenses: ${INDEX}
1.20 turan 92: @printf "Port PC PF DC DF Maint\n"
1.81 espie 93: @awk -F\| '{printf("%-40.39s%-3.2s%-3.2s%-3.2s%-3.2s%-25.25s\n",$$2,$$12,$$13,$$14,$$15,$$6);}' < ${INDEX}
1.1 niklas 94:
1.81 espie 95: search: ${INDEX}
1.40 pb 96: .if !defined(key) && !defined(name)
97: @echo "The search target requires a keyword or name parameter,"
98: @echo "e.g.: \"make search key=somekeyword\" \"make search name=somename\""
1.1 niklas 99: .else
1.54 espie 100: . if defined(key)
1.81 espie 101: @egrep -i -- "${key}" ${INDEX} | awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nL-deps:\t%s\nB-deps:\t%s\nR-deps:\t%s\nArchs:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10, $$11); }'
1.54 espie 102: . else
1.81 espie 103: @awk -F\| '$$1 ~ /${name}/ { printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nL-deps:\t%s\nB-deps:\t%s\nR-deps:\t%s\nArchs:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10, $$11); }' ${INDEX}
1.54 espie 104: . endif
1.1 niklas 105: .endif
1.78 espie 106:
107: fix-permissions:
1.84 espie 108: @{ echo "DUMMY_PACKAGE=Yes"; \
1.78 espie 109: echo ".include <bsd.port.mk>"; }|${MAKE} -f - fix-permissions
1.21 espie 110:
1.22 espie 111: distfiles-update-locatedb:
112: @PORTSDIR=${.CURDIR} /bin/sh ${.CURDIR}/infrastructure/fetch/distfiles-update-locatedb ${DISTFILES_DB}
113:
1.84 espie 114: create_DEPENDS_CACHE:
115: @${_mk_DEPENDS_CACHE}; echo $${_DEPENDS_CACHE}
116:
1.85 espie 117: destroy_DEPENDS_CACHE:
118: @${_PBUILD} rm -rf 2>/dev/null $${_DEPENDS_CACHE}
119:
120:
1.68 espie 121: .PHONY: index search distfiles-update-locatedb \
1.84 espie 122: print-licenses print-index fix-permissions \
1.85 espie 123: create_DEPENDS_CACHE destroy_DEPENDS_CACHE