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

Annotation of ports/Makefile, Revision 1.69

1.69    ! espie       1: # $OpenBSD: Makefile,v 1.68 2012/03/09 10:57:54 espie Exp $
1.1       niklas      2: # $FreeBSD: Makefile,v 1.36 1997/10/04 15:54:31 jkh Exp $
                      3: #
                      4:
1.54      espie       5: PKGPATH =
                      6: MIRROR_MK ?= ${.CURDIR}/distfiles/Makefile
                      7: DISTFILES_DB ?= ${.CURDIR}/infrastructure/db/locate.database
                      8:
1.46      espie       9: .if defined(SUBDIR)
                     10: # nothing to do
                     11: .elif defined(key) || defined(name) || defined(category) || defined(author)
1.23      espie      12:
                     13: # set up subdirs from the index, assume it's up-to-date
1.64      espie      14: _CMD = perl ${.CURDIR}/infrastructure/bin/retrieve-index index='${.CURDIR}/INDEX'
1.54      espie      15: .  if defined(key)
                     16: _CMD += key='${key}'
                     17: .  endif
                     18: .  if defined(name)
                     19: _CMD += maintainer='${name}'
                     20: .  endif
                     21: .  if defined(category)
                     22: _CMD += category='${category}'
                     23: .  endif
                     24: .  if defined(maintainer)
                     25: _CMD += maintainer='${maintainer}'
                     26: .  endif
1.23      espie      27: SUBDIR != ${_CMD}
1.28      espie      28: .elif defined(SUBDIRLIST)
                     29: SUBDIR != sed -e 's,[  ]*\#.*,,' -e '/^[       ]*$$/d' ${SUBDIRLIST}
1.23      espie      30: .else
1.1       niklas     31: SUBDIR += archivers
1.2       angelos    32: SUBDIR += astro
1.3       niklas     33: SUBDIR += audio
1.1       niklas     34: SUBDIR += benchmarks
1.44      xsa        35: SUBDIR += biology
1.41      avsm       36: SUBDIR += books
1.11      marc       37: SUBDIR += cad
1.1       niklas     38: SUBDIR += chinese
                     39: SUBDIR += comms
1.9       angelos    40: SUBDIR += converters
1.1       niklas     41: SUBDIR += databases
                     42: SUBDIR += devel
                     43: SUBDIR += editors
1.31      naddy      44: SUBDIR += education
1.1       niklas     45: SUBDIR += emulators
1.66      jasper     46: SUBDIR += fonts
1.1       niklas     47: SUBDIR += games
1.53      ckuethe    48: SUBDIR += geo
1.1       niklas     49: SUBDIR += graphics
1.52      espie      50: SUBDIR += inputmethods
1.13      marc       51: SUBDIR += japanese
1.32      kevlo      52: SUBDIR += java
1.29      dugsong    53: SUBDIR += korean
1.6       niklas     54: SUBDIR += lang
1.1       niklas     55: SUBDIR += mail
1.10      angelos    56: SUBDIR += math
1.67      ajacouto   57: SUBDIR += meta
1.1       niklas     58: SUBDIR += misc
1.45      xsa        59: SUBDIR += multimedia
1.1       niklas     60: SUBDIR += net
                     61: SUBDIR += news
1.30      pvalchev   62: SUBDIR += palm
1.4       niklas     63: SUBDIR += plan9
1.7       angelos    64: SUBDIR += print
1.27      espie      65: SUBDIR += productivity
1.12      form       66: SUBDIR += russian
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.63      espie      80:        @${_MAKE} ${.CURDIR}/INDEX
1.1       niklas     81:
                     82: ${.CURDIR}/INDEX:
1.16      espie      83:        @echo "Generating INDEX..."
1.63      espie      84:        @${_MAKE} describe MACHINE_ARCH=i386 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.21      espie     105:
1.37      espie     106: homepages.html:
                    107:        @echo '<html><ul>' >$@
1.63      espie     108:        @${_MAKE} homepage-links ECHO_MSG='echo >&2' >>$@
1.37      espie     109:        @echo '</ul></html>' >>$@
1.22      espie     110:
                    111: distfiles-update-locatedb:
                    112:        @PORTSDIR=${.CURDIR} /bin/sh ${.CURDIR}/infrastructure/fetch/distfiles-update-locatedb ${DISTFILES_DB}
                    113:
1.48      pvalchev  114: pkglocatedb:
1.62      espie     115:        @pkg_mklocatedb -a -d ${.CURDIR}/packages/${MACHINE_ARCH}/all/ \
1.50      pvalchev  116:            >${.CURDIR}/packages/${MACHINE_ARCH}/ftp/pkglocatedb
1.48      pvalchev  117:
1.68      espie     118: .PHONY: index search distfiles-update-locatedb \
1.48      pvalchev  119:        pkglocatedb print-licenses print-index