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

Annotation of ports/Makefile, Revision 1.70

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