[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / ports

Annotation of ports/Makefile, Revision 1.78

1.78    ! espie       1: # $OpenBSD: Makefile,v 1.77 2018/07/09 13:48:16 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: MIRROR_MK ?= ${.CURDIR}/distfiles/Makefile
                      9: DISTFILES_DB ?= ${.CURDIR}/infrastructure/db/locate.database
                     10:
1.46      espie      11: .if defined(SUBDIR)
                     12: # nothing to do
                     13: .elif defined(key) || defined(name) || defined(category) || defined(author)
1.23      espie      14:
                     15: # set up subdirs from the index, assume it's up-to-date
1.77      espie      16: _CMD = perl ${.CURDIR}/infrastructure/bin/port-search-helper index='${.CURDIR}/INDEX'
1.54      espie      17: .  if defined(key)
                     18: _CMD += key='${key}'
                     19: .  endif
                     20: .  if defined(name)
                     21: _CMD += maintainer='${name}'
                     22: .  endif
                     23: .  if defined(category)
                     24: _CMD += category='${category}'
                     25: .  endif
                     26: .  if defined(maintainer)
                     27: _CMD += maintainer='${maintainer}'
                     28: .  endif
1.23      espie      29: SUBDIR != ${_CMD}
1.28      espie      30: .elif defined(SUBDIRLIST)
                     31: SUBDIR != sed -e 's,[  ]*\#.*,,' -e '/^[       ]*$$/d' ${SUBDIRLIST}
1.23      espie      32: .else
1.1       niklas     33: SUBDIR += archivers
1.2       angelos    34: SUBDIR += astro
1.3       niklas     35: SUBDIR += audio
1.1       niklas     36: SUBDIR += benchmarks
1.44      xsa        37: SUBDIR += biology
1.41      avsm       38: SUBDIR += books
1.11      marc       39: SUBDIR += cad
1.1       niklas     40: SUBDIR += chinese
                     41: SUBDIR += comms
1.9       angelos    42: SUBDIR += converters
1.1       niklas     43: SUBDIR += databases
                     44: SUBDIR += devel
                     45: SUBDIR += editors
1.31      naddy      46: SUBDIR += education
1.1       niklas     47: SUBDIR += emulators
1.66      jasper     48: SUBDIR += fonts
1.1       niklas     49: SUBDIR += games
1.53      ckuethe    50: SUBDIR += geo
1.1       niklas     51: SUBDIR += graphics
1.52      espie      52: SUBDIR += inputmethods
1.13      marc       53: SUBDIR += japanese
1.32      kevlo      54: SUBDIR += java
1.29      dugsong    55: SUBDIR += korean
1.6       niklas     56: SUBDIR += lang
1.1       niklas     57: SUBDIR += mail
1.10      angelos    58: SUBDIR += math
1.67      ajacouto   59: SUBDIR += meta
1.1       niklas     60: SUBDIR += misc
1.45      xsa        61: SUBDIR += multimedia
1.1       niklas     62: SUBDIR += net
                     63: SUBDIR += news
1.4       niklas     64: SUBDIR += plan9
1.7       angelos    65: SUBDIR += print
1.27      espie      66: SUBDIR += productivity
1.1       niklas     67: SUBDIR += security
                     68: SUBDIR += shells
                     69: SUBDIR += sysutils
1.47      jolan      70: SUBDIR += telephony
1.1       niklas     71: SUBDIR += textproc
                     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:
                     78: index:
                     79:        @rm -f ${.CURDIR}/INDEX
1.73      jasper     80:        @${_MAKE} USE_CCACHE=No ${.CURDIR}/INDEX
1.1       niklas     81:
                     82: ${.CURDIR}/INDEX:
1.16      espie      83:        @echo "Generating INDEX..."
1.76      naddy      84:        @${_MAKE} describe MACHINE_ARCH=amd64 ARCH=amd64 ECHO_MSG="echo 1>&2" > ${.CURDIR}/INDEX
1.16      espie      85:        @echo "Done."
1.1       niklas     86:
                     87: print-index:   ${.CURDIR}/INDEX
1.36      naddy      88:        @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); }' < ${.CURDIR}/INDEX
1.17      turan      89:
                     90: print-licenses: ${.CURDIR}/INDEX
1.20      turan      91:        @printf "Port                                    PC PF DC DF Maint\n"
1.36      naddy      92:        @awk -F\| '{printf("%-40.39s%-3.2s%-3.2s%-3.2s%-3.2s%-25.25s\n",$$2,$$12,$$13,$$14,$$15,$$6);}' < ${.CURDIR}/INDEX
1.1       niklas     93:
                     94: search:        ${.CURDIR}/INDEX
1.40      pb         95: .if !defined(key) && !defined(name)
                     96:        @echo "The search target requires a keyword or name parameter,"
                     97:        @echo "e.g.: \"make search key=somekeyword\" \"make search name=somename\""
1.1       niklas     98: .else
1.54      espie      99: .  if defined(key)
1.39      avsm      100:        @egrep -i -- "${key}" ${.CURDIR}/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     101: .  else
1.40      pb        102:        @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); }' ${.CURDIR}/INDEX
1.54      espie     103: .  endif
1.1       niklas    104: .endif
1.78    ! espie     105:
        !           106: fix-permissions:
        !           107:        @{ echo "COMMENT=test"; \
        !           108:        echo "CATEGORIES=test"; \
        !           109:        echo "PKGPATH=test/a"; \
        !           110:        echo "DISTNAME=test"; \
        !           111:        echo "PERMIT_PACKAGE_CDROM=Yes"; \
        !           112:        echo "ECHO_MSG=:"; \
        !           113:        echo ".include <bsd.port.mk>"; }|${MAKE} -f - fix-permissions
1.21      espie     114:
1.37      espie     115: homepages.html:
                    116:        @echo '<html><ul>' >$@
1.63      espie     117:        @${_MAKE} homepage-links ECHO_MSG='echo >&2' >>$@
1.37      espie     118:        @echo '</ul></html>' >>$@
1.22      espie     119:
                    120: distfiles-update-locatedb:
                    121:        @PORTSDIR=${.CURDIR} /bin/sh ${.CURDIR}/infrastructure/fetch/distfiles-update-locatedb ${DISTFILES_DB}
                    122:
1.48      pvalchev  123: pkglocatedb:
1.62      espie     124:        @pkg_mklocatedb -a -d ${.CURDIR}/packages/${MACHINE_ARCH}/all/ \
1.50      pvalchev  125:            >${.CURDIR}/packages/${MACHINE_ARCH}/ftp/pkglocatedb
1.48      pvalchev  126:
1.68      espie     127: .PHONY: index search distfiles-update-locatedb \
1.48      pvalchev  128:        pkglocatedb print-licenses print-index